This is an old revision of the document!
# apt install -y apt-transport-https software-properties-common wget # wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add - # echo "deb https://packages.grafana.com/oss/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list # apt update # apt install grafana # systemctl enable grafana-server.service # systemctl start grafana-server
Configuratin->Data Source->Prometheus URL: http://localhost:9090
+ Import->Import via grafana.com
prometheus-node-exporter: 1860
prometheus-blackbox-exporter: 7587
Data Source: Prometheus
+ Create
Name: router
Add New Panel
Panel Title: FastEthernet1/1 connection to ISP
Query: A
Metrics: 8*rate(if_in_octets{ifDescr="FastEthernet1/1",instance="router"}[1m])
Legend: in bps
Query: B
Metrics: 8*rate(if_out_octets{ifDescr="FastEthernet1/1",instance="router"}[1m])
Legend: out bps
# cat /etc/grafana/grafana.ini
... [smtp] enabled = true host = mail.isp.un:25 from_address = grafana@server.corpX.un ehlo_identity = server.corpX.un startTLS_policy = NoStartTLS ...
# service grafana-server restart
Alerting->Notification Channels ... userX/Email/userX@isp.un Dashboard->Panel (name)->Edit->Alert->...-> Evaluate every: 15s For 1m WHEN avg() OF query(A,1m,now) IS ABOVE 1000000 Send To: userX Apply->Save Dashboard!!!!