[Eisfair] Nagios, wie komme ich auf die Weboberfläche

Ansgar Püster ansgar.puester at netcologne.de
Mo Jan 2 15:43:51 CET 2017


Hallo,

Am 02.01.2017 um 15:25 schrieb Dirk Alberti:
> Hallo Ansgar,
>
> Am 02.01.2017 um 14:51 schrieb Ansgar Püster:
>>
>> Dein System ist irgendwie nicht komplett oder nagios
>> ist nicht sauber installiert.
>
> Laut Anleitung installiert.
>
>> /home/nagios sollte existieren.
>
> Erst nachdem ich es selbst angelegt hatte, für User und Gruppe 'nagios'

Ich werde das mal prüfen.
Meine Installationen sind hochgezogene alte Installation
und halt nicht "jungfräulich".

>>> Welcome to eisfair!
>>> base     : 2.7.8
>>> eiskernel: 2.26.1 (3.2.82-eisfair-1-PAE)
>>>
>>> eisfair > ping -n -U -w 30 -c 5 localhost
>>> ping: socket: Operation not permitted (raw socket required by specified
>>> options).
>>
>> Auch hier ist dein System "kaputt"!
>>
>> Bitte mal
>>   /usr/bin/ping -n -U -w 30 -c 5 localhost
>> ausführen.
>
> Kein Problem:
>
> eisfair #   /usr/bin/ping -n -U -w 30 -c 5 localhost
> PING localhost (127.0.0.1) 56(84) bytes of data.
> 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.028 ms
> 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.035 ms
> 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.035 ms
> 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.044 ms
> 64 bytes from 127.0.0.1: icmp_seq=5 ttl=64 time=0.034 ms
>
> --- localhost ping statistics ---
> 5 packets transmitted, 5 received, 0% packet loss, time 3999ms
> rtt min/avg/max/mdev = 0.028/0.035/0.044/0.006 ms
> eisfair #
>
>> Ein
>>   ls -la /usr/bin/ping
>> muss so etwas zeigen
>>   -rwsr-xr-x 1 root root 63456 Mar 13  2016 /usr/bin/ping
>>      #
>
> eisfair #  ls -la /usr/bin/ping
> -rwxr-xr-t 1 dirk users 63456 May 14  2016 /usr/bin/ping

Ein dirk aus der Gruppe users ist Besitzer von
/usr/bin/ping. Bitte mal in /bin und /usr/bin prüfen,
ob da noch mehr "dirk" vorkommt. Das kann nämlich beliebige
Probleme erzeugen :-(

> Da würde mich nun mal interessieren, wer bzw. was die Dateirechte von
> ping so verändert hat... :-/
>
>> Diese s oben ist wichtig!
>> Hast du eine lokale Kopie von ping?
>>
>> Der eigentliche "Host Alive Check" von nagios ist händisch
>> wie folgt zu testen:
>>
>> su - nagios -s /bin/sh
>>
>> cd /usr/local/nagios/plugins
>> ./check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5
>>
>> und muss so etwas liefern:
>>
>> PING OK - Packet loss = 0%, RTA = 0.15
>> ms|rta=0.150000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
>>
> eisfair > cd /usr/local/nagios/plugins
> eisfair > ./check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5
> /bin/ping -n -U -w 30 -c 5 127.0.0.1
> CRITICAL - Could not interpret output from ping command
> eisfair >

Gut, im Sinne von schlecht, check_ping kann den
Output von ping nicht interpretieren, da ping
halt einen Fehler ausgibt.

>> Du gibst ggf. einfach zu schnell auf :-(
>>
> Ich bin doch noch daaaaa... ;-)     Es lässt mir halt irgendwie doch
> keine Ruhe.
>
> Ich hab jetzt die Rechte von ping umgestellt:
>
> eisfair #  ls -la /usr/bin/ping
> -rwsr-xr-x 1 root root 63456 May 14  2016 /usr/bin/ping
>
> Und nun geht alles.
>
> eisfair > /bin/ping -n -U -w 30 -c 5 localhost
>
> PING localhost (127.0.0.1) 56(84) bytes of data.
> 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.029 ms
> 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.026 ms
> 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.029 ms
> ^C
> --- localhost ping statistics ---
> 3 packets transmitted, 3 received, 0% packet loss, time 1998ms
> rtt min/avg/max/mdev = 0.026/0.028/0.029/0.001 ms
>
> eisfair > cd /usr/local/nagios/plugins
> eisfair > ./check_ping -H 127.0.0.1 -w 3000.0,80% -c 5000.0,100% -p 5
>
> PING OK - Packet loss = 0%, RTA = 0.03
> ms|rta=0.032000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0
> eisfair >

Sieht jetzt gut aus!

> Vielen Dank!
>
> Ich frage mich trotzdem, warum die Userrechte verändert sind. Ansonsten
> läuft ja alles.

Ich hätte da einen in Verdacht :-)

Gruß,
Ansgar


Mehr Informationen über die Mailingliste Eisfair