Add instructions for installing Grafana

This commit is contained in:
Denis-Cosmin Nutiu 2022-06-13 14:26:32 +03:00
parent 2e9cd63a25
commit 7973cf948b
3 changed files with 26 additions and 1 deletions

View file

@ -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 is a system for monitoring and alerting. To install it run `prometheus./install.sh`.
Prometheus server will listen on port `:9090` 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`.

10
grafana/grafana.ini Normal file
View file

@ -0,0 +1,10 @@
#################################### Server ####################################
[server]
protocol = http
http_port = 80
enable_gzip = true
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
enabled = true

9
grafana/install.sh Normal file
View file

@ -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