Simple Prometheus exporter, breaker box circuit current power usage

Closed Posted 2 years ago Paid on delivery
Closed Paid on delivery

I have a need for a custom exporter to read power usage data from my breaker box and insert into prometheus datastore. [login to view URL]

The data retrieval is easy, the breakerbox has unencrypted webpage where the data can be read in CSV format.

There's no authentication, a simple curl will read the data.

When I use the app, it basically goes and reads two different pages, first is to pull the circuit names, and the second is the corresponding circuit current power usage in hexadecimal. This would need to be converted to a decimal integer before writing to prometheus datastore.

Probably the easiest way to do this is to just pull the circuit usage data on a configurable interval, and let me declare the names of the circuits in the config manually. The device itself has maximum character length for circuit names so basically pulling them from there is undesirable.

I've attached an example .csv from a single pull of the instant values.

```

$ curl -v [login to view URL]>[login to view URL]

* Trying [login to view URL]:80...

* TCP_NODELAY set

% Total % Received % Xferd Average Speed Time Time Time Current

Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to [login to view URL] ([login to view URL]) port 80 (#0)

> GET /csv/[login to view URL] HTTP/1.1

> Host: [login to view URL]

> User-Agent: curl/7.68.0

> Accept: */*

>

* Mark bundle as not supporting multiuse

< HTTP/1.1 200 OK

< Content-type: text/csv

< Cache-Control: No-Cache

< Connection: Close

<

{ [539 bytes data]

100 539 0 539 0 0 89833 0 --:--:-- --:--:-- --:--:-- 105k

* Closing connection 0

```

The platform I would be using to run the exporter is Ubuntu Linux 20.04

Prometheus Monitoring

Project ID: #30537898

About the project

Remote project Active 2 years ago