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
pid file issues
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: pid file issues
I recommend using sudo for this. To do so, you'll need to:
- Install 'sudo'
Code: Select all
yum 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
Thanks. That worked great!!!
Re: pid file issues
Please feel free to contact us again if you have any issues or questions.
Thanks!
Thanks!