diff --git a/Readme.md b/Readme.md index b971e6e..66f8ff3 100644 --- a/Readme.md +++ b/Readme.md @@ -76,4 +76,10 @@ Feb 21 20:10:30 raspberrypi systemd[1]: Started Bme680 Homekit service. Prometheus is a system for monitoring and alerting. To install it run `prometheus./install.sh`. -Prometheus server will listen on port `:9090` \ No newline at end of file +Prometheus server will listen on port `:9090` + +### Grafana + +Grafana can be used to create dashboard and visualise prometheus metrics. To install it run `grafana/install.sh` + +Grafana is accessible on port `:80`. diff --git a/grafana/grafana.ini b/grafana/grafana.ini new file mode 100644 index 0000000..b480f58 --- /dev/null +++ b/grafana/grafana.ini @@ -0,0 +1,10 @@ +#################################### Server #################################### +[server] +protocol = http +http_port = 80 +enable_gzip = true + +#################################### Anonymous Auth ###################### +[auth.anonymous] +# enable anonymous access +enabled = true \ No newline at end of file diff --git a/grafana/install.sh b/grafana/install.sh new file mode 100644 index 0000000..c071277 --- /dev/null +++ b/grafana/install.sh @@ -0,0 +1,9 @@ +wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - +echo "deb https://packages.grafana.com/oss/deb stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list +apt-get update +apt-get install -y grafana + +cp grafana.ini /etc/grafana/grafana.ini +systemctl daemon-reload +systemctl enable grafana-server +systemctl start grafana-server \ No newline at end of file