[Eisfair] [E1] Nagios, nrpe, nrpe-check und NConf update
Stefan Welte
post at stefan-welte.de
Fr Mär 6 18:34:45 CET 2015
Hallo Ansgar,
Am 06.03.2015 um 11:00 schrieb Ansgar Püster:
>>> Apache2 ?
>> 1.8.5
>
> dann verstehe ich jetzt deinen ersten Fehler
> -- schnipp --
> AH00526: Syntax error on line 15 of /etc/apache2/mods-enabled/nagios.conf:
> Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
> -- schnipp --
> nicht mehr.
>
> Ist der noch vorhanden?
ja, hatte es zuvor nur ein mal installiert und obigen Fehler bekommen.
Gerade eben drüberinstalliert:
> 2015-03-06 16:23:15 (11,4 MB/s) - »nconf.tar.gz« gespeichert [710405/710405]
>
> Please wait ...
> cp: Aufruf von stat für „/usr/local/nconf/Sicherung/*“ nicht möglich: Datei oder Verzeichnis nicht gefunden
> Updating package 'nconf' (removing previous version)
> Updating configuration.... Finished.
> * Restarting Apache ...
> AH00526: Syntax error on line 15 of /etc/apache2/mods-enabled/nagios.conf:
> Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration [ OK ]
> Look at http://eis2/nconf/
> Press ENTER to continue
Deinstallation und Neuinstallation ändert nix, Fehler bleibt.
>> Könnte diese Fehlermeldung präziser ausfallen?
>
> Klar doch:
> Dazu sind die beiden Menüpunkte
> 8 pre-flight check
> 9 large pre-flight check
> vorhanden.
> Bitte mal prüfen, was da angezeigt wird.
ok, dachte zuerst ich muss das manuell prüfen. :)
> Reading configuration data...
> Read main config file okay...
> Error: Could not find any host matching 's' (config file '/etc/nagios/objects_eis/host/hostgroup.cfg', starting on line 14)
> Error: Could not expand members specified in hostgroup (config file '/etc/nagios/objects_eis/host/hostgroup.cfg', starting on line 14)
> Error processing object config files!
die Änderung zur vorgegebenen/funktionierenden/originalen Konfiguration war nur eine zusätzliche Hostgroup:
> NAGIOS_HOSTGROUP_3_NAME = linux-client
> NAGIOS_HOSTGROUP_3_ALIAS = linux-client
> NAGIOS_HOSTGROUP_3_MEMLIST_N = 0
"Error ... host matching 's'" verstehe ich hierbei nicht so ganz, oder wird nach einem host "s" gesucht,
weil ich Memlist=0 gesetzt habe?
>>> Not Found
>>>
>>> The requested URL /nagios/ was not found on this server.
>
> Fragen:
> 1.) Bekommst du _vor_ den Fehlermeldungen eine Abfrage
> [Authentifizierung erforderlich]
> Benutzername:
> Passwort:
nein.
> 2.) Was zeigt ein "ls ls -la /usr/local"?
> Es müssen die Verzeichnisse
> drwxr-xr-x 4 nagios nagios 4096 Mar 27 2011 nagios
> drwxr-xr-x 6 nagios nagios 4096 Feb 25 18:09 pnp4nagios
"ls -la /usr/local" zeigt:
> /usr/local:
> insgesamt 88
> drwxr-xr-x 22 root root 4096 6. Mär 16:25 .
> drwxr-xr-x 9 root root 4096 4. Dez 2012 ..
> drwxr-xr-x 9 root root 4096 4. Mär 13:20 apache2
> drwxr-xr-x 5 root root 4096 25. Feb 16:47 asterisk_webinterface
> drwxr-xr-x 2 root root 4096 4. Mär 13:20 bin
> drwxr-xr-x 2 root root 4096 3. Jan 09:49 bind9
> drwxr-xr-x 4 root root 4096 21. Feb 16:34 brute_force_blocking
> drwxr-xr-x 4 root root 4096 30. Jul 2010 DVB-APPS
> drwxr-xr-x 3 root root 4096 17. Sep 2013 dyndns
> drwxr-xr-x 5 root root 4096 17. Dez 15:15 exim
> drwxr-xr-x 2 root root 4096 30. Nov 10:52 fonts
> drwxr-xr-x 7 root root 4096 23. Jan 00:45 htdocs
> drwxr-xr-x 2 root root 4096 19. Jul 2011 ipcalc
> drwxr-xr-x 4 root root 4096 17. Sep 2013 lib
> drwxr-xr-x 4 root mysql 4096 8. Apr 2014 mysql
> drwxr-xr-x 4 nagios nagios 4096 4. Mär 13:20 nagios
> drwxr-xr-x 15 wwwrun nogroup 4096 6. Mär 16:25 nconf
> drwxr-xr-x 6 root root 4096 4. Mär 12:55 pnp4nagios
> drwxr-xr-x 2 root root 4096 8. Mär 2010 sbin
> drwxr-xr-x 5 root root 4096 10. Dez 02:31 share
> drwxr-xr-x 2 news news 4096 3. Jan 2014 sn
> drwxr-xr-x 4 squid squid 4096 10. Sep 2012 squidGuard
> lrwxrwxrwx 1 root root 14 5. Okt 2010 ssl -> /var/certs/ssl
> root at eis2 2.3.9:/ # ls -la /usr/local/nagios/
> insgesamt 16
> drwxr-xr-x 4 nagios nagios 4096 4. Mär 13:20 .
> drwxr-xr-x 22 root root 4096 6. Mär 16:25 ..
> drwxr-xr-x 2 nagios nagios 4096 4. Mär 17:22 plugins
> drwxr-xr-x 11 root root 4096 4. Mär 13:20 share
> root at eis2 2.3.9:/ # ls -la /usr/local/pnp4nagios/
> insgesamt 24
> drwxr-xr-x 6 root root 4096 4. Mär 12:55 .
> drwxr-xr-x 22 root root 4096 6. Mär 16:25 ..
> drwxr-xr-x 2 root root 4096 4. Mär 12:55 bin
> drwxr-xr-x 3 wwwrun nagios 4096 4. Mär 12:55 lib
> drwxr-xr-x 8 wwwrun nagios 4096 4. Mär 12:55 share
> drwxr-xr-x 5 root root 4096 4. Mär 12:55 var
das sieht rechtemäßig etwas anders/falsch aus, oder?
> Ich meine, dass nach Installation der Pakete nagios, nagios-objects
> und pnp4nagios und Setzen von
> NAGIOS_CONFIGURATION='nagios-objects'
> eine minimale, aber funktionsfähige Konfiguration zur Verfügung
> stehen sollte.
das wäre gut, vielleicht wenn obige Fehler weg sind.
> Und noch mal etwas Grundsätzliches zu Monitoring (z.B. mit Nagios):
> Monitoring ist keine Angelegenheit, die man mal so nebenbei
> konzipieren, konfigurieren und betreiben sollte.
>
> Meiner Meinung nach sollte man sich vorab informieren und
> mittels entsprechender Dokumentation (z.B. einem Buch)
> einlesen.
ok. Mein Ziel ist eigentlich nur ca. 20 IP-Adressen zu überwachen; hab mir da mal selbst ein Konsolenskript
geschrieben oder für aktuellen Zustand benutze ich fping, aber etwas grafisches fände ich schicker, wo auch
andere Intranetnutzer mal schnell gucken können, welche Geräte an oder aus sind, bzw. es wann waren (mit
Anzeige der laufenden Services auf den Hosts wäre es natürlich noch cooler).
Oder gibt es dafür was besseres als Lösung?
> Das Konfigurationsmodell von Nagios ist ziemlich komplex.
> Es wird über nconf zwar einfacher es auf einer grafischen
> Ebene zu erstellen, das hat via nagios-objects etwas weniger
> Komfort, aber ein Konzept, ein Plan, ein gewisser Grad an
> Know/How ist meines Erachtens zwingende Voraussetzung.
ok, danke für die Vorwarnung.
Gruss,
Stefan
Mehr Informationen über die Mailingliste Eisfair