pid file issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sappjt
Posts: 59
Joined: Thu Nov 18, 2010 12:52 pm

pid file issues

Post by sappjt »

My service checks with nrpe won't work because I don't have the read permissions on the pid file. What is the best practice for getting this to work and how? Could I get the pid file created with read permissions?

error

openssh-daemon dead but pid file exists
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: pid file issues

Post by tonyyarusso »

I recommend using sudo for this. To do so, you'll need to:
  1. Install 'sudo'

    Code: Select all

    yum install sudo
  2. Add a line to the sudoers config file allowing the check:

    Code: Select all

    nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
  3. Comment out the requiretty option:

    Code: Select all

    sed -i 's/.*Defaults *requiretty/\#Defaults    requiretty/' /etc/sudoers
  4. Change the command definition to have 'sudo ' in front of it, like

    Code: Select all

    command[check_init_service]=sudo /usr/local/nagios/libexec/check_init_service $ARG1$
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
sappjt
Posts: 59
Joined: Thu Nov 18, 2010 12:52 pm

Re: pid file issues

Post by sappjt »

Thanks. That worked great!!!
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: pid file issues

Post by rdedon »

Please feel free to contact us again if you have any issues or questions.

Thanks!
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
Locked