Page 1 of 1
pid file issues
Posted: Thu Mar 10, 2011 10:08 am
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
Re: pid file issues
Posted: Thu Mar 10, 2011 1:19 pm
by tonyyarusso
I recommend using sudo for this. To do so, you'll need to:
- Install 'sudo'
- Add a line to the sudoers config file allowing the check:
Code: Select all
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
- Comment out the requiretty option:
Code: Select all
sed -i 's/.*Defaults *requiretty/\#Defaults requiretty/' /etc/sudoers
- 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$
Re: pid file issues
Posted: Thu Mar 10, 2011 5:06 pm
by sappjt
Thanks. That worked great!!!
Re: pid file issues
Posted: Thu Mar 10, 2011 5:14 pm
by rdedon
Please feel free to contact us again if you have any issues or questions.
Thanks!