From 19295e8ffc65f44b0f48a10d436530aea48e6986 Mon Sep 17 00:00:00 2001 From: aexel90 Date: Tue, 29 Dec 2020 15:14:36 +0100 Subject: [PATCH] typo fix --- README.md | 27 ++++++++++++++++++++------- hue_metrics.json | 2 +- main.go | 4 ++-- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ce91bba..617208c 100644 --- a/README.md +++ b/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) \ No newline at end of file diff --git a/hue_metrics.json b/hue_metrics.json index 3b17f21..25f8a3d 100644 --- a/hue_metrics.json +++ b/hue_metrics.json @@ -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", diff --git a/main.go b/main.go index 254b0ae..6afd398 100644 --- a/main.go +++ b/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") )