Author: Conrad Wood Date: To: Andy Smith, users Subject: Re: [bitfolk] predicted network usage / "Predicted to exceed
transfer quota"
On Thu, 2022-02-24 at 13:39 +0000, Andy Smith wrote: > Hi Conrad,
>
> On Thu, Feb 24, 2022 at 08:58:49AM +0000, Conrad Wood wrote:
> > One of the ways I could see this working - without having to create
> > a
> > new API - is to expose it as a metric in bitfolks
> > grafana/prometheus.
>
> Okay. I will have a think about this. If it can go in to Icinga then
> it can go in to Prometheus.
>
> > if there were metrics (gauges) "traffic_predicted" and
> > "traffic_contracted", it would be trivial for me to query bitfolks'
> > prometheus to poll that regularly.
>
> Can do say:
>
> data_transferred_in
> data_transferred_out
> data_predicted_in
> data_predicted_out
> data_contracted_in
> data_contracted_out
>
> I guess they should be in bytes as Prometheus usually wants the base
> unit.
>
> What about the start and end times of the current period? Provided
> as unix timestamps?
>
> > Thanks Andy for your patience (again),
>
> No worries. Thanks for bringing it up on the list as it's useful to
> see what other people think too.
>
> Cheers,
> Andy
> Hi,
That would be very nice. The metrics you suggest will work for me.
I do scrape it from the website now as suggested by Tony (thanks again)
in this thread, but web-scraping does have a few caveats, so pulling
them from prometheus would be nicer.
As for the metrics, I now (as of this morning) put the result from the
web scrapes into my prometheus like so: