2

I configured the munin on Centos 7 and it is configured but the graph is not creating when I am going to check the current day graph it is not showing anything. I checked the log file munin-cgi-graph.log it is showing

Could not draw graph "/var/lib/munin/cgi-tmp/munin-cgi-graph/localhost/localhost/processes-pinpoint=1483825506,1483933506.png?&lower_limit=&upper_limit=&size_x=800&size_y=400"

I am using apache and munin 2.0.28. If anyone knows what is the problem please help. I am attaching the error screenshots:

enter image description here

enter image description here

chicks
  • 3,793
  • 10
  • 27
  • 36

4 Answers4

3

Make sure that /var/lib/munin/cgi-tmp/munin-cgi-graph/ is writable by web user/group. You can check with following command:

ls -l /var/lib/munin/cgi-tmp/munin-cgi-graph/

As long as you are using CentOS and Apache, you should be able to fix it with following commands:

chown -R munin:apache /var/lib/munin/cgi-tmp/munin-cgi-graph/
chmod g+w /var/lib/munin/cgi-tmp/munin-cgi-graph/

More info here: https://gist.github.com/viegelinsch/49c404b1b99a462bad4f

Additionally, you may need to change init script for munin-fcgi-graph because default configuration in package do not set permissions properly - reference:

Note, munin-fastcgi-graph should really run as user www-data (or your distrib standard httpd user), otherwise you'll open write access to the CGI process. The user www-data should be able to read the state files, the rrd and write to the cgi-tmp dir.

  • I had more problems on my munin: 1- the error reported in this topic, 2- it didn't graphic the past data without returning errors... I verified if the folder you reported existed or not... missing this directory, I created it and after restarting the service it solved the problem 2 – FABBRj Aug 24 '20 at 14:59
0

Michal Kubenka's answer got me on the right track:

chown -R munin:apache /var/lib/munin/cgi-tmp/munin-cgi-graph/
chmod g+w /var/lib/munin/cgi-tmp/munin-cgi-graph/

But I still had broken images on some graphs.

tail -f /var/log/munin/munin-cgi-graph.log

(try refreshing a broken graph)

..viewing the error shown in the log led me to the fix, which for me was a combination of having incorrect "internal names" in /etc/munin/munin.conf in some of my df.graph_order directives, plus some write-permission issues fixed by this:

chmod -R g+w /var/lib/munin/cgi-tmp/munin-cgi-graph/
0

Thanks! This in combination with https://bitsanddragons.wordpress.com/2020/04/07/fix-munin-dynamically-zoomable-graphs-not-displaying-on-centos-7-7/ solved the issue for me.

  • Please don't add "thank you" as an answer. Once you have sufficient [reputation](https://serverfault.com/help/whats-reputation), you will be able to [vote up questions and answers](https://serverfault.com/help/privileges/vote-up) that you found helpful. - [From Review](/review/late-answers/512697) – Patrick Mevzek Feb 19 '22 at 10:14
0

I needed to do the following:

chown -R munin:apache /var/log/munin/
systemctl restart httpd

and my /etc/httpd/conf.d/munin.conf looks like this:

alias /munin /var/www/html/munin
ScriptAlias   /munin-cgi/munin-cgi-graph /var/www/html/munin/cgi/munin-cgi-graph

#ScriptAlias /munin-cgi/ /var/www/html/munin/cgi/

# FastCGI
<Directory "/var/www/html/munin/cgi">
    Options +ExecCGI
    <IfModule mod_fcgid.c>
        SetHandler fcgid-script
    </IfModule>
    <IfModule !mod_fcgid.c>
        SetHandler cgi-script
    </IfModule>
</Directory>

<directory /var/www/html/munin>
    Satisfy Any
</directory>
warhansen
  • 81
  • 1
  • 7