npcd daemon returns error code 13

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

    I am trying to setup pnp4nagios with Icinga2 but I am running into errors with the npcd daemon.

    The npcd daemon is running as icinga user:

    1. ps -ef | grep npcd
    2. icinga 18690 1 0 15:46 ? 00:00:01 /usr/sbin/npcd -f /etc/pnp4nagios/npcd.cfg -d
    3. root 20096 20660 0 15:50 pts/0 00:00:00 grep --color=auto npcd

    I have setup my npcd user as icinga in npcd.cfg

    1. # Privilege Options
    2. user = icinga
    3. group = icinga

    That's my nagios.cfg

    I have set my spool directory as follows in npcd.cfg

    Also my /etc/nagios/objects/commands.cfg looks like below:

    Also those paths are owned by the icinga user:

    1. ls -ld /var/spool/icinga2/*
    2. drwxrwxr-x. 2 icinga icinga 9678848 Jun 14 16:17 /var/spool/icinga2/perfdata
    3. drwxrwxr-x. 2 icinga icinga 51 Jun 14 16:17 /var/spool/icinga2/tmp

    Can someone please help me with where I am going wrong?


  • Yup. I checked the permissions and now I am not getting the return code 13 when the npcd daemon runs.

    SELinux is disabled and policy is set as targetted.

    I get something else now while running the npcd daemon:

    How can I enable logs for npcd?

    I tried to set the log_level as -1 but there's nothing in my log file: /var/log/pnp4nagios/npcd.log

    The permission for my log directory are the same as the npcd daemon:


    ls -ld /var/log/pnp4nagios

    drwxr-xr-x 4 icinga icinga 85 Jun 15 16:52 /var/log/pnp4nagios

    My perfdata log has errors too:

    1. 2017-06-15 17:13:31 [3984] [0] RRDs::update /var/lib/pnp4nagios/HOST_A/_HOST_.rrd 1497517981:100
    2. 2017-06-15 17:13:31 [3984] [0] RRDs::update ERROR /var/lib/pnp4nagios/HOST_A/_HOST_.rrd: expected 2 data source readings (got 1) from 1497517981
    3. 2017-06-15 17:13:31 [3984] [0] RRDs::update /var/lib/pnp4nagios/HOST_A/_HOST_.rrd 1497517994:0:0.000440
    4. 2017-06-15 17:13:31 [3984] [0] RRDs::update ERROR /var/lib/pnp4nagios/HOST_A/_HOST_.rrd: found extra data on update argument: 0.000440
    5. 2017-06-15 17:13:31 [3984] [0] RRDs::update /var/lib/pnp4nagios/HOST_B/_HOST_.rrd 1497517997:0:0.000300
    6. 2017-06-15 17:13:31 [3984] [0] RRDs::update ERROR /var/lib/pnp4nagios/HOST_B/_HOST_.rrd: found extra data on update argument: 0.000300

    Would appreciate any guidance.


  • How can I enable logs for npcd?

    Editing npcd.cfg there are several lines

    1. # Logging Options
    2. log_type = syslog
    3. log_file = /usr/local/pnp4nagios/var/npcd.log
    4. max_logfile_size = 10485760
    5. log_level=0

    Changing it to "log_type = file" will fill the given file instead of the syslog of your system.

    For values please take a look here.

    My perfdata log has errors too

    The rrd files have been created with a fixed structure (depending on the number of data source and several other parameters). The errors show that the updates try to add data with a different number of data sources.

    The fastest way is to delete the rrd files in error and wait until they are recreated (the old data is lost).

  • You somehow managed to modify the performance data items for the host check. There now is an additional performance value and this causes rrdtool to deny the update. Reason is that you cannot modify the number of data sources in an RRD file after its creation. (That's the point where Graphite and InfluxDB are more powerful).

    There are workarounds - dump the existing data, modify the datasources, and restore an rrd file. E.g.…source-to-an-existing-rrd

    If would look into an existing _HOST_.rrd file and its data sources and compare it to the provided performance data from your checks.