PNP4Nagios after upgrade

This forum was archived to /woltlab and is now in read-only mode.
  • Hi All,


    After upgrade pnp4nagios from 0.4 to 0.6.16 it doesn't work properly. Restart fails every time.


    command tail -25 /var/log/pnp4nagios/npcd.log shows

    The main problem, that it's not drawing the graph after upgrading.


    I'm tired to find problem, spend a lot of time, maybe you will have some ideas.

    Thanks a lot,

    AndFon

  • Command line was '/usr/lib/pnp4nagios/libexec/process_perfdata.pl -n -b /var/spool/pnp4nagios/npcd/perfdata.1486964091'

    Have the permissions changed during update?


    Try to execute the command (probably using a recent perfdata file).

  • Quote

    Please check if there is valid data, respectively when it stopped. It look like everything is alright.

    Quote

    Have the permissions changed during update?

    We use LXC for our Nagios server, before update we had a crash of nagios and we restored our LXC container, after I spent time for restore nagios working capacity, because some rights was changed by LXC, maybe upgrade pnp4nagios was executed with wrong permission.

  • I think after crash all changed

    Quote

    Please check who is owner of the perfdata folder.

    Code
    1. was
    2. drwxrwxrwx 146 root ntp 4.0K Aug 25 2016 perfdata
    3. i've changed right now
    4. drwxrwxrwx 146 nagios nagios 4.0K Aug 25 2016 perfdata

    And what i found in fail /var/log/pnp4nagios/perfdata.log

    Code
    1. 2017-02-03 19:06:46 [5367] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd: illegal attempt to update using time 1486173981 when last update time is 1486174001 (minimum one second step)2017-02-04 02:21:46 [6444] [0] RRDs::update /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd 1486200081:42017-02-04 02:21:46 [6444] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd: illegal attempt to update using time 1486200081 when last update time is 1486200101 (minimum one second step)2017-02-07 03:21:46 [15566] [0] RRDs::update /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd 1486462881:42017-02-07 03:21:46 [15566] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd: illegal attempt to update using time 1486462881 when last update time is 1486462901 (minimum one second step)2017-02-09 09:06:46 [22765] [0] RRDs::update /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd 1486656381:42017-02-09 09:06:46 [22765] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/spr-t1-switch/CPU_Temperature.rrd: illegal attempt to update using time 1486656381 when last update time is 1486656401 (minimum one second step)2017-02-09 22:43:49 [9596] [0] RRDs::update /var/lib/pnp4nagios/perfdata/host-cal-calmega3/Total_Processes.rrd 1486705411:5762017-02-09 22:43:49 [9596] [0] RRDs::update ERROR /var/lib/pnp4nagios/perfdata/host-cal-calmega3/Total_Processes.rrd: illegal attempt to update using time 1486705411 when last update time is 1486705411 (minimum one second step)
  • I've changed all the rights, for all involved folders, but the problem is the same.

    nagios:nagios



    OK, I can start npcd, but it still isnot drawing the graph

    The post was edited 1 time, last by AndFon ().

  • root@nagios:/home# perl verify_pnp_config --mode npcdmod --config=/etc/nagios3/nagios.cfg --pnpcfg=/etc/pnp4nagios
    [INFO] ========== Starting Environment Checks ============
    [INFO] My version is: verify_pnp_config-0.6.25-R.40
    [INFO] Start Options: verify_pnp_config --mode npcdmod --config=/etc/nagios3/nagios.cfg --pnpcfg=/etc/pnp4nagios
    [INFO] Reading /etc/nagios3/nagios.cfg
    [OK ] Running product is 'nagios'
    [OK ] object_cache_file is defined
    [OK ] object_cache_file=/var/cache/nagios3/objects.cache
    [INFO] Reading /var/cache/nagios3/objects.cache
    [OK ] resource_file is defined
    [OK ] resource_file=/etc/nagios3/resource.cfg
    [INFO] Reading /etc/nagios3/resource.cfg
    [INFO] Reading /etc/pnp4nagios/process_perfdata.cfg
    [INFO] Reading /etc/pnp4nagios/pnp4nagios_release
    [OK ] Found PNP4Nagios version "0.6.16"
    [OK ] Effective User is 'nagios'
    [OK ] User nagios exists with ID '104'
    [OK ] Effective group is 'nagios'
    [OK ] Group nagios exists with ID '109'
    [INFO] ========== Checking npcdmod Mode Config ============
    [OK ] process_performance_data is 1 compared with '/1/'
    [OK ] event_broker_options is defined
    [OK ] event_broker_options=-1
    [OK ] event_broker_option bits 2 and 3 enabled (12)
    [OK ] broker_module is defined
    [OK ] broker_module=/usr/lib/pnp4nagios/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg
    [OK ] npcdmod.o config file is /etc/pnp4nagios/npcd.cfg
    [OK ] /etc/pnp4nagios/npcd.cfg used by npcdmod.o is readable
    [OK ] npcd daemon is running
    [OK ] /etc/pnp4nagios/npcd.cfg is used by npcd and readable
    [OK ] npcd and npcdmod.o are using the same config file (/etc/pnp4nagios/npcd.cfg)
    [INFO] Reading /etc/pnp4nagios/npcd.cfg
    [OK ] perfdata_spool_dir is defined
    [OK ] perfdata_spool_dir=/var/spool/pnp4nagios/npcd
    [CRIT] 401 files found in /var/spool/pnp4nagios/npcd
    [HINT] Something went wrong here!
    [INFO] Nagios config looks good so far
    [INFO] ========== Checking config values ============
    [INFO] Reading /etc/pnp4nagios/npcd.cfg
    [OK ] Script /usr/lib/pnp4nagios/libexec/process_perfdata.pl is executable
    [INFO] ========== Starting global checks ============
    [OK ] status_file is defined
    [OK ] status_file=/var/cache/nagios3/status.dat
    [INFO] host_query =
    [INFO] service_query =
    [INFO] Reading /var/cache/nagios3/status.dat
    [INFO] ==== Starting rrdtool checks ====
    [OK ] RRDTOOL is defined
    [OK ] RRDTOOL=/usr/bin/rrdtool
    [OK ] /usr/bin/rrdtool is executable
    [OK ] RRDtool 1.4.7 Copyright 1997-2012 by Tobias Oetiker <tobi@oetiker.ch>
    [OK ] USE_RRDs is defined
    [OK ] USE_RRDs=1
    [OK ] Perl RRDs modules are loadable
    [INFO] ==== Starting directory checks ====
    [OK ] RRDPATH is defined
    [OK ] RRDPATH=/var/lib/pnp4nagios/perfdata
    [OK ] Perfdata directory '/var/lib/pnp4nagios/perfdata' exists
    [WARN] 336 hosts/services are not providing performance data
    [WARN] 'process_perf_data 1' is set for 156 hosts/services which are not providing performance data!
    [WARN] 'process_perf_data 0' is set for 958 of your hosts/services
    [OK ] 'process_perf_data 1' is set for 846 of your hosts/services
    [WARN] Logging is enabled in process_perfdata.cfg. This will reduce the overall performance of PNP4Nagios
    [INFO] ==== System sizing ====
    [OK ] 1803 hosts/service objects defined
    [INFO] ==== Check statistics ====
    [CRIT] Warning: 4, Critical: 1
    [CRIT] Checks finished...

  • 401 files found in /var/spool/pnp4nagios/npcd

    The npcd writes data to the folder but process_perfdata.pl isn't able to update the rrd-files.



    Please enable logging and execute "/usr/lib/pnp4nagios/libexec/process_perfdata.pl -n -b /var/spool/pnp4nagios/npcd/perfdata.1486964091" (as "nagios") with the oldest file in /var/spool/pnp4nagios/npcd. I'm still pretty sure that you have a permissions problem.

  • So, i started this command

    Code
    1. sudo -H -u nagios bash -c "/usr/lib/pnp4nagios/libexec/process_perfdata.pl -n -b /var/spool/pnp4nagios/npcd/perfdata.1486964091-PID-14237"

    And this is my log.txt

    Files

    • log.txt

      (12.73 kB, downloaded 102 times, last: )
  • Looking at the log file it seems you're running "bulk mode with NPCD", not "bulk mode with NPCD and npcdmod" as expected from the output of the verify script. I'd change the configuration to bulk+npcd, so after disabling the broker module entry in nagios.cfg you should run the verify script (-m bulk+npcd) and correct any errors.

  • I've changed all to Bulk Mode with NPCD

    Code
    1. run the command perl verify_pnp_config -m bulk+npcd --config=/etc/nagios3/nagios.cfg --pnpcfg=/etc/pnp4nagios

    and I have problem, in my commands.cfg exist process-service-perfdata-file but script doesnt see it

    The post was edited 2 times, last by AndFon ().

  • Code
    1. root@nagios:/etc/nagios3# grep -r process-service-perfdata-file *
    2. commands.cfg: command_name process-service-perfdata-file
    3. nagios.cfg:service_perfdata_file_processing_command=process-service-perfdata-file
    4. nagios.cfg.old:#service_perfdata_file_processing_command=process-service-perfdata-file

    nagios.cfg

    Code
    1. # Commands definitions
    2. cfg_file=/etc/nagios3/commands.cfg
    3. #cfg_file=/etc/nagios3/contacts.cfg

    commands.cfg

    nagios.cfg


    Code
    1. # HOST AND SERVICE PERFORMANCE DATA FILE PROCESSING COMMANDS# These commands are used to periodically process the host and# service performance data files.  The interval at which the# processing occurs is determined by the options above.
    2. host_perfdata_file_processing_command=process-host-perfdata-fileservice_perfdata_file_processing_command=process-service-perfdata-file