2

I am using an Amazon Linux distribution (a recent one). I'm trying to install munin in the local node (just one node, both node and master). So I tried:

$ sudo yum install munin munin-node httpd mod_fcgid

Then I edited /etc/munin/munin.conf:

# cgi on demand
html_strategy cgi
graph_strategy cgi

Then I activated the service:

$ sudo chkconfig munin-node on

I checked the version:

$ munin-node-configure --version
Version:
    This is munin-node-configure (munin-node) v2.0.20.
[... more text here ...]

I ensured the munin.conf had the ScriptAlias directive:

<directory /var/www/html/munin>

AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user

ExpiresActive On
ExpiresDefault M310
</directory>
ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph

I ensured the password is set to a good password:

$ sudo htpasswd -c /etc/munin/munin-htpasswd MyUser
#stdin < my password

Then I restarted the service:

$ sudo /etc/init.d/munin restart

And my httpd:

$ sudo /etc/init.d/httpd restart

But hitting /munin-cgi/munin-cgi-graph raises a 404. But this 404 is not an Apache-like 404, but a totally empty 404 error, with no content at all, as if it was given by the cgi script. The httpd error_log shows nothing.

What should I check? What's my problem?

2

Check if your apache/httpd is loading the fcgid or cgi module.

apachectl -M | grep cgi

Should respond

cgi_module (shared)

or

fcgid_module (shared)

(or both).

1

Unfortunately, by saying: "...But hitting /munin-cgi/munin-cgi-graph raises a 404..." you are not reporting the complete URL that raised mentioned 404. Please note that you need to call the munin-cgi-graph CGI with proper parameters and that those parameters will be properly validated by munin itself.

In other words, here on my side, this URL:

https://my.monitoring.server/cgi-bin/munin-cgi-graph/SAN/SAN/SAN_SW_Brocade1-pinpoint=1435589472,1435697472.png?&lower_limit=&upper_limit=&size_x=800&size_y=400

will produce following graph:

enter image description here

while this other URL:

https://my.monitoring.server/cgi-bin/munin-cgi-graph/something_random/here_and_there

will last in the 404 error you probably mentioned:

verzulli@iMac-Chiara:~$ wget https://my.monitoring.server/cgi-bin/munin-cgi-graph/something_random/here_and_there
--2015-06-30 23:02:39--  https://my.monitoring.server/cgi-bin/munin-cgi-graph/something_random/here_and_there
[....]
Richiesta HTTP inviata, in attesa di risposta... 404 Not Found
2015-06-30 23:02:40 ERRORE 404: Not Found.

verzulli@iMac-Chiara:~$

This is an intended behaviour of the munin-cgi-graph CGI. A quick look of the source code will show this:

while (new CGI::Fast) {
    # 1rst thing is to validate the URL. Only a subset of chars are allowed.
    # Return 404 if not compliant, w/o logging.
    [...]
}

Should the rendering process handled by munin-cgi-graph fail, chances are high that something will be logged in /var/log/munin/munin-cgi-graph.log (...your LOG path could be different, according to your own configuration).

As dynamic-graph-generation can be slightly tricky, you could carefully review the documentation here and here.

If problem persists, please, provide further details.

Update 1

As for the proper way to access munin web-interface, please consider that on the munin-server all the monitoring activities are launched by a cron-job (munin-cron) that starts launching a munin-update jobs and ends with a munin-html and munin-graph jobs.

The web-pages are managed by munin-html that will generate/update web pages according to the html-dir directives in the munin.conf file.

A default install could looks like:

  • munin.conf: htmldir /var/www/html/munin

that together with a default Apache install, will let your munin web-interface accessible at http://your.monitoring.server/munin


P.S.: A final personal note: even tough it might be easier to ask for support here on ServerFault, I suggest you to approach your munin/monitoring issues more organically, searching/reading ad-hoc documentation/tutorials. Even if at first it might be more challenging, I guarrantee you that in the long run you will be paid back :-)

  • I'm a n00b at Munin. Never used it before and the documentation is quote poor regardin web access. What is the first entry point? Assuming I have a webserver and munin in strategy="cgi"... what's the first url I should manually hit in the browser? – Luis Masuelli Jul 1 '15 at 15:05
  • Difficult to say without checking the CFG. Nevertheless, I guess that a simple "/munin" should be enough. Have you tried starting from there? – Damiano Verzulli Jul 1 '15 at 18:09
  • I've updated my answer so to include some details about web-interface (with also a personal advice) :-) – Damiano Verzulli Jul 1 '15 at 19:02
  • I will try. Last time I saw, visiting such url (i.e. /munin in my webserver, according to path /var/www/munin) showed me an index directory (with /static inside). – Luis Masuelli Jul 2 '15 at 17:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.