munin-monitoring / munin

Main repository for munin master / node / plugins
http://munin-monitoring.org
Other
1.97k stars 469 forks source link

Multigraph requires undue RRD when a subgraph contains a field by the same name #828

Open doublehp opened 7 years ago

doublehp commented 7 years ago

Munin version 2.0.33-1

munin-graph.log

2017/05/05 20:43:29 [WARNING] Could not draw graph "/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-year.png": /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-year.png
2017/05/05 20:43:29 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-month.png : opening '/var/lib/munin/doublehp.org/rpi-08.doublehp.org-edf_teleinformation_locataire42dtagedroit-adps-g.rrd': No such file or directory
2017/05/05 20:43:29 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-month.png' \
[...]
2017/05/05 20:43:29 [WARNING] Could not draw graph "/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-month.png": /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-month.png
2017/05/05 20:43:29 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-week.png : opening '/var/lib/munin/doublehp.org/rpi-08.doublehp.org-edf_teleinformation_locataire42dtagedroit-adps-g.rrd': No such file or directory
2017/05/05 20:43:29 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-week.png' \
[...]
2017/05/05 20:43:29 [WARNING] Could not draw graph "/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-week.png": /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-week.png
2017/05/05 20:43:29 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-day.png : opening '/var/lib/munin/doublehp.org/rpi-08.doublehp.org-edf_teleinformation_locataire42dtagedroit-adps-g.rrd': No such file or directory
2017/05/05 20:43:29 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/rpi-08.doublehp.org/edf_teleinformation_locataire42dtagedroit-day.png' \

Config:

{ echo "cap multigraph dirtyconfig" ; sleep 2 ; echo "config edf_teleinformation" ; sleep 5 ; } | telnet rpi-08-locataire-42-etage-droit 4949

multigraph edf_teleinformation_locataire42dtagedroit
graph_title EDF TIC for Locataire42EtageDroit
graph_category edf
graph_args --base 1000
graph_vtitle vtitle
graph_vlabel vlabel
graph_info Numero de serie du compteur: 49922160921 . Port serie sur rPi: /dev/ttyUSB0 .
pappavg.label PAPP
pappavg.info Puissance apparente totale en W (compteur)
multigraph edf_teleinformation_locataire42dtagedroit.abonnement
graph_title Abonnement
graph_category edf
graph_args --base 1000
graph_vtitle vtitle
graph_vlabel -
optarif.label OPTARIF
optarif.info Option tarifaire: 1=BASE 2=HC 3=EJP 4=TEMPO(BBR)
isousc.label Courant souscrit
isousc.info en A
psousc.label Puissance souscrite
psousc.info en W - diviser par 1000 pour avoir les KW
tarif1.label Prix1 kWh
tarif1.info tarif periode 1 en eur(HT)/KWh
tarif2.label Prix2 kWh
tarif2.info tarif periode 2 en eur(HT)/KWh
phasecount.label phases
phasecount.info Nombre de phases
[...]
multigraph edf_teleinformation_locataire42dtagedroit.flags
graph_title Flags
graph_category edf
graph_args --base 1000
graph_vtitle vtitle
graph_vlabel -
ptec.label PTEC
ptec.info Periode tarifaire en cours: 1='HCHC', 2='HCHP'
preavis.label Preavis
preavis.info Preavis EJP - TODO a verifier
preavis.warning 0
demain.label Demain
demain.info Couleur demain TEMPO - TODO
hhphc.label HHPHC
hhphc.info Horaires HP-HC - deprecated
motdetat.label Motdetat
motdetat.info Mot d etat - TODO a verifier
motdetat.warning 0
adps.label ADPS
adps.info ADPS or ADIRn
adps.critical 1
multigraph edf_teleinformation_locataire42dtagedroit.adps
graph_title ADPS-ADIRn
graph_category edf
graph_args --base 1000
graph_vtitle vtitle
graph_vlabel A
adps.label ADPS
adps.info ADPS or ADIRn
adps.critical 1
[...]

values:

multigraph edf_teleinformation_locataire42dtagedroit.flags
ptec.value 2
preavis.value U
hhphc.value U
motdetat.value 0
demain.value U
adps.value 0
multigraph edf_teleinformation_locataire42dtagedroit.adps
adps.value U
# locate adps | grep rrd | grep dtage
/var/lib/munin/doublehp.org/rpi-08.doublehp.org-edf_teleinformation_locataire42dtagedroit-adps-adps-g.rrd
/var/lib/munin/doublehp.org/rpi-08.doublehp.org-edf_teleinformation_locataire42dtagedroit-flags-adps-g.rrd

What is 100% sure for me: Munin is complaining about missing rrd for field ADPS, to graph main png for the plugin, while the config of plugin does not talk about this field.

What I have found with time, but I am not 100% certain for now: this SEEMS to happen when a subgraph contains a field which has the same name as the subgraph: "multigraph edf_teleinformation_locataire42dtagedroit.adps" mentions field "adps.label ADPS"

NB: in future messages, locataire42dtagedroit will be renamed locataire42etagedroit.

Issue persists even after changing adps.label ADPS to adpss.label ADPS. Where is the dep tree stored ?

doublehp commented 6 years ago

I have found a similar case. This plugin conf:

                echo "multigraph weather_wtrr_villers"
                echo "graph_title Weather wtrr_villers";
                echo 'graph_vtitle °C';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "temp_min.label Min temperature";
                echo "temp_max.label Max temperature";
                echo "alarm.label Alarm (no data)"
                echo "alarm.critical 0.5"

                echo "multigraph weather_wtrr_villers.temp"
                echo "graph_title Temperature";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo 'graph_vtitle °C';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "temp_min.label Min temperature";
                echo "temp_max.label Max temperature";

                echo "multigraph weather_wtrr_villers.rain"
                echo "graph_title Rain";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo 'graph_vtitle mm';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "rain.label Rain";

                echo "multigraph weather_wtrr_villers.wind"
                echo "graph_title Wind";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo "graph_vtitle km/h";
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "wind.label Wind";

                echo "multigraph weather_wtrr_villers.visu"
                echo "graph_title Visibility";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo "graph_vtitle km";
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "visibility.label Visibility";

randomly produces this error (note that it randomly complains alternately between rain and wind):

# tail -n 6000 munin-graph.log | grep -i err | grep weather_wtrr -A1
2017/11/28 20:27:32 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:27:32 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:27:32 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:27:32 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:27:32 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:27:32 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:27:55 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-month.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory
--
2017/11/28 20:33:16 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:33:16 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:33:16 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:33:16 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:33:16 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:33:16 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:33:56 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-day.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory
--
2017/11/28 20:37:35 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:37:35 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:37:35 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:37:35 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:37:35 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:37:35 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:37:56 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-week.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory
--
2017/11/28 20:42:43 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:42:43 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:42:43 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:42:43 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:42:43 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:42:43 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:42:56 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-year.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory
--
2017/11/28 20:47:38 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:47:38 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:47:38 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:47:38 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:47:38 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:47:38 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:47:53 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-week.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory
--
2017/11/28 20:52:31 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-rain-g.rrd': No such file or directory
2017/11/28 20:52:31 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-day.png' \
2017/11/28 20:52:31 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:52:31 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-month.png' \
2017/11/28 20:52:32 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png : opening '/var/lib/munin/doublehp.org/leon-02.doublehp.org-weather_wtrr_villers-wind-g.rrd': No such file or directory
2017/11/28 20:52:32 [RRD ERROR] rrdtool 'graph' '/var/cache/munin/www/doublehp.org/leon-02.doublehp.org/weather_wtrr_villers-week.png' \
2017/11/28 20:52:45 [RRD ERROR] Unable to graph /var/cache/munin/www/doublehp.org/leon-03.doublehp.org/slab/reclaim-week.png : opening '/var/lib/munin/doublehp.org/leon-03.doublehp.org/slab-reclaim-slab_unreclaimable-g.rrd': No such file or directory

and after this small changes, it all works fine (adding one letter to the sub-grah name).

                echo "multigraph weather_wtrr_villers"
                echo "graph_title Weather wtrr_villers";
                echo 'graph_vtitle °C';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "temp_min.label Min temperature";
                echo "temp_max.label Max temperature";
                echo "alarm.label Alarm (no data)"
                echo "alarm.critical 0.5"

                echo "multigraph weather_wtrr_villers.temp"
                echo "graph_title Temperature";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo 'graph_vtitle °C';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "temp_min.label Min temperature";
                echo "temp_max.label Max temperature";

                echo "multigraph weather_wtrr_villers.rainn"
                echo "graph_title Rain";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo 'graph_vtitle mm';
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "rain.label Rain";

                echo "multigraph weather_wtrr_villers.windd"
                echo "graph_title Wind";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo "graph_vtitle km/h";
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "wind.label Wind";

                echo "multigraph weather_wtrr_villers.visu"
                echo "graph_title Visibility";
                echo "graph_info Values are read from the website ${weather_wttr_villers_URL}"
                echo "graph_vtitle km";
                echo "graph_args --base 1000";
                echo "graph_category weather";
                echo "visibility.label Visibility";

... once again, it looks like munin has troubles when a field has the same name as a plugin.

Note that in the present case, all sub-plugins were graphed correctly; the graph that was not drawn was the parent image on main page.

Initially, a previous version of the plugin was working fine, with same sub-plugins names, but different field names. Plugin broke after changing echo "humidity.label Rain"; into echo "rain.label Rain";

In other words, renaming a field in a sub-graph to give it the name of the sub-plugin itself ... broke the parent image.

I am not creating a different bug report because I believe it's the same root problem.

shtrom commented 5 years ago

Same issue here:

graph_title Uplink usage for xxx
graph_category network
graph_vlabel bytes
graph_period hour
usage.label Total usage
usage.draw AREA
usage.colour 77FF6F
usage.extinfo NBN FTTP Gold 500; rollover: 2019-04-18
usage.critical 500000000000
usage.warning 375000000000.00
ideal.label Ideal usage
ideal.colour FFA500

multigraph internode_usage_xxx.main
graph_title Uplink usage for xxx
graph_category network
graph_vlabel bytes
graph_period hour
usage.label Total usage
usage.draw AREA
usage.colour 77FF6F
usage.extinfo NBN FTTP Gold 500; rollover: 2019-04-18
usage.critical 500000000000
usage.warning 375000000000.00
ideal.label Ideal usage
ideal.colour FFA500

multigraph internode_usage_xxx.rate
graph_title Usage rate for xxx
graph_category network
graph_vlabel bytes
graph_period hour
rate.label Usage rate
rate.type COUNTER

Note the rate subgraph has a rate field.