[SR-Users] Reset Prometheus counter once
Marat Gareev
maratkin94 at gmail.com
Thu Jul 16 13:13:50 CEST 2020
Hi, guys,
many thanks for your interesting solutions.
I have implemented Vicente's suggestion, it works as expected.
loadmodule "xhttp_prom.so"
> modparam("xhttp_prom", "prom_counter", "name=mycounter;")
> modparam("pv", "shvset", "is_prometheus_init=i:0")
> route {
> if ($shv(is_prometheus_init) == 0) {
> xlog("L_NOTICE", "Initialization of Prometheus counters\n");
> prom_counter_reset("mycounter");
> $shv(is_prometheus_init) = 1;
> }
> }
Regards,
Marat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200716/45b70e04/attachment.htm>
More information about the sr-users
mailing list