1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grafana_ynh.git synced 2024-09-03 20:36:29 +02:00

Fix bad NetData template import for Grafana version > 5 (fixes #14) (#15)

Pre-imported dashboard was failing due to missing uid field.
Moreover, Influxdb auto-configuration to enable opentsdb wasn't working any more.

All of this was certainly due to recent versions of Grafana and Influxdb.
This commit is contained in:
JimboJoe 2018-05-26 09:28:18 +02:00 committed by GitHub
parent e5a150e077
commit cf9d6789c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 7 deletions

File diff suppressed because one or more lines are too long

View file

@ -6,7 +6,7 @@
"en": "Beautiful metric & analytic dashboards for monitoring",
"fr": "Tableaux de bords de supervision"
},
"version": "1.0.0",
"version": "1.1.0~ynh1",
"license": "Apache-2.0",
"url": "http://grafana.org/",
"maintainer": {

View file

@ -62,7 +62,7 @@ if [[ -f "$netdata_conf" ]] ; then
s/# enabled = no/enabled = yes/
s/# type = graphite/type = opentsdb/
s/# destination = localhost/destination = localhost:4242/
s/# update every = 10/update every = 60/
s/# update every = 10/update every = 60/
}' $netdata_conf
else
# Otherwise create the section
@ -71,7 +71,7 @@ enabled = yes
type = opentsdb
destination = localhost:4242" | sudo tee -a $netdata_conf
fi
# Restart NetData
sudo systemctl restart netdata
fi
@ -85,14 +85,14 @@ ynh_mysql_create_db "$dbname" "$dbuser" "$dbpass"
# Configure InfluxDB
if [ -f /etc/influxdb/influxdb.conf ] ; then
sudo sed -i '/^\[\[opentsdb\]\]$/,/^\[/ s/# enabled = false/enabled = true/' /etc/influxdb/influxdb.conf
sudo sed -i '/^\[\[opentsdb\]\]$/,/^\[/ s/enabled = false/enabled = true/' /etc/influxdb/influxdb.conf
else
[ -d /etc/influxdb ] || sudo mkdir /etc/influxdb
sudo cp ../conf/influxdb.conf /etc/influxdb
fi
# Start InfluxDB server
sudo systemctl start influxdb
sudo systemctl restart influxdb
# Configure Grafana
sudo cp ../conf/ldap.toml /etc/grafana