If the Thruk GUI displays :
No Backend available
None of the configured Backends could be reached, please have a look at the logfile for detailed information.
Check the following points :
- Is Livestatus listening ? Run : netstat -laputen | grep 50000 (was 6557 on previous versions)
- yes : continue to the next step
- no : restart shinken-broker : /etc/init.d/shinken-broker restart
shinken-broker will fail to start if mongodb is down (check this !).
- Restart broker in debug mode to investigate logs :
- /etc/init.d/shinken-broker -d restart
-
tail -f /usr/local/shinken/var/broker-debug.log | grep -i error
OR : tail -f /var/log/shinken/broker-debug.log | grep -i error
- Restart Shinken :
/etc/init.d/shinken restart
- Is mongodb listening ?
Then :
- yes : continue to the next step
- no : start mongodb
If this fails, remove its lock file :
- rm /home/shinken/data/db/mongod.lock
- OR : rm $(grep dbpath /etc/mongodb.conf | egrep -v "^#" | cut -d '=' -f 2)mongod.lock
- Look for crash evidence in mongodb logs :
tail /var/log/mongodb/mongodb.log -n 100 | grep -A4 Unclean
You may see mongodb is down as crashed and has to be repaired.
- Repair mongodb (source). As this rewrites data, this should be done as the user running the mongod daemon so that rewritten files'access rights are ok.
mongod --dbpath /home/shinken/data/db/ --repair
Or, as root :
dbPath='/home/shinken/data/db'; mongod --dbpath $dbPath --repair && chown -R mongodb:nogroup $dbPath/*
- Then start mongodb
/etc/init.d/mongodb start
- Then restart Shinken. (should work )
- Make sure NPCD is running
(to be continued, see NPCD.txt)
- Is NPCD running ?
- ps -elf | grep [n]pcd
- cat /var/run/npcd.pid
- View logs : tail /usr/local/pnp4nagios/var/npcd.log
- If NPCD is not responding :
- Kill it : kill -15 $(cat /var/run/npcd.pid)
- Remove PID file : rm /var/run/npcd.pid
- Then restart it as a daemon : /usr/local/pnp4nagios/bin/npcd -d -f /usr/local/pnp4nagios/etc/npcd.cfg
For the impatients :
- Kill NPCD : pidFile='/var/run/npcd.pid'; [ -e $pidFile ] && { echo -n 'Stopping NPCD ... '; kill -15 $(cat $pidFile); rm $pidFile && echo 'OK' || echo 'KO'; } || echo 'NPCD is not running.'
- Restart NPCD : kill -15 $(cat /var/run/npcd.pid) && /usr/local/pnp4nagios/bin/npcd -d -f /usr/local/pnp4nagios/etc/npcd.cfg
- Is NPCD actually "eating" data ?
tail -f /usr/local/pnp4nagios/var/npcd.log
OK if this displays something such as Found xx files in /usr/local/pnp4nagios/var/perfdata/
- Does Shinken feed perfdata ?
find /usr/local/pnp4nagios/var/perfdata -mmin -120
- What about the broker / PNP ?
grep pnp /usr/local/shinken/var/broker*
- Verify PNP config :
- wget http://verify.pnp4nagios.org/verify_pnp_config (source : http://docs.pnp4nagios.org/fr/pnp-0.6/verify_pnp_config)
- perl verify_pnp_config -m npcdmod -c /usr/local/shinken/etc/nagios.cfg -p /usr/local/pnp4nagios/etc/
- ...
UPDATE 2013/04/24 (?) : service npcd start
/usr/local/shinken default install directory
etc main config directory
shinken-specific.cfg Shinken config file
nagios.cfg Shinken settings that are similar to Nagios's
libexec plugins directory
var varying stuff
*log Logs
*pid PIDs