Grafana is a convenient monitoring service. In this article, we will review the process of setting up Astra and Grafana to collect and analyze statistics.
Install Influxdb
cd /tmp
wget https://dl.influxdata.com/influxdb/releases/influxdb_1.7.3_amd64.deb
sudo dpkg -i influxdb_1.7.3_amd64.deb
- After installation, run the service:
service influxdb start
- Connect to influxdb:
influx -precision rfc3339
- Create a database:
CREATE DATABASE Astra exit
Install Grafana
- Install:
cd /tmp wget https://dl.grafana.com/oss/release/grafana_6.0.2_amd64.deb sudo dpkg -i grafana_6.0.2_amd64.deb
- After installation, run the service:
service grafana-server start
- Go to http://server_ip:3000 -the web interface should open. The default login and password is admin/admin
- Connect influxdb: Click the Data Sources -> Add Data Source button to open the db settings menu. write on there:
Name: Astra Type: InfluxDB URL: http://grafana-server-IP:8086 (or localhost) Database: Astra
Click the Add button. You should see a green sign saying that the connection status is OK.
- Download dashboard for streams or dashboard for dvb-adapters and import it: Click the button
Dashboards -> Import. - Create a folder "/etc/astra/mod", put the script in it event.lua
- In the web interface Astra prescribe the address to influxdb: (http://grafana-server-IP:8086/write?db=Astra#interval=60&total=1)
- Channel names are taken from the ID field and are specified without spaces: (example: id: "old_tv")
- Restarting Astra
- Download dashboard for streams or dashboard for dvb-adapters and import it: Click the button