Re: Performance Issues / fork() errors
Posted: Wed Feb 20, 2013 5:23 pm
I spoke too soon.
Support for Nagios products and services
https://support.nagios.com/forum/
That didn't work?chrisp wrote:I spoke too soon.
Looking at this again, the first item looks like the nagios.lock file is not being created, the second item will only appear if the lock file exists but the process is not running... Can we look at the following permissionschrisp wrote:Code: Select all
nagios: No lock file found in /usr/local/nagios/var/nagios.lock ndo2db: ndo2db is not running but subsystem locked
Code: Select all
ls -l /usr/local/nagiosxi/var/subsys
ls -ld /usr/local/nagiosxi/var/subsysCode: Select all
# ls -l /usr/local/nagiosxi/var/subsys
total 4
-rw-r--r-- 1 nagios nagios 0 Feb 20 22:22 nagios
-rw-r--r-- 1 nagios nagios 0 Feb 20 22:22 ndo2db
-rw-r--r-- 1 nagios nagios 4 Feb 20 22:21 npcd.pid
# ls -ld /usr/local/nagiosxi/var/subsys
drwxr-xr-x 2 nagios nagios 4096 Feb 20 22:22 /usr/local/nagiosxi/var/subsys
Code: Select all
# crontab -l
## Restart any errant programs
* * * * * /home/admin/bin/stuffstarter 2>&1 >/dev/null
Code: Select all
# cat /home/admin/bin/stuffstarter
#!/bin/sh
## stuffstarter - cuz sometimes stuff just doesn't start...
EMAIL="chrisp"
HOSTNAME=`hostname`
TIME=`date`
SERVICES="rrdcached ndo2db nagios"
for SERVICE in ${SERVICES}
do
/sbin/service ${SERVICE} status 2>&1 | grep -q 'is running'
if [ "$?" == "0" ]
then
echo "${SERVICE}: OK"
else
echo "${SERVICE}: Problem"
(
echo ""
echo "${HOSTNAME} @ ${TIME}"
echo ""
echo "$0 is restarting ${SERVICE}"
echo ""
/sbin/service ${SERVICE} status
echo ""
/sbin/service ${SERVICE} restart
echo ""
) | /bin/mail -s "Restarting ${SERVICE}" ${EMAIL}
fi
done
exit 0