Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: How to install PNP for Shinken 2.0?

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    23

    How to install PNP for Shinken 2.0?

    Hi all,

    how PNP is to be installed and configured for Shinken 2.0?

    Here is what I did so far (on a Debian system):

    (1) Installed pnp4nagios:

    Code:
    #> apt-get install pnp4nagios-bin
    (2) Changed the the path of "config_file" in "/etc/shinken/modules/npcdmod.cfg"

    Code:
    ## Module:   NPCDMOD
    ## Loaded by:  Broker
    # Module to send host and service perfdata to a NPCD daemon, which makes the
    # data available to PNP4Nagios.
    define module {
      module_name   NPCDMOD
      module_type   npcdmod
      config_file   /etc/pnp4nagios/npcd.cfg ; Set to your value
    }
    (3) Installed some Shinken stuff:

    Code:
    #> shinken install ui-pnp
    #> shinken install npcdmod
    (4) Changed the RUN variable in "/etc/default/npcd" to "yes":

    Code:
    # Default settings for the NPCD init script.
    
    # Should NPCD be started? ("yes" to enable)
    RUN="yes"
    
    # Additional options that are passed to the daemon.
    DAEMON_OPTS="-d -f /etc/pnp4nagios/npcd.cfg"
    (5) Started NPCD:

    Code:
    /etc/init.d/npcd start
    (6) And activated NPCDMOD in broker.cfg:

    Code:
    modules   Livestatus,Simple-log,WebUI,NPCDMOD
    Code:
    #> /etc/init.d/shinken-broker restart


    (7) In "/etc/shinken/modules/webui.cfg" PNP_UI is activated too (by default):

    Code:
    modules       Apache_passwd, ActiveDir_UI, Cfg_password, PNP_UI, Mongodb, Glances_UI
    So far so good, but the magic is not happening I don't see any graphs - even no empty ones. What did I miss?

    Regards,
    Juergen

  2. #2
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,130

    Re: How to install PNP for Shinken 2.0?

    Look at your npcd daemon log if it's reading the perfdata spool files
    No direct support by personal message. Please open a thread so everyone can see the solution

  3. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    23

    Re: How to install PNP for Shinken 2.0?

    In the log file I find the following:

    Code:
    ...
    [03-07-2014 12:27:44] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-07-2014 12:27:44] NPCD: ThreadCounter 0/5 File is .
    [03-07-2014 12:27:44] NPCD: ThreadCounter 0/5 File is ..
    [03-07-2014 12:27:44] NPCD: No more files to process... waiting for 15 seconds
    [03-07-2014 12:27:59] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-07-2014 12:27:59] NPCD: ThreadCounter 0/5 File is .
    [03-07-2014 12:27:59] NPCD: ThreadCounter 0/5 File is ..
    [03-07-2014 12:27:59] NPCD: No more files to process... waiting for 15 seconds
    [03-07-2014 12:28:14] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-07-2014 12:28:14] NPCD: ThreadCounter 0/5 File is .
    [03-07-2014 12:28:14] NPCD: ThreadCounter 0/5 File is ..
    [03-07-2014 12:28:14] NPCD: No more files to process... waiting for 15 seconds
    [03-07-2014 12:28:29] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-07-2014 12:28:29] NPCD: ThreadCounter 0/5 File is .
    [03-07-2014 12:28:29] NPCD: ThreadCounter 0/5 File is ..
    [03-07-2014 12:28:29] NPCD: No more files to process... waiting for 15 seconds
    ...
    So there is no data to process.

    I checked my host and service definitions, they have the directive "process_perf_data 1" enabled:

    Code:
    define host{
        use           linux
        contact_groups     admins
        host_name        myhost
        address         myhost
    
        process_perf_data    1
        }
    
    define service{
        service_description   Load_nrpe
        host_name        myhost
        check_command      check_nrpe!check_load
        retry_interval     3
        check_interval     1
    
        process_perf_data    1
    }
    Is there something else I could check?

    Regards,
    Juergen

  4. #4
    Shinken project leader
    Join Date
    May 2011
    Location
    Bordeaux (France)
    Posts
    2,130

    Re: How to install PNP for Shinken 2.0?

    Try to drop your retention data and give a restart
    No direct support by personal message. Please open a thread so everyone can see the solution

  5. #5
    Junior Member
    Join Date
    Jan 2014
    Posts
    23

    Re: How to install PNP for Shinken 2.0?

    (Sorry for my late response, was on a business trip for a week)

    When clicking on the big "Shinken" button in the WebUI (left upper corner), I get a menu point "PNP4". Clicking on this button directs to the URL "myhost:7767/pnp4nagios/" and the error message:

    Code:
    Error 404: Not Found
    
    Sorry, the requested URL 'http://myhost:7767/pnp4nagios/' caused an error:
    
    Not found: '/pnp4nagios/'
    The npdcd.log still shows things like that:

    Code:
    [03-17-2014 10:42:17] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-17-2014 10:42:17] NPCD: ThreadCounter 0/5 File is .
    [03-17-2014 10:42:17] NPCD: ThreadCounter 0/5 File is ..
    [03-17-2014 10:42:17] NPCD: No more files to process... waiting for 15 seconds
    [03-17-2014 10:42:32] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-17-2014 10:42:32] NPCD: ThreadCounter 0/5 File is .
    [03-17-2014 10:42:32] NPCD: ThreadCounter 0/5 File is ..
    [03-17-2014 10:42:32] NPCD: No more files to process... waiting for 15 seconds
    [03-17-2014 10:42:47] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-17-2014 10:42:47] NPCD: ThreadCounter 0/5 File is .
    [03-17-2014 10:42:47] NPCD: ThreadCounter 0/5 File is ..
    [03-17-2014 10:42:47] NPCD: No more files to process... waiting for 15 seconds
    [03-17-2014 10:43:02] NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    [03-17-2014 10:43:02] NPCD: ThreadCounter 0/5 File is .
    [03-17-2014 10:43:02] NPCD: ThreadCounter 0/5 File is ..
    [03-17-2014 10:43:02] NPCD: No more files to process... waiting for 15 seconds

    Regards,
    Juergen

  6. #6

    Re: How to install PNP for Shinken 2.0?

    I've got the same problem.

    Everything had been configured like explained in PNP4Nagios and Shinken-monitoring tutos,
    but not graphs at all.

    The service is detected inside WebUI but no graph are loaded, only the little "image not found" icon.

    When I click on "More", the main PNP4nagios interface comes but without any graphs.

    EDIT:
    I've got a graph now but only for "check_icmp" service so now, it should be a services definition problem

    >> I've install "php5-gd" and "a2enmod rewrite"

  7. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    23

    Re: How to install PNP for Shinken 2.0?

    Hmm, I have installed php5-gd too (I think it was automatically installed when installing pnp4nagios).

    How did you configure the web service to get to the pnp site? As I wrote, on "myhost:7767/pnp4nagios/" I only get the error 404.

    Regards,
    Juergen

  8. #8

    Re: How to install PNP for Shinken 2.0?

    Simply get off the port number ;-)

    >> Pnp4nagios is working on the standard 80 port.

    here is mine as example: http://mep-shinken/pnp4nagios/;

    >> mep-shinken > is a DNS entry which points to my server's IP
    >> place the ";" directly after the slash or sometimes, it adds " at the end of the URL to show the space.

    if this doesn't work, try with the IP directly.

  9. #9
    Junior Member
    Join Date
    Mar 2014
    Posts
    1

    Re: How to install PNP for Shinken 2.0?

    Hi Everybody,

    I have the same problem with Shinken 2.0 and npcd daemon. I have been following the same installation as Ja.This is others configurations :

    cat /etc/pnp4nagios/npcd.cfg

    Code:
    user = nagios
    group = nagios
    log_file = /var/log/pnp4nagios/npcd.log
    max_logfile_size = 10485760
    log_level = 2
    perfdata_spool_dir = /var/spool/pnp4nagios/npcd/
    perfdata_file_run_cmd = /usr/lib/pnp4nagios/libexec/process_perfdata.pl
    perfdata_file_run_cmd_args = -b
    identify_npcd = 1
    npcd_max_threads = 5
    sleep_time = 15
    load_threshold = 0.0
    pid_file=/var/run/npcd.pid
    perfdata_file = /var/spool/pnp4nagios/nagios/perfdata.dump
    perfdata_spool_filename = perfdata
    perfdata_file_processing_interval = 15
    In /etc/shinken/packs/linux-ssh/templates.cfg, i add process_perf_data 1 in define host and define service.

    When i go to http://shinken/pnp4nagios/graph, i have this message : perfdata directory "/var/lib/pnp4nagios/perfdata/" is empty. Please check your Nagios config. Read FAQ online.

    When i display /var/log/pnp4nagios/npcd.log :

    Code:
    NPCD: npcd Daemon (0.6.16) started with PID=3013
    NPCD: Please have a look at 'npcd -V' to get license information
    NPCD: HINT: load_threshold is disabled - ('0.000000')
    NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    NPCD: ThreadCounter 0/5 File is .
    NPCD: ThreadCounter 0/5 File is ..
    NPCD: No more files to process... waiting for 15 seconds
    NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    NPCD: ThreadCounter 0/5 File is .
    NPCD: ThreadCounter 0/5 File is ..
    NPCD: No more files to process... waiting for 15 seconds
    NPCD: Found 2 files in /var/spool/pnp4nagios/npcd/
    NPCD: ThreadCounter 0/5 File is .
    NPCD: ThreadCounter 0/5 File is ..
    Any ideas ?

  10. #10

    Re: How to install PNP for Shinken 2.0?

    Is it normal that your user and group in your npcd.cfg are "nagios" instead of "shinken" ?

    >> If you followed the Tutorial, it should be "shinken" and "shinken"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •