PNP4 Nagois not showing new graphs since update php5->7

  • Hi,


    pnp4nagios is not showing any new graphs since the update from php 5 to 7.

    old graphs are still shown, but data exists only before 5 days (time of update).

    /var/spool/icinga2/tmp shows 2 files: host-perfdata und service-perfdata, both flapping between 0 and some bytes, timestamp is not older then 5 minutes.

    /var/spool/icinga2/perfdata is showing files for some seconds

    /var/cache/rrdcached is showing 2 files 5 days old (time from the update).


    Any suggestion?

    Any tip where to dig in?


    TIA

    .d

  • npcd.cfg:


    user = nagios

    group = nagios

    log_type = syslog

    log_file = /var/log/pnp4nagios/npcd.log

    max_logfile_size = 10485760

    log_level = 0

    perfdata_spool_dir = /var/spool/icinga2/perfdata

    perfdata_file_run_cmd = /usr/lib/pnp4nagios/libexec/process_perfdata.pl

    perfdata_file_run_cmd_args = --bulk

    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

  • if i delete a host folder under /var/lib/pnp4nagios/perfdata, it is recreated after some checks.

    looks like the data is been processed, but not displayed...

  • npcd is not logging, even with the log level set to 2.

    but i checked /var/log/messages:

    Aug 11 16:50:32 monitor NPCD[14231]: Found 2 files in /var/spool/icinga2/perfdata

    Aug 11 16:50:32 monitor NPCD[14231]: ThreadCounter 0/5 File is .

    Aug 11 16:50:32 monitor NPCD[14231]: ThreadCounter 0/5 File is ..

    Aug 11 16:50:32 monitor NPCD[14231]: No more files to process... waiting for 15 seconds

    Aug 11 16:50:47 monitor NPCD[14231]: Found 4 files in /var/spool/icinga2/perfdata

    Aug 11 16:50:47 monitor NPCD[14231]: ThreadCounter 0/5 File is .

    Aug 11 16:50:47 monitor NPCD[14231]: ThreadCounter 0/5 File is ..

    Aug 11 16:50:47 monitor NPCD[14231]: ThreadCounter 0/5 File is host-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: Regular File: host-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: A thread was started on thread_counter = 0

    Aug 11 16:50:47 monitor NPCD[14231]: ThreadCounter 1/5 File is service-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: Regular File: service-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: A thread was started on thread_counter = 1

    Aug 11 16:50:47 monitor NPCD[14231]: Have to wait: Filecounter = 2 - thread_counter = 2

    Aug 11 16:50:47 monitor NPCD[14231]: Processing file service-perfdata.1502463038 with ID 139661957568256 - going to exec /usr/lib/pnp4nagios/libexec/process_perfdata.pl -n --bulk /var/spool/icinga2/perfdata/service-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: Processing file 'service-perfdata.1502463038'

    Aug 11 16:50:47 monitor NPCD[14231]: Processing file host-perfdata.1502463038 with ID 139661965960960 - going to exec /usr/lib/pnp4nagios/libexec/process_perfdata.pl -n --bulk /var/spool/icinga2/perfdata/host-perfdata.1502463038

    Aug 11 16:50:47 monitor NPCD[14231]: Processing file 'host-perfdata.1502463038'

    Aug 11 16:50:47 monitor NPCD[14231]: No more files to process... waiting for 15 seconds

    Aug 11 16:51:02 monitor NPCD[14231]: Found 2 files in /var/spool/icinga2/perfdata

    Aug 11 16:51:02 monitor NPCD[14231]: ThreadCounter 0/5 File is .

    Aug 11 16:51:02 monitor NPCD[14231]: ThreadCounter 0/5 File is ..

    Aug 11 16:51:02 monitor NPCD[14231]: No more files to process... waiting for 15 seconds

    Aug 11 16:51:17 monitor NPCD[14231]: Found 4 files in /var/spool/icinga2/perfdata

    Aug 11 16:51:17 monitor NPCD[14231]: ThreadCounter 0/5 File is .

    Aug 11 16:51:17 monitor NPCD[14231]: ThreadCounter 0/5 File is ..

    Aug 11 16:51:17 monitor NPCD[14231]: ThreadCounter 0/5 File is host-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: Regular File: host-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: A thread was started on thread_counter = 0

    Aug 11 16:51:17 monitor NPCD[14231]: ThreadCounter 1/5 File is service-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: Regular File: service-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: A thread was started on thread_counter = 1

    Aug 11 16:51:17 monitor NPCD[14231]: Have to wait: Filecounter = 2 - thread_counter = 2

    Aug 11 16:51:17 monitor NPCD[14231]: Processing file host-perfdata.1502463068 with ID 139661965960960 - going to exec /usr/lib/pnp4nagios/libexec/process_perfdata.pl -n --bulk /var/spool/icinga2/perfdata/host-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: Processing file 'host-perfdata.1502463068'

    Aug 11 16:51:17 monitor NPCD[14231]: Processing file service-perfdata.1502463068 with ID 139661957568256 - going to exec /usr/lib/pnp4nagios/libexec/process_perfdata.pl -n --bulk /var/spool/icinga2/perfdata/service-perfdata.1502463068

    Aug 11 16:51:17 monitor NPCD[14231]: Processing file 'service-perfdata.1502463068'

    Aug 11 16:51:18 monitor NPCD[14231]: No more files to process... waiting for 15 seconds

    Aug 11 16:51:33 monitor NPCD[14231]: Found 2 files in /var/spool/icinga2/perfdata

    Aug 11 16:51:33 monitor NPCD[14231]: ThreadCounter 0/5 File is .

    Aug 11 16:51:33 monitor NPCD[14231]: ThreadCounter 0/5 File is ..

    Aug 11 16:51:33 monitor NPCD[14231]: No more files to process... waiting for 15 seconds

  • /var/log/pnp4nagios/perfdata.log showed the following lines:


    2017-08-11 16:59:50 [22435] [0] RRDs::update ERROR Unable to connect to rrdcached: Datei oder Verzeichnis nicht gefunden


    rrdcached is running:


    /i/rrdcached status

    ● rrdcached.service - LSB: start or stop rrdcached

    Loaded: loaded (/etc/init.d/rrdcached; generated; vendor preset: enabled)

    Active: active (running) since Fri 2017-08-11 11:49:02 CEST; 5h 13min ago

    Docs: man:systemd-sysv-generator(8)

    Process: 30709 ExecStop=/etc/init.d/rrdcached stop (code=exited, status=0/SUCCESS)

    Process: 30735 ExecStart=/etc/init.d/rrdcached start (code=exited, status=0/SUCCESS)

    Tasks: 7 (limit: 4915)

    CGroup: /system.slice/rrdcached.service

    └─30741 /usr/bin/rrdcached -p /var/run/rrdcached.pid


    Aug 11 11:49:02 monitor systemd[1]: Starting LSB: start or stop rrdcached...

    Aug 11 11:49:02 monitor rrdcached[30741]: starting up

    Aug 11 11:49:02 monitor rrdcached[30735]: rrdcached started.

    Aug 11 11:49:02 monitor systemd[1]: Started LSB: start or stop rrdcached.

    Aug 11 11:49:02 monitor rrdcached[30741]: listening for connections

    Aug 11 12:49:02 monitor rrdcached[30741]: flushing old values

    Aug 11 13:49:02 monitor rrdcached[30741]: flushing old values

    Aug 11 14:49:02 monitor rrdcached[30741]: flushing old values

    Aug 11 15:49:02 monitor rrdcached[30741]: flushing old values

    Aug 11 16:49:02 monitor rrdcached[30741]: flushing old values

  • >cat /etc/default/rrdcached

    # /etc/default/rrdcached


    # 0: start rrdcached on boot, 1: do not start rrdcached on boot

    # default: 0

    DISABLE=0


    # options to be passed to rrdcached

    # (do not specify -p <pidfile> - this is handled by the init script)

    # default: see /etc/init.d/rrdcached

    #OPTS=""


    # number of seconds to wait for rrdcached to shut down

    # (writing the data to disk may take some time;

    # tune this according to your setup)

    # default: 30

    MAXWAIT=30


    # 0: do not enable core-files, 1: enable core-files ... if rrdcached crashes

    # default: 0

    ENABLE_COREFILES=0


    OPTS="-w 1800 -z 1800 -j /var/cache/rrdcached -s nagios -m 0660 -l unix:/var/run/rrdcached.sock"




    >ps aux| grep rrdca

    root 30741 0.0 0.0 245720 2964 ? Ssl 11:49 0:00 /usr/bin/rrdcached -p /var/run/rrdcached.pid


    >ls -al /var/run/rrd*

    -rw-r--r-- 1 root root 6 Aug 11 11:49 /var/run/rrdcached.pid


    müsste es nicht auch ein file /var/run/rrdcached.sock geben?

  • nachdem ich den rrdcached manuell mit den Parametern der default gestartet habe, sind auch wieder Graphen da...


    also wird der rrdcached nicht mit den Parametern der defaults Datei gestartet.

    Wie kann ich prüfen, warum das so ist?

  • Vielleicht wurde der Dienst gestartet, aber es hat geknallt. Das solltest du im Syslog sehen.


    Oder der Dienst wurde deaktiviert ... du verwendest schon Systemd oder?


    Code
    1. systemctl status rrdcached
    2. systemctl enable rrdcached
  • Fehler gefunden:


    das dist-upgrade hat ein anderes startskript und eine andere version der defaults Datei.

    ich habe die Parameter aus der alten defaults datei in die neue übertragen, das wars...


    Danke