Hello Henning,
I have nothing against using a single variable, except that it is confusing.
It is not backward compatible. If you enable all vars, then all new
stats will be enabled by default.
In the current stable version, the names of the stats vars and stats
groups are inherited from the "stats.get_statistics" RPC command.
That's why we don't have explicit documentation for them in the README
file.
For the new stats we don't have a group and the stats vars have sort
of arbitrary names.
Having dedicated modparams for all these new stats not covered by the
generic ones require a simple and clean implementation along with an
easy way to switch them on and off while keeping backward
compatibility.
If more kamailio admin feel that we should merge them, we could :)
-ovidiu
On Thu, Apr 4, 2024 at 1:45 PM Henning Westerholt <hw(a)gilawa.com> wrote:
Hello Ovidiu,
nothing against it from my side. I would recommend using the existing variable "
xhttp_prom_stats" for activating/deactivation. Just think we should not introduce to
many single purpose variables, especially for a value which is always available without
any dependencies.
Cheers,
Henning
> -----Original Message-----
> From: Ovidiu Sas via sr-users <sr-users(a)lists.kamailio.org>
> Sent: Donnerstag, 4. April 2024 18:54
> To: Kamailio (SER) - Users Mailing List <sr-users(a)lists.kamailio.org>
> Cc: Ovidiu Sas <osas(a)voipembedded.com>
> Subject: [SR-Users] RFC: uptime metric for xhttp_prom module
>
> Hello all,
>
> The xhttp_module can export all stats under "stats.get_statistics" RPC
> command.
> I was thinking of adding an optional "uptime" stat that will return the
kamailio
> server uptime (like the "core.uptime" RPC command). This will make it
easier
> to add an uptime panel in grafana.
> The new stat would be controlled by a module parameter (by default
> disabled).
> Something like:
> modparam("xhttp_prom", "xhttp_prom_uptime_stat" 1) And this
will
> generate something like:
> kam_uptime 671 1712249054631
>
> This can be already implemented in the script using the
"prom_gauge_set()"
> and retrieving the uptime via "jsonrpc_exec()", but it would be nicer and
faster
> to implement it in the module itself.
>
> Comments?
>
> -ovidiu
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions To unsubscribe
> send an email to sr-users-leave(a)lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the
> sender!
> Edit mailing list options or unsubscribe:
--
VoIP Embedded, Inc.
http://www.voipembedded.com