Skip to content

Commit

Permalink
Amending README.md with Prometheus information
Browse files Browse the repository at this point in the history
  • Loading branch information
t9zx committed Jul 11, 2020
1 parent 952f533 commit f294c82
Showing 1 changed file with 45 additions and 1 deletion.
46 changes: 45 additions & 1 deletion examples/json-live-data-server/README.md
@@ -1,6 +1,9 @@
# json-live-data-server

Starts up a simple web server responding with a JSON list of VBus values.
Starts up a simple web server

* responding with a JSON list of VBus values (`/api/v1/live-data`)
* responding with Prometheus metrics of the VBus values (`/api/v1/monitor`)


## Installation
Expand All @@ -25,6 +28,7 @@ You must edit the file `config.js` to adapt it to your environment. See the file
info: Ready to serve from the following URLs:
info: - http://127.0.0.1:3333/api/v1/live-data (internal)

### Data Returned as JSON
Accessing one of the listed URLs with a browser returns a simplified list of VBus value:

$ curl -s http://127.0.0.1:3333/api/v1/live-data | head -n 20
Expand All @@ -50,3 +54,43 @@ Accessing one of the listed URLs with a browser returns a simplified list of VBu
"rawValue": 21.5

In addition to that the same data is written to disk into a file called `live-data.json`.

### Data Returned as Prometheus Compatible Metric

```
$ curl http://127.0.0.1:3333/api/v1/monitor
# HELP resol Values as retreived from Resol Solar
# TYPE resol gauge
resol{id="00_0010_1001_10_0100_000_4_0",name="System date"} 616147995
resol{id="00_0010_1001_10_0100_004_2_0",name="Temperature sensor 1"} 21.1
resol{id="00_0010_1001_10_0100_006_2_0",name="Temperature sensor 2"} 51.900000000000006
resol{id="00_0010_1001_10_0100_008_2_0",name="Temperature sensor 3"} 54.400000000000006
resol{id="00_0010_1001_10_0100_010_2_0",name="Temperature sensor 4"} 888.8000000000001
resol{id="00_0010_1001_10_0100_012_2_0",name="Temperature sensor 5"} 999.9000000000001
resol{id="00_0010_1001_10_0100_014_2_0",name="Temperature VFS/RPS (S6)"} 999.9000000000001
resol{id="00_0010_1001_10_0100_016_4_0",name="Flow rate V40"} 0
resol{id="00_0010_1001_10_0100_020_4_0",name="Flow rate VFS (S6)"} 0
resol{id="00_0010_1001_10_0100_024_4_0",name="Flow rate Flowrotor (S7)"} 0
resol{id="00_0010_1001_10_0100_028_2_0",name="Pressure RPS (S6)"} 99.99000000000001
resol{id="00_0010_1001_10_0100_030_1_0",name="Pump speed relay 1"} 0
resol{id="00_0010_1001_10_0100_031_1_0",name="Pump speed relay 2"} 0
resol{id="00_0010_1001_10_0100_032_1_0",name="Pump speed relay 3"} 0
resol{id="00_0010_1001_10_0100_033_1_0",name="Pump speed relay 4"} 0
resol{id="00_0010_1001_10_0100_034_1_0",name="PWM A"} 0
resol{id="00_0010_1001_10_0100_035_1_0",name="PWM B"} 0
resol{id="00_0010_1001_10_0100_036_4_0",name="Error mask"} 0
resol{id="00_0010_1001_10_0100_036_1_1",name="Error: Sensor line broken"} 0
resol{id="00_0010_1001_10_0100_036_1_2",name="Error: Sensor line short-circuited"} 0
resol{id="00_0010_1001_10_0100_036_1_32",name="Error: Flow rate monitoring"} 0
resol{id="00_0010_1001_10_0100_036_1_64",name="Error: Overpressure"} 0
resol{id="00_0010_1001_10_0100_036_1_128",name="Error: Low pressure"} 0
resol{id="00_0010_1001_10_0100_036_1_512",name="Error: Data memory"} 0
resol{id="00_0010_1001_10_0100_036_1_1024",name="Error: Real-time clock"} 0
resol{id="00_0010_1001_10_0100_036_1_4096",name="Error: Twin pump"} 0
resol{id="00_0010_1001_10_0100_040_4_0",name="Warning mask"} 0
resol{id="00_0010_1001_10_0100_040_1_4",name="Warning: ΔT too high"} 0
resol{id="00_0010_1001_10_0100_040_1_8",name="Warning: Night circulation"} 0
resol{id="00_0010_1001_10_0100_040_1_16",name="Warning: Flow/Return interchanged"} 0
resol{id="00_0010_1001_10_0100_040_1_1024",name="Warning: Maximum store temperature"} 0
resol{id="00_0010_1001_10_0100_040_1_2048",name="Error: SD card"} 0
```

0 comments on commit f294c82

Please sign in to comment.