Page 1 of 1

/var/log/nagios/rw/live doesnt exists

Posted: Fri Oct 17, 2014 2:04 pm
by veenm
Hi,

After restarting the nagios server broker module " /var/log/nagios/rw/live" is not getting created automatically. Any solution please . Here are the entries in nagios.cfg

broker_module=/usr/lib64/mk-livestatus/livestatus.o /var/log/nagios/rw/live
broker_module=/usr/lib64/mod_gearman/mod_gearman.o config=/etc/mod_gearman/mod_gearman_neb.conf
broker_module=/usr/lib64/pnp4nagios/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg
event_broker_options=-1

Re: /var/log/nagios/rw/live doesnt exists

Posted: Fri Oct 17, 2014 2:06 pm
by tmcdonald
What version of Core is this on? And what livestatus and gearman versions?

Re: /var/log/nagios/rw/live doesnt exists

Posted: Fri Oct 17, 2014 2:09 pm
by sreinhardt
What are the permissions on that folder:

Code: Select all

ls -lard /var/log/nagios/rw/
Also let's do a nagios restart and then grab a chunk of the log file (paths may vary as you do not appear to use our stock locations)

Code: Select all

service nagios restart
tail -n 200 /usr/local/nagios/var/nagios.log >> /tmp/nagios.log
Please send the /tmp/nagios.log file.

Re: /var/log/nagios/rw/live doesnt exists

Posted: Fri Oct 17, 2014 2:44 pm
by veenm
Here is the log

2014/10/17 18:31:15][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:31:15][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi
[2014/10/17 18:31:15][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:32:47][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:32:47][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:32:47][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi
[2014/10/17 18:32:47][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:34:21][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:34:21][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:34:21][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi?_=1413567258061
[2014/10/17 18:34:21][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:35:55][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:35:55][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:35:55][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi?_=1413567352347
[2014/10/17 18:35:55][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:37:29][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:37:29][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:37:29][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi?_=1413567446655
[2014/10/17 18:37:29][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:39:03][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:39:03][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:39:03][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi?_=1413567540461
[2014/10/17 18:39:03][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:40:36][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:40:36][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:40:36][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi?_=1413567633872
[2014/10/17 18:40:36][xxxxx][ERROR][Thruk.Controller.error] ERROR: failed to open socket /var/log/nagios/rw/live: No such file or directory (/var/log/nagios/rw/live)
[2014/10/17 18:40:38][xxxxx][ERROR][Thruk.Action.AddDefaults] data source error: failed to open socket /var/log/nagios/rw/live: No such file or directory at /usr/share/thruk/s
cript/../lib/Thruk/Backend/Manager.pm line 892.
[2014/10/17 18:40:38][xxxxx][ERROR][Thruk.Controller.error] No Backend available
[2014/10/17 18:40:38][xxxxx][ERROR][Thruk.Controller.error] on page: https://xxxxx/thruk/cgi-bin/status.cgi? ... le=summary

Re: /var/log/nagios/rw/live doesnt exists

Posted: Mon Oct 20, 2014 11:23 am
by abrist
We need to see the nagios log from when the nagios process is restarted. I bet there is an issue with the livestatus module. Do a running tail to a log file and then restart nagios. Wait a moment and then kill the tail and post the log contents here:

Code: Select all

tail -f /usr/local/nagios/var/nagios.log >> /tmp/nagios.log
service nagios restart
Kill the tail with ctrl-c and then post the /tmp/nagios.log file.