Hi Brian,

Good day,

I have a code that monitors a drift in data

If drift happens I need to push value 1 to prometheus
Default 0 , issue is when I set gauge as 1, It is 1 till I set it back to 0

Is there any metric where I can push the value 1 and it resets to 0
automatically ?

Regards,
Yegna



On Fri, Jan 21, 2022 at 04:35 Brian Candler <[email protected]> wrote:

> > I have considered the grafana data source option but I found a plugin
> for mongoDb which is available only in enterprise grafana
> >
> > So do you suggest me to create a data source for mongoDB in grafana ?
>
> That's a grafana question, not a prometheus question; it would be better
> asked in the grafana community <https://community.grafana.com/>.
>
> > And regarding 2 and 3 - since we use python - Is prometheus-python
> client API useful to directly write to prometheus ? (remote write protocol)
>
> If you mean https://github.com/prometheus/client_python, then as far as I
> know it's only an exporter, not a remote write client.  Remote write was
> option 3. You could send data to vector.dev using one of its many source
> adapters, and let it do the remote write
> <https://vector.dev/docs/reference/configuration/sinks/prometheus_remote_write/>
> for you.
>
> In option 2, what I was thinking was that you could expose the data as a
> regular exporter, at the same time as you write it to MongoDB.  Prometheus
> can then scrape this as normal, i.e. it will scrape the *most recent"
> updated value only.
>
> --
> 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/a84587cb-9db9-496c-a7f8-e1442c16a8e2n%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/a84587cb-9db9-496c-a7f8-e1442c16a8e2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAOBTUyWjU0wEpR%3D8LbVRhiM%2B8UDJQ1ER-TMEp6ub_bkN7aD4Nw%40mail.gmail.com.

Reply via email to