Steps to configure Nagiosgraph with Nagios Core

nagios-core-logoNagios Core is an Open Source system and network monitoring application. It watches hosts and services that you specify, alerting you when things go bad and when they get better. Nagios Core was originally designed to run under Linux, although it should work under most other unices as well. In this post we can get some basic Nagiosgraph functionality for our monitoring server as follows:

1. First up all we have to download the latest version of Nagiosgraph from its website at, directly onto your monitoring server, using a tool such as wget:

2. After the download completes then inflate the .tar.gz file and change to the directory within it:

3. Nagiosgraph requires some dependency application to run. As the root user, run the  script with the  --check-prereq  option. This will give you a survey of any dependencies you may need to install via packages or CPAN. When you have installed all the prerequisites, the output should look similar to the following code snippet:

These are all reasonably standard Perl libraries, so don’t forget to check if packages are available for them before you resort to using CPAN. For example, I was able to install the RRDs and GD modules on my Debian system as follows:

If you are having trouble getting to find your Nagios Core or Apache HTTPD instances, then take a look at the output of –help to run an installation specific to your kind of system. This is documented in more detail in the INSTALL file.

4. After getting the sucessfull message from ./ --check-prereq command  now we will move forwar to install the nagiosgraph on the machine. As the root user, run the  script with the  --install  argument. You will be prompted many times for directory layout options. The default is shown in square brackets and should be correct for a typical Nagios Core installation, so to start with, simply press Enter on each option. If you are an advance user of Nagios or you have installed Nagios in any other location then you can modify the path values during the nagiosgraph installation.

After the preceding selections are all made, the files should be installed with appropriate permissions set. The final part of the output gives instructions for adding configuration to Nagios Core and Apache HTTPD, which we’ll do next.

5. Now we will edit some nagios configuration files to make nagiosgraph functional. Change to the Nagios Core configuration directory. As per the quick start guide installation the default nagios configuration location should be : /usr/local/nagios/etc .

6. Now we will edit the core configuration file of nagios to append some values to it. Edit the core configuration file nagios.cfg, and add the following directives at the end of the file:

7. Now move to the Nagios Core objects configuration directory. As per the quick start guide installation the default nagios core object configuration location should be :  /usr/local/nagios/etc/objects  .

8. Edit the commands.cfg file, and add the following command definition:
# command to process nagios performance data for nagiosgraph

9.  After installing the nagiosgraph you should have an Apache configuration file for nagiosgraph inside the  /usr/local/nagiosgraph/etc/  directory.  We have to include that file to our Apache configuration file to make it functional. Edit the httpd.conf file for your Apache HTTPD server to include the following line at the end:

In a local install of Apache HTTPD, this file is normally in /usr/local/apache/conf/httpd.conf, but its location varies by system. On Debian-derived systems it may be /etc/apache2/apache2.conf.

10. Validate the configuration of both the Apache HTTPD server and the Nagios Core server, and restart them both:

Make sure that your SELiux should be in Disabled or Permissive mode to work nagiosgraph properly.

11. Visit http://<Your Nagioshost>/nagiosgraph/cgi-bin/showconfig.cgi in your browser, substituting your own Nagios Core server’s hostname, to test that everything’s working. You should see a long page with configuration information for Nagiosgraph:

12. If everything is working up to this point, the only thing left to do is to define an action URL for the services that you want to graph, so that you can click to go directly to the graphs for that service from the Nagios Core web interface. The tidiest and most straightforward way to do this is to define a service template. Edit the templetes.cfg file to append the new service template inside it.

Append the below code to the bottom of that file.

Then, you can have the services you want graphed inherit from it, as well as from any other templates they use, by adding nagiosgraph to the value for the use directive:

You should do this for all the services for which you want graphing.

13. Validate the configuration and restart the Nagios Core server again:

With this done, visiting the Service section of the web interface should include action icons after each graphed service:

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS
The following two tabs change content below.

Tapas Mishra

Sr. Engineer (DevOps)
Loves to work on Opensource products. Having experience on Linux environment. Knowledge on Public cloud services like AWS, Rackspace, DigitalOcean, Linode. Please don't hesitate to give a comment on the posts. Your comments are my strength.

95 thoughts on “Steps to configure Nagiosgraph with Nagios Core

  1. this line when defining a service on a templet gives me error ‘ice=$SERVICEDESC$’
    and i dont know what it means
    Error: Invalid service object directive ‘ice=$SERVICEDESC$’

  2. thank you, i have also fixed that but now i have another problem, i get an empty graph with only x and y values, i followed excatly your steps. would you please help me with that…

  3. Thank you, great tutorial. I did spend about 1/2 hour trying to figure out why nothing was going into the rrd directory. I had to turn on nagios verbosity and set the debug level to figure it out.

    In Step 6 you have:


    and in Step 8 you have:

    define command {
    command_name process-service-perfdata-for-nagiosgraph
    command_line /usr/local/nagiosgraph/bin/

    Note the small typo in Step 6 missing the “-” between perfdata and for. Updating that will hopefully save someone else some time (if they don’t bother looking at the comments here).

    Again. Great tutorial. Works pretty much verbatim.

  4. Hi ,
    Just tried it on Centos 6.4 and it does not work
    I’ve replaced /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf with /etc/nagiosgraph/nagiosgraph-apache.conf ..
    I get this message “:You don’t have permission to access /nagiosgraph/ on this server.”
    If you have any idea on how to fix it please help

    • Hi,

      Sorry for the late response. Can you exactly mention what is not working for you? Why you are trying to replace the nagiosgraph-apache.conf? However use sudo with mv or cp command if you are a sudo user to replace the file.


  5. I have followed exactly your steps and I am getting
    show.cgi critical No data in rrd directory /usr/local/nagiosgraph/var/rrd

    Please tell me the whats going wrong

    • Hi Akki,

      It seems the issue might be due to problem in rrd installation or due to wrong permission. Can you please paste the out put of the "./ --check-prereq". Also Please mention your OS name and version, Nagios Core version along with the Nagiosgraph.


  6. Hi Tapas,
    Thank you for sharing this. Great work.
    One quick question; i have defined two services here. I assume that it will only plot data from services that i want to graph.

    # check ping availability of servers
    define service{
    use generic-service
    hostgroup_name servers
    service_description Ping
    check_command check_ping!100.0,20%!500.0,60%

    # check ping availability of servers and plot into nagiosgraph
    define service{
    use generic-service,nagiosgraph
    hostgroup_name servers
    service_description Ping-with-graph
    check_command check_ping!100.0,20%!500.0,60%

    However, it looks like the nagiosgraph will still plot data from the other services too (without nagiosgraph).

    -rw-r–r– 1 nagios nagios 94768 Dec 12 10:36 Ping-with-graph___pl.rrd
    -rw-r–r– 1 nagios nagios 94768 Dec 12 10:36 Ping-with-graph___rta.rrd
    -rw-r–r– 1 nagios nagios 94768 Dec 12 10:36 Ping___pl.rrd
    -rw-r–r– 1 nagios nagios 94768 Dec 12 10:36 Ping___rta.rrd

    Do you have any idea on how to control this?
    Thank you again. This is really a cool work! 🙂

  7. Hi Tapas thanks for the reply here is my output :-

    Version :- nagios-3.4.4
    OS:- Fedora 8 x86_64

    ./ –check-prereq:-

    checking required PERL modules
    checking optional PERL modules
    checking nagios installation
    found nagios at /usr/local/nagios/bin/nagios
    checking web server installation
    found apache at /usr/sbin/httpd

    • Hi Akki,

      Seems all the dependency modules are installed. Please check the permission of the folders else, email me the log files. My email id is


  8. Hi Tapas,
    I got my answer to my earlier question. For some reason, i would like to graph certain services only.
    So, at first i simply used the one that you post:

    define service {
    use generic-service,nagiosgraph

    where i did not noticed that the generic-service has a parameter called process_perf_data set to value 1. So, i changed the value to 0 and created a new one:
    define service{
    use generic-service-perfdata,nagiosgraph

    Now i can plot graphs for certain services only. Thank you very much again for your tutorial 🙂

  9. Hi i have successfully deployed nagiosgraph as per your guide. the issue is i’m not able to see any statistics on the graph, it is just coming blank..

  10. Hi,
    I’m trying to get nagiosgraph working on my FreeBSD box running nagios core 3.5
    i installed nagiosgraph via ports which seems to been done correctly. I now have a nagiosgraph directory in my /usr/local/etc/nagios/ directory.

    im following you guide and I can do all the steps except inserting the Include /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf line in my http.conf file. I do not seem to have a file called nagiosgraph-apache.conf.

    any ides?

    • Hi Tony,

      The file nagiosgraph-apache.conf should reside inside nagiosgraph/etc directory or you can find it using find command find /usr/local/ --name nagiosgraph-apache.conf.


  11. Hi,

    Thanks for the quick reply. there is no /etc directory in my nagiosgraph dir. also tried searching for the file with a locate cmd but no luck..

    • Hi Tony,

      During nagiosgraph installation it should ask you for the Location of configuration files (etc-dir)? [/usr/local/nagiosgraph/etc] did you entered any custom location for it? However you can reinstall the nagiosgraph and chose the default option by simply pressing enter. Drop me an email tapas.mishra@linuxfunda.comif you will face any difficulties further.


  12. Hi tapas thank you for this tutorial I’m trying to follow all the steps above apparently when I try to visit the site and check if it works I got this on my page

    Not Found

    The requested URL /nagios3//nagiosgraph/cgi-bin/showconfig.cgi was not found on this server.
    Apache/2.2.22 (Ubuntu) Server at Port 80

    I don’t know if I did something wrong or I need to change something I’m just new in here, any advise please! thank you very much!


    • Hi James,

      As per your described error, you are trying to access the cgi file through the URL http://nagioshost/nagios3//nagiosgraph/cgi-bin/showconfig.cgi whereas it should be look like this http://nagioshost/nagiosgraph/cgi-bin/showconfig.cgi. Please let me know if you still have any problems.


      • Hi Tapas,

        Thank you for your response I’m sorry seems my question is not clear I use this http://nagioshost/nagiosgraph/cgi-bin/showconfig.cgi to test if it is working but I got the error The requested URL /nagios3//nagiosgraph/cgi-bin/showconfig.cgi was not found on this server.
        Apache/2.2.22 (Ubuntu) Server at Port 80 and the page not found,

        Can you please give me short explanation of step 5 and step 7 it seems that I got confuse a little because I don’t have the directory /usr/local/nagios/etc and /usr/local/nagios/etc/objects aside from that two I’m sure everything is exactly same. but I have the Directory /usr/local/nagiosgraph/etc

        thank you very much!


  13. Hi Tapas,,

    thank for his tutorial’s, i’ve follows all steps on it..

    the problem is ; when i try to acces http: myserver/nagiosgraph/cgi-bin/showconfig.cgi

    error 403 show up ( you don’t have permision to access)

    can you help me ??


  14. hi tapas..
    my nagiosgraph-apache.conf :

    # enable nagiosgraph CGI scripts
    #ScriptAlias /nagios/cgi-bin “/usr/lib64/nagios/cgi-bin”
    # Options ExecCGI
    # AllowOverride None
    # Order allow,deny
    # Allow from all
    # enable nagiosgraph CSS and JavaScript
    #Alias /nagios “/usr/local/nagios/share”
    # Options None
    # AllowOverride None
    # Order allow,deny
    # Allow from all

    please verify ,


  15. Hi Tapas ,,

    need some help again 🙂

    i’ve solved my last issue,,,

    and now, when i try to graph some host, java script disable and nagiosgraph.js wrong version show up


  16. Hi Tapas Mishra,

    Thanks for your greate tutorial.

    I configure nagiosgraph succesfully without any issues.
    At last 2 steps i have confusion.

    i created a templates.cfg file in /usr/local/nagios/etc/ location
    and added cfg_file=/usr/local/nagios/etc/templates.cfg in nagios.cfg file

    added 12 step first parameters in templates.cfg and second parameters in my service file
    then, when i am checking my config file throwing error as..

    Error: Invalid service object directive ‘action_url’.
    Error: Could not add object property in file ‘/usr/local/nagios/etc/templates.cfg’ on line 3

    Kusuma Suresh

    • Hi Suresh,

      You should have a templete.cfg file inside /usr/local/nagios/etc/object folder. Edit that file and append the code
      define service {name nagiosgraphaction_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$register 0}

      In your service file just replace the line use generic-service with use generic-service,nagiosgraph


  17. Dear Tapas

    Thanks for sharing this article, i am getting below error after installations

    i ran http://localhost/nagios/cgi-bin/showconfig.cgi

    below content showing on webpage

    nagiosgraph configuration on nagios

    23 Feb 2014 15:24:53 AST
    PERL modules

    Carp: 1.11
    CGI: 3.51
    Data::Dumper: 2.124
    File::Basename: 2.77
    File::Find: 1.14
    MIME::Base64: 3.08
    POSIX: 1.17
    RRDs: 1.3008
    Time::HiRes: 1.9721
    GD: 2.44
    nagiosgraph ok
    version: 1.4.4
    nagiosgraph.conf: ok
    RRD directory: ok
    log file: fail file does not exist
    CGI log file: fail file does not exist
    map file: ok

    • Hi Haneef,

      Please reinstall the nagiosgraph issuing the command ./ --install and chose the default options. Don’t modify the options. It should finally show you like below configuration:
      configuration:  ng_layout            standalone  ng_prefix            /usr/local/nagiosgraph  ng_etc_dir           /usr/local/nagiosgraph/etc  ng_bin_dir           /usr/local/nagiosgraph/bin  ng_cgi_dir           /usr/local/nagiosgraph/cgi  ng_doc_dir           /usr/local/nagiosgraph/doc  ng_examples_dir      /usr/local/nagiosgraph/examples  ng_www_dir           /usr/local/nagiosgraph/share  ng_util_dir          /usr/local/nagiosgraph/util  ng_var_dir           /usr/local/nagiosgraph/var  ng_rrd_dir           /usr/local/nagiosgraph/var/rrd  ng_log_dir           /usr/local/nagiosgraph/var  ng_log_file          /usr/local/nagiosgraph/var/nagiosgraph.log  ng_cgilog_file       /usr/local/nagiosgraph/var/nagiosgraph-cgi.log  ng_url               /nagiosgraph  ng_cgi_url           /nagiosgraph/cgi-bin  ng_css_url           /nagiosgraph/nagiosgraph.css  ng_js_url            /nagiosgraph/nagiosgraph.js  nagios_cgi_url       /nagios/cgi-bin  nagios_perfdata_file /tmp/perfdata.log  nagios_user          nagios  www_user             apache  modify_nagios_config n  nagios_config_file  nagios_commands_file  modify_apache_config n  apache_config_dir  apache_config_file
      Press enter to finish the installation and verify the showconfig.cgi again.


  18. Hi, I’ve installed Nagiosgraph as you showed in your manual. I’ve added new template in my templates.cfg file (/usr/local/nagios/etc/objects/templates.cfg). I’ve added this template in my hosts’ services definitions (/usr/local/nagios/etc/objects/taiwa/TAIWA.cfg), so it looks:
    define service{
    use generic-service, nagiosgraph
    hostgroup_name TAIWA
    service_description DISK Load C
    check_command check_nrpe!DISK Load C
    notification_options w,c,r
    active_checks_enabled 0
    passive_checks_enabled 1

    when I run /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.conf for check my configuration, I get error:

    Error: Template ‘nagiosgraph’ specified in service definition could not be not found (config file ‘/usr/local/nagios/etc/objects/taiwa/TAIWA.cfg’, starting on line 672)”

    Did I miss something?

    • Hi Marcin,

      Seems your templates.cfg file is not included in nagios.cfg file. That’s why you are getting the error "Template ‘nagiosgraph’ specified in service definition could not be not found". Otherwise make sure that the server “nagiosgraph” is properly written in templates.cfg.


      • Hi, thanks for reply. I found the issue, acctually error was sth like: “Template ‘ nagiosgraph’ specified in…”. I used in service declaration:
        “define service{
        use generic-service, nagiosgraph


        it should be:
        “define service{
        use generic-service,nagiosgraph


        Without ” ” before “,” 😉

  19. Hi Sir,

    before anything else thank you very much for this tutorial, I believe you can help me with this, I followed everything in the video and I believe I’m almost done with the graph but when I tried to visit the page localhost/nagiosgraph/cgi-bin/showconfig.cgi I got Internal Server error but even I didn’t get the correct page yet I tried to continue and on my nagios webpage I manage to show the graph Icon beside status column but when I click on it,it gives same error it didn’t give any graph can please help me with this, what do you think I miss or did wrong.

    thank you very much

  20. Hi Sir
    what I found while troubleshooting this I found the file “httpd.conf” and when I tried to include the file “include /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf” save and restart the “service httpd restart” I got this warning

    [root@localhost nagios]# service httpd restart
    Stopping httpd: [ OK ]
    Starting httpd: [Thu Mar 20 12:16:48 2014] [warn] The ScriptAlias directive in /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf at line 2 will probably never match because it overlaps an earlier ScriptAlias.
    [Thu Mar 20 12:16:48 2014] [warn] The Alias directive in /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf at line 10 will probably never match because it overlaps an earlier Alias.
    [ OK ]

    and when I try to restart the “/etc/init.d/apache restart” [root@localhost nagios]# /etc/init.d/apache restart
    bash: /etc/init.d/apache: No such file or directory

    that’s what I got can you help me please thank you

    • Hi James,

      Please check your httpd configuration files. It seems you have included the nagiosgraph-apache.conf earlier to the httpd configuration files. Please verify and remove the duplicate.


  21. Hi, I’m using nsca for monitoring Serwers via active checks and nrpe for monitoring PC/NB hosts via passive checks. When I configured it nagiosgraph is getting informations only from active checked hosts, what should I do for passive checks? Files at rrd directory arent updated (only for passive checked gosts).

    • Hi Marcin,

      I have never tried nagiosgraph for passive check hosts. However, I think this should work for the passive checks too. Please verify it by creating a new service defination like below:
      define service{    name                          graph-service                 ; The 'name' of this service template    use                           nagiosgraph                   ; NagiosGraph Template    active_checks_enabled         1                             ; Active service checks are enabled    passive_checks_enabled        1                             ; Passive service checks are enabled/accepted}

      Inherit the graph-service service definition instead of nagiosgraph in the host definition file. Let me know if it works for you.


      • Hi,
        I’ve got passive-tpl which I created a few days ago:

        define host{
        name passive-tpl ; Nazwa szablonu
        use generic-host ;
        check_period 24×7 ; Okres sprawdzania hostów, np. 24×7, workhours
        check_interval 5 ; Czas następnego sprawdzenia [min]
        retry_interval 1 ; Jeśli są problemy z połączeniem do hosta, interwał monitorowania zmniejszamy
        max_check_attempts 3 ; Maksymalna liczba prób monitorowania hosta
        check_command check-host-alive; Sprawdzenie czy host jest włączony
        flap_detection_enabled 0 ; Flap detection is enabled
        notification_period 24×7 ; Send host notifications at any time
        notification_interval 30 ; odstep pomiędzy powiadomieniami [min]
        #notification_options d, r ; Powiadomienie gdy pojawi się gdy host będzie w stanie d (DOWN) ;ub r (OK)
        contact_groups admins ; Osoby, do których zostanie wysłąne powiadomienie
        active_checks_enabled 1 ; Aktywne sprawdzanie hostów – 0 (DISABLED), 1 (ENABLED)
        passive_checks_enabled 1 ; Pasywne sprawdzanie hostów – 0 (DISABLED), 1 (ENABLED)

        so if I add nagiosgraph after generic-host it should be ok? Or do I have to create new service template as you mentioned abowe and follow your instructions?

        And my nagiosgraph service is:

        define service{
        name nagiosgraph
        action_url /nagiosgraph/cgi-bin/show.cgi?host=$HOSTNAME$&service=$SERVICEDESC$’ onMouseOver=’showGraphPopup(this)’ onMouseOut=’hideGraphPopup()’ rel=’/nagios/cgi-bin/showgraph.cgi?host=$HOSTNAME$&service=$SERVICEDESC$&period=week&rrdopts=-w+450+-j&geom=634×80
        register 0

        • Hi Marcin,

          You should create a different template for passive check. Where you should put the value active_checks_enabled 0; and passive_checks_enabled 1;. Please try once by modifying the template and see if it works for you. Right now I don’t have a machine installed with nagios to do R&D. 🙁


          • Hi, acctually Nagios graph is collecting data for some active and passive hosts. But many of the other hosts doesn’t have graphs, in the log I can see:
            “Tue Apr 1 20:55:35 2014 error RRDs::update ERR /usr/local/nagiosgraph/var/rrd/SQL/D%3A%5C%20Drive%20Space___d%3A%5C%20Used%20Space.rrd: conversion of ‘38,28’ to float not complete: tail ‘,28′”

            What can I do? Can you help me? 🙂

          • Hi Marcin,

            rrdtool doesn’t support comma as a decimal separator. But you are getting the output from the nagios plugin with comma as a decimal separator 38,28. You should adjust the nagios plugin output so that it uses a period rather than a comma as the decimal separator.


  22. Hi Tapas,

    we configured nagios graph but when we try to access graph from nagios core i get error “No data in rrd directory /usr/local/nagiosgraph/var/rrd”, Do you know what could be the problem. Permission of the folder is everything is fine.


    • Hi Sagar,

      Please verify again the permissions. The nagios user must be able to write to the rrd directory. The nagios user must be able to write to the nagiosgraph log file. The web server user must be able to write to the nagiosgraph cgi log file. If the web server user does not have permission to modify the log file, nagiosgraph cgi logging will end up in the web server error log. In nagiosgraph.conf, set debug_insert=5 then look at the nagiosgraph log file. You should see messages from Ensure that is being called as expected, either periodically by Nagios or in a loop. Verify by disabling the SElinux.

      Please let me know if the problem is still there. Send me an email with log files to


  23. Hi Sir Tapas

    Thank you very the great Tutorial, I try to follow you instruction above and it seems I all the steps correct, I setup a CentOS 6.4 for my Nagios server apparently when I test to check if I get the installation correct I have this page, I tried this this one twice already I don’t know what I did wrong or what I didn’t do please advise. Thank you very very much in advance


    when I tried to visit this I got the error below

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.
    Apache/2.2.15 (CentOS) Server at localhost Port 80

  24. Hi Sir Tapas after permanently disabling the SELinux and restarting the server the magic happen.

    Thanks a lot!


  25. Hi Tapas
    It’s a nice tutorial i used this tutorial to install and configure nagiosgraph.. it was very easy . It is working fine for some hosts and some services like in my nagios server i have 366 hosts but in rrd directory for around 7 hosts there is no directory created (i mean no rrd file and no directory for those hosts)…..and for services like check_proc for localhost there is no rrdfile created .. can u please suggest me to solve this problem…


  26. If your getting 403’s when accessing the folder, check if your running Apache 2.4. They changed the requirements in that and now you need to use:

    Require all granted

    instead of the

    Order allow,deny
    Allow from all

    Hope that helps someone.

  27. Can anyone one assist me with this?

    Not Found

    The requested URL /nagios/cgi-bin/showconfig.cgi was not found on this server.
    Apache/2.4.7 (Ubuntu) Server at localhost Port 80

    • Hi Matt,

      Sorry for the late reply. You are trying a wrong URL. You should try with http://Your Nagioshost/nagiosgraph/cgi-bin/showconfig.cgi. If you still have problems with your configuration then please email me I will try to help out you.


  28. Has anyone run into and got by the error nagios::config **FAIL**? This is proving to be extremely difficult to get past.

  29. hi,
    i have some problem as bob

    ./ –check-prereq
    checking required PERL modules
    checking optional PERL modules
    Nagios::Config… ***FAIL***
    checking nagios installation
    found nagios exectuable at /usr/local/nagios/bin/nagios
    found nagios init script at /etc/init.d/nagios
    checking web server installation
    found apache executable at /usr/sbin/apache2
    found apache init script at /etc/init.d/apache2

  30. Hi, is GD and Nagios::Config module essential to get the graph show out? I follow all your steps, but my showconfig.cgi return me status that i have not installed the optional two mentioned GD and Nagios::Config perl packages .

    • Hi Chrislynn,

      Yes you need to install those perl modules. ./ --check-prereq will show you the information about installed and required perl modules. You can install those modules using apt-get / yum or CPAN.


  31. Hello Tapas,

    could you please help with following problem:

    I have installed Nagiosgraph following your instruction and got stuck on step 11:
    http://Your Nagioshost/nagiosgraph/cgi-bin/showconfig.cgi.

    I get this message:


    You don’t have permission to access /nagiosgraph/cgi-bin/showconfig.cgi on this server.

    Apache/2.4.7 (Ubuntu) Server at Port 80.

    In /var/log/apache2 i issue command tail error.log and get this:

    [Mon Oct 20 10:09:18.065754 2014] [authz_core:error] [pid 1138] [client] AH01630: client denied by server configuration: /usr/local/nagiosgraph/cgi/showconfig.cgi

    Regarding my system, the details are as follows:

    I installed nagiosgraph on Ubuntu 14.04 which is Virtual Box.

    My network settings in this virtual ubuntu is like this:


    Rule 1: TCP Protocol
    HOST PORT : 80
    GUEST PORT: 80

    Rule 2
    TCP Protocol
    HOST PORT : 22
    GUEST PORT: 22

    Also i issue command ls -la /usr/local/nagiosgraph and get this (cgi folder is fully accessible rwxrwxrwx)

    root@ubuntubox:/var/log/apache2# ls -la /usr/local/nagiosgraph
    total 40
    drwxr-xr-x 10 root root 4096 окт 17 17:09 .
    drwxr-xr-x 12 root root 4096 окт 17 17:09 ..
    drwxr-xr-x 2 root root 4096 окт 17 17:09 bin
    drwxrwxrwx 2 root root 4096 окт 17 17:09 cgi
    drwxr-xr-x 2 root root 4096 окт 17 17:09 doc
    drwxr-xr-x 2 root root 4096 окт 17 17:09 etc
    drwxr-xr-x 2 root root 4096 окт 17 17:09 examples
    drwxr-xr-x 2 root root 4096 окт 17 17:09 share
    drwxr-xr-x 2 root root 4096 окт 17 17:09 util
    drwxr-xr-x 4 root root 4096 окт 17 17:09 var

    Could you please advise?

    Thank you in advance!

  32. Hello, could you please help me?
    I followed all the steps but I get empty graphs 🙁
    I have installed Nagios core from source, could it be the problem?

    • Hi Jacky,

      First check the rrd folder that the rrd files are generating or not. Please check that the services are sending perfdata. If they are not sending the perfdata then you will get a empty graph. Let me know if you still have doubt.


    • If you installed Nagiosgraph recently, remember you need to wait about 30-45min to Nagiosgraph generate graphs. It may depend with your monitoring configuration e.g. if you set checks runs with 1h break your graphs may generate much later 😉

    • For 403 you need to disable SELinux on the box. See the apache configuration make the below change
      Put – Allow from all
      instead of – Order allow,deny
      Let me know if you are still facing 403 issue.

  33. Great how to!
    I am having a small problem, after adding Include /usr/local/nagiosgraph/etc/nagiosgraph.conf in the /etc/httpd/conf/httpd.conf and when I check the syntax service httpd configtest, I get this error:
    AH00526: Syntax error on line 11 of /usr/local/nagiosgraph/etc/nagiosgraph.conf:
    Invalid command ‘logfile’, perhaps misspelled or defined by a module not included in the server configuration

    any idea how to fix it?

    Note: during the installation I change the default user from nagios to nagiosadmin


  34. its fixed, I pointed the Include /usr/local/nagiosgraph/etc/nagiosgraph-apache.conf to the correct files.. great HOW TO again!!! thank you 🙂

Leave a Reply