This is an old revision of the document!
influxdb
curl -sL https://repos.influxdata.com/influxdb.key | apt-key add - source /etc/lsb-release echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | tee -a /etc/apt/sources.list apt update apt install influxdb
enable admin service in /etc/influxdb/influxdb.conf and
systemctl restart influxdb
create database
root@graphite:~# influx Connected to http://localhost:8086 version 1.2.1 InfluxDB shell version: 1.2.1 > create database captive > CREATE USER "captive" WITH PASSWORD 'captive' WITH ALL PRIVILEGES > show databases name: databases name ---- _internal captive >
test
curl -G http://carbon:8086/query --data-urlencode "q=SHOW DATABASES"
python test
from influxdb import InfluxDBClient client = InfluxDBClient('carbon.csgalileo.org', 8086, username='captive', password='captive', database='test') json_body = [{"measurement": "browser", "tags": {"server":1, "server-name":"galileo"}, "time": datetime.utcnow().strftime('%Y-%m-%dT%H:%M:%SZ'), "fields": {"value":"ios"}}] client.write_points(json_body) client.query('select value from browser;')
grafana
install
echo "deb https://packagecloud.io/grafana/stable/debian/ jessie main" > /etc/apt/sources.list.d/grafana.list curl https://packagecloud.io/gpg.key | sudo apt-key add - apt update apt install -y grafana systemctl enable grafana-server systemctl start grafana-server
Login to http://localhost:3000 (admin/admin)
plugins
Add plugin in /var/lib/grafana/plugins/ directory
piechart
cd /var/lib/grafana/plugins/ git clone https://github.com/grafana/piechart-panel.git systemctl restart grafana-server.service