I'm unable to aggregate some custom graphs I wrote. I know aggregation is functional, because I'm able to aggregate default plugins, but am unsure what's wrong with mine.
munin.conf:
[myapp;web-servers;0-1]
address 1.2.3.4
use_node_name yes
[myapp;web-servers;0-2]
address 5.6.7.8
use_node_name yes
[myapp;web-servers;Aggregated]
update no
#does not work:
node_aggregate.graph_args --base 1000 -l 0
node_aggregate.graph_title Aggregated connects
node_aggregate.conns.label conns
node_aggregate.conns.sum myapp;web-servers;0-1:nodejs_numberOfConnects.conns myapp;web-servers;0-2:nodejs_numberOfConnects.conns
#works:
node_aggregate.graph_title Aggregated cpu
node_aggregate.cpu.label cpu.user
node_aggregate.cpu.sum myapp;web-servers;0-1:cpu.user myapp;web-servers;0-2:cpu.user
My plugins looks like this:
if [[ "$PARAM" == "numberOfConnects" ]]; then
echo "graph_title Active Connects";
echo "graph_info Active Connects";
echo "graph_vlabel Connections";
echo "$PARAM.label conns";
echo "$PARAM.type GAUGE";
echo "$PARAM.colour 0927EB"
exit 0;
elif ...
fi
echo $PARAM.value 15
For testing purposes I can hardcode "$PARAM.value 15". I can then do
munin-run --servicedir /etc/munin/plugins nodejs_numberOfConnects
which will return numberOfConnects.value 15
And the error I get is:
==> /var/log/munin/munin-graph.log <==
2016/03/15 13:57:01 [ERROR] filename is empty for $VAR1 = {
'#%#name' => 'z1_0',
'cdef' => 'z1_0,UN,0,z1_0,IF',
'graph' => 'no',
'label' => 'z1_0'
};
, myapp;web-servers;0-1:nodejs_numberOfConnects.conns
2016/03/15 13:57:01 [ERROR] filename is empty for $VAR1 = {
'#%#name' => 'z1_1',
'cdef' => 'z1_1,UN,0,z1_1,IF,z1_0,ADDNAN',
'colour' => undef,
'draw' => undef,
'graph' => 'yes',
'label' => 'conns'
};
, myapp;web-servers;0-2:nodejs_numberOfConnects.conns