typo fix
This commit is contained in:
parent
ea963647bc
commit
19295e8ffc
3 changed files with 23 additions and 10 deletions
27
README.md
27
README.md
|
@ -19,20 +19,26 @@ Usage:
|
|||
$GOPATH/bin/hue_exporter -h
|
||||
|
||||
Usage of ./hue_exporter:
|
||||
-collect
|
||||
Collect all available metrics
|
||||
-collect-file string
|
||||
The JSON file where to store collect results
|
||||
-hue-url string
|
||||
The URL of the bridge
|
||||
-listen-address string
|
||||
The address to listen on for HTTP requests. (default "127.0.0.1:9773")
|
||||
The URL of the bridge
|
||||
-listen-address string
|
||||
The address to listen on for HTTP requests. (default "127.0.0.1:9773")
|
||||
-metrics-file string
|
||||
The JSON file with the metric definitions. (default "hue_metrics.json")
|
||||
-test
|
||||
test configured metrics
|
||||
Test configured metrics
|
||||
-username string
|
||||
The username token having bridge access
|
||||
The username token having bridge access
|
||||
|
||||
## Example execution
|
||||
|
||||
### Running within prometheus:
|
||||
|
||||
$GOPATH/bin/hue_exporter -hue_url 192.168.xxx.xxx -username ZlEH24zabK2jTpJ...
|
||||
$GOPATH/bin/hue_exporter -hue_url 192.168.xxx.xxx -username ZlEH24zabK2jTpJ... -metrics-file hue_metrics.json
|
||||
|
||||
# HELP hue_light_status status of lights registered at hue bridge
|
||||
# TYPE hue_light_status gauge
|
||||
|
@ -47,7 +53,14 @@ Usage:
|
|||
|
||||
### Test exporter:
|
||||
|
||||
$GOPATH/bin/hue_exporter -hue_url 192.168.xxx.xxx -username ZlEH24zabK2jTpJ... -test
|
||||
$GOPATH/bin/hue_exporter -hue_url 192.168.xxx.xxx -username ZlEH24zabK2jTpJ... -test -metrics-file hue_metrics.json
|
||||
|
||||
### Collect:
|
||||
|
||||
$GOPATH/bin/hue_exporter -hue_url 192.168.xxx.xxx -username ZlEH24zabK2jTpJ... -collect -metrics-file hue_metrics.json -collect-file result.json
|
||||
|
||||
## Grafana Dashboard
|
||||
|
||||
Dashboard ID is 13645.
|
||||
|
||||
![Grafana](https://raw.githubusercontent.com/aexel90/hue_exporter/main/grafana/screenshot.jpg)
|
|
@ -73,7 +73,7 @@
|
|||
},
|
||||
{
|
||||
"type": "bridge",
|
||||
"fqname": "hue_brdige_info",
|
||||
"fqname": "hue_bridge_info",
|
||||
"help": "Non-numeric data, value is always 1",
|
||||
"labels": [
|
||||
"api_version",
|
||||
|
|
4
main.go
4
main.go
|
@ -22,8 +22,8 @@ var (
|
|||
flagAddress = flag.String("listen-address", "127.0.0.1:9773", "The address to listen on for HTTP requests.")
|
||||
flagMetricsFile = flag.String("metrics-file", "hue_metrics.json", "The JSON file with the metric definitions.")
|
||||
|
||||
flagTest = flag.Bool("test", false, "test configured metrics")
|
||||
flagCollect = flag.Bool("collect", false, "test configured metrics")
|
||||
flagTest = flag.Bool("test", false, "Test configured metrics")
|
||||
flagCollect = flag.Bool("collect", false, "Collect all available metrics")
|
||||
flagCollectFile = flag.String("collect-file", "", "The JSON file where to store collect results")
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue