On 07 Jul 11:51, Nipuni wrote: > I want to set Prometheus Counter value to 0 when the server restarts in a > manner similar to, > > * private static final Gauge SERVER_UP = > Gauge.build(MetricConstants.SERVER_UP, "Server > status").labelNames(labels).register();* > > * Gauge gauge = (Gauge) map.get(SERVER_UP);* > * gauge.labels(serviceName, serviceType).set(0);* > > > How can this be done with Counters ?
Just call the .labels() function without .inc() > > -- > You received this message because you are subscribed to the Google Groups > "Prometheus Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/prometheus-users/f3d920aa-31a7-4446-ab2d-c7b5d3fddd50o%40googlegroups.com. -- Julien Pivotto @roidelapluie -- You received this message because you are subscribed to the Google Groups "Prometheus Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/20200707210558.GA613098%40oxygen.

