12.07.2011, 04:13 UTC+2

Sie sind nicht angemeldet.

unable to connect to livestatus socket

SylvainC

Anfänger

Beiträge: 4

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.0.6, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 4

Anzahl Services: 10

Betriebssystem(e): Debian Lenny

Plugin-Version(en): 1.4.15

NDO-Version: 2

1

08.07.2011, 15:00

unable to connect to livestatus socket

Hi there,

I know this has already been asked before, but whatever solution I could find did not work in my case so I'd like to tell you of my problem and ask if someone here can help me to find where the problem is.

I am trying to install nagvis with mklivestatus on a machine where there is an ossim installation, as well as nagios.
The OS is Debian lenny and nagios is 3.0.6. (can't change that part)
However, after install I can access nagvis allright, but when I hover the mouse pointer over a map in Nagvis I get the message :

Problem (Backend: live_1): Unable to connect to livestatus socket. The socket /var/lib/nagios3/rw/live in backend live_1 does not exist. Maybe Nagios is not running or restarting.

But the /var/live/nagios3/rw/live exists. The rw folder has 777 rights and nagios:nagios as user:group so I don't think it is a rights problem.
When I test unixcat with echo 'GET hosts ' | /usr/sbin/unixcat /var/lib/nagios3/rw/live I get the expected results.

I'm running out of ideas as to why it's not working.

For your information, I've followed the tuto on the website of mklivestatus for its install, and used the install.sh script for nagvis.
The nagios is not installed in /usr/local/ as usual but split between different directories (/etc, /var, /usr/sbin, and so on)
During nagvis install, I got one error that I think is linked to the fact mentionned just above (but which did not prevent me to complete the install) :
+--- Checking prerequisites ---------------------------------------------------+
| nagios binary MISSING |

That happens whatever the location I point out (and when I enter the path, I get a found, by the way).
However, I do not know if it is linked to my problem.

I also tried to do the installation on a VM with the same version of debian but without ossim and nagios pre-installed, so I installed apache2, nagios, mklivestatus and nagvis all in one go and this time it worked at the first time.

So I don't get it. It might be a small thing but I don't see what.

I hope someone will have some ideas and thanks you in advance for these.
Please ask if you need further informations.

Sylvain

Wolfgang

Erleuchteter

Beiträge: 5 441

Geschlecht: Männlich

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.1

Icinga-Version(en): Icinga 1.0.1

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: >70

Anzahl Services: >200

Betriebssystem(e): SLES10

Plugin-Version(en): 1.4.11

Sonstige Addon's: NRPE 2.6, NSCA 2.7, PNP 0.4.14 / 0.6

2

08.07.2011, 19:31

Please post the [live_1] section from nagvis.ini.php.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

SylvainC

Anfänger

Beiträge: 4

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.0.6, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 4

Anzahl Services: 10

Betriebssystem(e): Debian Lenny

Plugin-Version(en): 1.4.15

NDO-Version: 2

3

Gestern, 09:51

Here it is :

Quoted

[backend_live_1]
backendtype="mklivestatus"
; The status host can be used to prevent annoying timeouts when a backend is not
; reachable. This is only useful in multi backend setups.
;
; It works as follows: The assumption is that there is a "local" backend which
; monitors the host of the "remote" backend. When the remote backend host is
; reported as UP the backend is queried as normal.
; When the remote backend host is reported as "DOWN" or "UNREACHABLE" NagVis won't
; try to connect to the backend anymore until the backend host gets available again.
;
; The statushost needs to be given in the following format:
; ":" -> e.g. "live_2:nagios"
;statushost=""
socket="unix:/var/lib/nagios3/rw/live"


Wolfgang

Erleuchteter

Beiträge: 5 441

Geschlecht: Männlich

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.1

Icinga-Version(en): Icinga 1.0.1

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: >70

Anzahl Services: >200

Betriebssystem(e): SLES10

Plugin-Version(en): 1.4.11

Sonstige Addon's: NRPE 2.6, NSCA 2.7, PNP 0.4.14 / 0.6

4

Gestern, 11:13

Please show the result of "grep broker nagios.cfg" and look for messages of mklivestatus in nagios.log while starting Nagios.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

SylvainC

Anfänger

Beiträge: 4

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.0.6, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 4

Anzahl Services: 10

Betriebssystem(e): Debian Lenny

Plugin-Version(en): 1.4.15

NDO-Version: 2

5

Gestern, 11:53

here's the result of the "grep broker nagios.cfg" command :

Quoted

debian:~# grep broker /etc/nagios3/nagios.cfg
# Controls what (if any) data gets sent to the event broker.
event_broker_options=-1
# This directive is used to specify an event broker module that should
# broker_module= [moduleargs]
broker_module=/usr/local/lib/mk-livestatus/livestatus.o /var/lib/nagios3/rw/live
#broker_module=/somewhere/module1.o
#broker_module=/somewhere/module2.o arg1 arg2=3 debug=0
# 64 = Event broker

and the result of the log when when restarting nagios

Quoted

[1310377862] Caught SIGTERM, shutting down...
[1310377862] Successfully shutdown... (PID=23247)
[1310377862] livestatus: deinitializing
[1310377862] livestatus: Waiting for main to terminate...
[1310377864] livestatus: Socket thread has terminated
[1310377864] livestatus: Waiting for client threads to terminate...
[1310377864] Event broker module '/usr/local/lib/mk-livestatus/livestatus.o' deinitialized successfully.
[1310377865] Nagios 3.0.6 starting... (PID=24321)
[1310377865] Local time is Mon Jul 11 11:51:05 CEST 2011
[1310377865] LOG VERSION: 2.0
[1310377865] livestatus: Livestatus 1.1.10p3 by Mathias Kettner. Socket: '/var/lib/nagios3/rw/live'
[1310377865] livestatus: Please visit us at http://mathias-kettner.de/
[1310377865] livestatus: Hint: please try out OMD - the Open Monitoring Distribution
[1310377865] livestatus: Please visit OMD at http://omdistro.org
[1310377865] Event broker module '/usr/local/lib/mk-livestatus/livestatus.o' initialized successfully.
[1310377865] Finished daemonizing... (New PID=24322)
[1310377865] TIMEPERIOD TRANSITION: 24x7;-1;1
[1310377865] TIMEPERIOD TRANSITION: never;-1;0
[1310377865] TIMEPERIOD TRANSITION: nonworkhours;-1;0
[1310377865] TIMEPERIOD TRANSITION: workhours;-1;1

Bastian Kuhn

Fortgeschrittener

Beiträge: 367

Geschlecht: Männlich

Wohnort: München

Anzahl Nagios-Server: 8

Hobbys: Jiu Jitsu, Klettern, MTB, Reisen

Nagios-Version(en): OMD 0.48

Verteiltes Monitoring: Ja

Redundantes Monitoring: Ja

Anzahl-Hosts: >4.000

Anzahl Services: >80.000

Betriebssystem(e): Linux, AIX, Windows

Plugin-Version(en): OMD 0.48

6

Gestern, 12:19

Has the nagios user access to the directory of the socket? Did you setup the socket like this description: http://mathias-kettner.de/checkmk_livest…ng%20Livestatus ?
bastian-kuhn.de Mein Blog (Rund um Monitoring und mit deutschen Anleitungen zu check_mk)

SylvainC

Anfänger

Beiträge: 4

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.0.6, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 4

Anzahl Services: 10

Betriebssystem(e): Debian Lenny

Plugin-Version(en): 1.4.15

NDO-Version: 2

7

Gestern, 12:54

The nagios user should have access to the directory since its nagios.cmd pipe is in it as well. (that's the setup description I followed).

Here are the rights :

Quoted

drwxrwsr-x 2 nagios nagios 4096 2011-07-11 12:47 rw

Ähnliche Themen