NPCD creates spool perfdata files with wrong usergroup on ubuntu 16.04

This forum was archived to /woltlab and is now in read-only mode. Please register a new account on our new community platform.

You can create a thread on the new site and link to an archived thread. This archive is available as knowledge base, safe and secured.

More details here.
  • Hello,


    Hope english is acceptable in these forums.

    I am having an issue with php4nagios running on Ubuntu 16.04 .

    I am using Shinken with pnp4nagios in npcd bulk mode.

    The problem is that the spool perfdata files are created with root usergroup those making it impossible for process_perfdata.pl to process it. If I do manual chown root:nagios to the file the data is processed.

    Code
    1. root@server:/usr/local/pnp4nagios/var/spool# ls -lah
    2. total 12K
    3. drwxrwsr-x 2 nagios nagios 4.0K Nov 30 14:01 .
    4. drwxr-xr-x 6 nagios nagios 4.0K Nov 30 14:01 ..
    5. -rw-r----- 1 root root 803 Nov 30 14:01 perfdata.1512046869
    Code
    1. root@server:/usr/local/pnp4nagios/var/spool# ps aux | grep npcd
    2. nagios 21974 0.0 0.1 238324 2152 ? S 13:30 0:00 /usr/local/pnp4nagios/bin/npcd -d -f /usr/local/pnp4nagios/etc/npcd.cfg

    npcd.log

    perfdata.log


    Code
    1. 2017-11-30 14:06:30 [26054] [2] Default Timeout: 15 secs.
    2. 2017-11-30 14:06:30 [26054] [2] Config Timeout: 15 secs.
    3. 2017-11-30 14:06:30 [26054] [2] Actual Timeout: 15 secs.
    4. 2017-11-30 14:06:30 [26054] [1] process_perfdata.pl-0.6.26 starting in BULK Mode called by NPCD
    5. 2017-11-30 14:06:30 [26054] [2] searching for /usr/local/pnp4nagios/var/spool/perfdata.1512047187
    6. 2017-11-30 14:06:30 [26054] [2] renaming /usr/local/pnp4nagios/var/spool/perfdata.1512047187 to /usr/local/pnp4nagios/var/spool/perfdata.1512047187-PID-26054 for bulk update
    7. 2017-11-30 14:06:30 [26054] [2] reading /usr/local/pnp4nagios/var/spool/perfdata.1512047187-PID-26054 for bulk update
    8. 2017-11-30 14:06:30 [26054] [1] 0 lines processed
    9. 2017-11-30 14:06:30 [26054] [1] /usr/local/pnp4nagios/var/spool/perfdata.1512047187-PID-26054 deleted
    10. 2017-11-30 14:06:30 [26054] [1] PNP exiting (runtime 0.000161s) ..
  • The problem is that the spool perfdata files are created with root usergroup those making it impossible for process_perfdata.pl to process it. If I do manual chown root:nagios to the file the data is processed.

    Why is that? AFAIK the spool files should be created by the Monitoring process, group set to the group of the web server process. It should be easy to start the npcd daemon as Monitoring process user, too.

  • Hello wolfgang,


    Thanks for the idea. I've chanaged the usergroup under which shinken broker is running and now I get correct usergroup for the perfdata file and everything is working.

    Cheers!