[SR-Users] xHTTP_PROM with older Kamailio

Karsten Horsmann khorsmann at gmail.com
Mon Jul 13 21:04:23 CEST 2020


Hi Marat,

You could also reach your goal with an golang program that provides
prometheus for example


https://github.com/florentchauveau/kamailio_exporter

AFAIK there are also an implementation from pacom.

Cheers
Karsten

Marat Gareev <maratkin94 at gmail.com> schrieb am Mo., 13. Juli 2020, 14:31:

> I found that the export module interface was changed (
> https://www.kamailio.org/w/2018/09/new-module-exports-interface/).
>
> I downgraded to old-style version this structure
>
>> struct module_exports exports = {
>>     "xhttp_prom",
>>     DEFAULT_DLFLAGS, /* dlopen flags */
>>     cmds,
>>     params,
>>     0,              /* exported RPC methods */
>>     0,          /* exported pseudo-variables */
>>     0,              /* response function */
>>     mod_init,       /* module initialization function */
>>     0,      /* per child init function */
>>     mod_destroy     /* destroy function */
>> };
>
> to
>
>> struct module_exports exports = {
>>     "xhttp_prom",
>>     DEFAULT_DLFLAGS, /* dlopen flags */
>>     cmds,
>>     params,
>>     0,
>>     0,              /* exported MI functions */
>>     0,              /* exported pseudo-variables */
>>     0,              /* extra processes */
>>     mod_init,       /* module initialization function */
>>     0,      /* per child init function */
>>     mod_destroy,     /* destroy function */
>>     NULL      /* per child init function */
>> };
>
> The problem is that *mod_init* was zero, so it was not called.
> And now mod_init is called and I can use this module.
>
> Many thanks 😊
>
>> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200713/cc88c8b1/attachment.htm>


More information about the sr-users mailing list