brontide / aioedgeos

Async version of code to interact with EdgeOS API and streaming statistics daemon.
39 stars 8 forks source link

Set the interval at which the metrics are collected and sent to influxdb #13

Closed greyhammer closed 2 years ago

greyhammer commented 2 years ago

Hi, Is there a way to set the interval at which the metrics are collected and sent to influxdb? I'm using the latest docker image

brontide commented 2 years ago

I haven't touched this code in years but the metrics aren't collected, they are received. The EdgeOS device is pushing updates at it's own internal rate via the web socket which are translated into influx records.

greyhammer commented 2 years ago

Oh, do you if that is a configurable setting in EdgeOS? Or is this docker container "scraping" the info from the webpage?

brontide commented 2 years ago

It's not scraping, like the webUI it opens a websocket which has real-time data pushed from the device. When the records come it we do something with them. There is no scraping configuration as it's all controlled by how frequently the device pushes the updates to us.

The only timing this script controls is how frequently the ping check is activated, this pushes a request to EdgeOS to do a ping check and then populated the summary information back to influx. All the main stats are captured as the device send them and we have no control over how frequent that is.