Re: [sr-dev] [kamailio/kamailio] usrloc Stats are not compatible with Prometheus (xhttp_prom module) (#2644)
Just to add - i think I did not backported it to 5.3 that time, because a new cfg parameter was introduced for it and it has been several commits that depends on each other. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2644#issuecomment-783513708___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc Stats are not compatible with Prometheus (xhttp_prom module) (#2644)
Argh. Thanks for notifying. The update to 5.4 is on my roadmap as well, so I guess time will heal. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2644#issuecomment-783512041___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc Stats are not compatible with Prometheus (xhttp_prom module) (#2644)
Closed #2644. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2644#event-4360775119___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Re: [sr-dev] [kamailio/kamailio] usrloc Stats are not compatible with Prometheus (xhttp_prom module) (#2644)
This has been fixed with PR https://github.com/kamailio/kamailio/pull/2304/. It's included in 5.4 but not in 5.3, but could be easily cherry-picked. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2644#issuecomment-783509004___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
[sr-dev] [kamailio/kamailio] usrloc Stats are not compatible with Prometheus (xhttp_prom module) (#2644)
### Description We tried to use the `xhttp_prom` module, but our Prometheus couldn't read it, because of metrics conflicting with Prometheus data model. For us, the problem lies in the usrloc module. It exports the following metrics: ``` usrloc:location-contacts = 0 usrloc:location-expires = 0 usrloc:location-users = 0 usrloc:registered_users = 0 ``` However, Prometheus allows only ascii characters and digits, as well as underscores and colons. See: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels The metrics names should not contain `-`, so they should get converted to `_`. Reproduction Setup Kamailio with `usrloc`, `xhttp` and `xhttp_prom` module and let Prometheus query it. It will stumble upon the first entry of `usrloc` module stats. ### Possible Solutions Either the `usrloc` module could export its stats with the dash replaced by underscores, or the xhttp_prom module could sanitize the output. The first one would be a breaking change, I guess, making this a change for a major release. ### Additional Information * **Kamailio Version** - output of `kamailio -v` ``` root@ifens5:/# kamailio -v version: kamailio 5.3.8 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. id: unknown compiled with gcc 7.5.0``` * **Operating System**: ``` Ubuntu 18.04 ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/kamailio/kamailio/issues/2644___ Kamailio (SER) - Development Mailing List sr-dev@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev