mirror of
https://github.com/YunoHost-Apps/grafana_ynh.git
synced 2024-09-03 20:36:29 +02:00
Fixes the netdata path in order to repair influxdb feeding
This commit is contained in:
parent
2e8bedf897
commit
b0b0cc492d
4 changed files with 9 additions and 9 deletions
|
@ -5,7 +5,7 @@ name = "Grafana"
|
||||||
description.en = "Metric & analytic dashboards for monitoring"
|
description.en = "Metric & analytic dashboards for monitoring"
|
||||||
description.fr = "Tableaux de bord de supervision"
|
description.fr = "Tableaux de bord de supervision"
|
||||||
|
|
||||||
version = "10.2.3~ynh1"
|
version = "10.2.3~ynh2"
|
||||||
|
|
||||||
maintainers = ["JimboJoe"]
|
maintainers = ["JimboJoe"]
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,10 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=30
|
ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=30
|
||||||
|
|
||||||
# If NetData is installed, configure it to feed InfluxDB
|
# If NetData is installed, configure it to feed InfluxDB
|
||||||
if [ -d "/opt/netdata/etc/netdata" ] ; then
|
if [ -d "/var/www/netdata/etc/netdata" ] ; then
|
||||||
netdata_conf="/opt/netdata/etc/netdata/exporting.conf"
|
netdata_conf="/var/www/netdata/etc/netdata/exporting.conf"
|
||||||
if [ ! -f "$netdata_conf" ] ; then
|
if [ ! -f "$netdata_conf" ] ; then
|
||||||
cp "/opt/netdata/usr/lib/netdata/conf.d/exporting.conf" /opt/netdata/etc/netdata
|
cp "/var/www/netdata/usr/lib/netdata/conf.d/exporting.conf" /var/www/netdata/etc/netdata
|
||||||
fi
|
fi
|
||||||
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
||||||
s/enabled = no/enabled = yes/
|
s/enabled = no/enabled = yes/
|
||||||
|
|
|
@ -39,7 +39,7 @@ ynh_remove_nginx_config
|
||||||
ynh_script_progression --message="Removing various files..."
|
ynh_script_progression --message="Removing various files..."
|
||||||
|
|
||||||
# If NetData is installed, configure it not to feed InfluxDB any more
|
# If NetData is installed, configure it not to feed InfluxDB any more
|
||||||
netdata_conf="/opt/netdata/etc/netdata/exporting.conf"
|
netdata_conf="/var/www/netdata/etc/netdata/exporting.conf"
|
||||||
if [[ -f "$netdata_conf" ]] ; then
|
if [[ -f "$netdata_conf" ]] ; then
|
||||||
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
||||||
s/enabled = yes/enabled = no/
|
s/enabled = yes/enabled = no/
|
||||||
|
|
|
@ -40,10 +40,10 @@ ynh_add_nginx_config
|
||||||
ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=3
|
ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=3
|
||||||
|
|
||||||
# If NetData is installed, configure it to feed InfluxDB
|
# If NetData is installed, configure it to feed InfluxDB
|
||||||
if [ -d "/opt/netdata" ] ; then
|
if [ -d "/var/www/netdata" ] ; then
|
||||||
netdata_conf="/opt/netdata/etc/netdata/exporting.conf"
|
netdata_conf="/var/www/netdata/etc/netdata/exporting.conf"
|
||||||
if [ ! -f $netdata_conf ] ; then
|
if [ ! -f $netdata_conf ] ; then
|
||||||
cp /opt/netdata/usr/lib/netdata/conf.d/exporting.conf $netdata_conf
|
cp /var/www/netdata/usr/lib/netdata/conf.d/exporting.conf $netdata_conf
|
||||||
fi
|
fi
|
||||||
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
sed -i '/^\[exporting:global\]$/,/^\[/ {
|
||||||
s/enabled = no/enabled = yes/
|
s/enabled = no/enabled = yes/
|
||||||
|
@ -67,7 +67,7 @@ EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove obsolete NetData backend if in use
|
# Remove obsolete NetData backend if in use
|
||||||
netdata_conf="/opt/netdata/etc/netdata/netdata.conf"
|
netdata_conf="/var/www/netdata/etc/netdata/netdata.conf"
|
||||||
if [ -f "$netdata_conf" ] ; then
|
if [ -f "$netdata_conf" ] ; then
|
||||||
# If there is already a [backend] section
|
# If there is already a [backend] section
|
||||||
if [ -n "$(cat $netdata_conf | grep '\[backend\]')" ] ; then
|
if [ -n "$(cat $netdata_conf | grep '\[backend\]')" ] ; then
|
||||||
|
|
Loading…
Reference in a new issue