Skip to content
William Desportes edited this page May 15, 2021 · 6 revisions

Troubleshooting

munin-fastcgi-graph fails to parse services with an extra - in them

From willt (see issue #43)

Just filed a bug repot at munin: http://munin-monitoring.org/ticket/1123 but thought I would post here also so others don't get stumped like me.

Using such plugins like: https://github.com/kjellm/munin-mysql/ allows you to monitor multiple mysql instances. Your plugin name looks like: mysql_foo and the graph it creates looks like bin_relay_log-foo. However when the scale gets attached to that it will be named bin_relay_log-foo-day.png. Munin builds the rrds just fine but the fastcgi graph fails to parse the name and fails with an error of "Weird scale foo-day". This patch fixes it. I believe the same thing should be applied to muning-cgi-graph as well.

# diff -u /var/www/html/munin/cgi/munin-fastcgi-graph.fcgi.orig    /var/www/html/munin/cgi/munin-fastcgi-graph.fcgi
--- /var/www/html/munin/cgi/munin-fastcgi-graph.fcgi.orig   2011-08-23 10:07:11.202004345 -0700
+++ /var/www/html/munin/cgi/munin-fastcgi-graph.fcgi    2011-08-23 10:25:15.118379059 -0700
@@ -72,7 +72,7 @@
        my $path = $ENV{PATH_INFO} || "";
        $path =~ s/^\///;
        ($dom, $host, $serv) = split /\//, $path;
-    ($serv, $scale) = split /-/, $serv, 2;
+    ($serv, $scale) = split /-(?!.*-)/, $serv, 2;
        $scale =~ s/\.png$//;

        if (! &verify_parameters ($dom, $host, $serv, $scale)) {

MySQL graphs do not appear on my munin-node which has MySQL installed

This might be a problem for old versions of the plugin, the newest version have no depency on Cache::Cache

Try running

/usr/share/munin/plugins/mysql_ autoconf

which asks the mysql plugin to suggest whether it can be run on this node.

Missing dependency Cache::Cache

Run

apt-get install libcache-cache-perl

Or (for Alpine users)

apk add --no-cache perl-dbi perl-cache-cache perl-ipc-sharelite perl-dbd-mysql

no (DBI connect('mysql;mysql_connect_timeout=5','root',...) failed: Access denied for user

See https://www.mbrando.com/2007/08/06/how-to-get-your-mysql-munin-graphs-working/