30.05.2011, 05:48 UTC+2

Sie sind nicht angemeldet.

It appears as though you are not authorized to view information for the specified host...

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

1

25.05.2011, 11:37

It appears as though you are not authorized to view information for the specified host...

Hallo zusammen,

dies ist mein erster Beitrag hier im Forum. Habe schon diverse Seiten und auch hier im Forum nach meinem Problem gesucht, wurde allerdings nicht fündig.

Als Info vorab: Ich bin Anfänger was Nagios angeht.

Mein Problem:
Aktuell haben wir bei uns in der Firma ein laufendes Nagios V.3.2.0 (openSuse 11.0) + rrdtool 1.3.8, pnp-0.4.14 und mit Nagiosadmin.
Auf einem anderem System wurde Nagios Version 3.2.3 (openSuse 11.2) installiert (ohne rrdtool, pnp, nagiosadmin). Die Systeme wurden noch vor meiner Zeit installiert, daher kann ich nicht sagen nach welchem Tutorial hier vorgegangen wurde. Der jenige der das installiert hat, ist nicht mehr in der Firma.

Nun habe ich den Ordner perfdata mit allen existierenden RRD-Files vom alten System auf das neue System kopiert und im selben Pfad unter
/usr/local/nagios/share/ eingefügt. Die Berechtigung für diesen Ordner und dessen Inhalt wurden angepasst.

drwxrwxrwx 199 nagios nagios 12288 May 5 15:47 perfdata

Mein anliegen:
Das manuelle ausführen des Verfügbarkeitsskriptes auf dem neuen System.
Die CGI-Files befinden sich alle unter /usr/local/nagios/sbin
Dies sieht dann in etwa wie folgt aus:

Nagios-VM:/usr/local/nagios/sbin # export REMOTE_USER=nagiosadmin
Nagios-VM:/usr/local/nagios/sbin # export REQUEST_METHOD=GET
Nagios-VM:/usr/local/nagios/sbin # export QUERY_STRING=""
Nagios-VM:/usr/local/nagios/sbin # ./avail.cgi > test.html

Wenn ich anschließend die HTML-Datei öffne, erhalte ich am Ende dieser folgende Fehlermeldung:

It appears as though you are not authorized to view information for the specified host...

Wenn ich die selben Schritte auf dem alten System ausführe funktioniert das einwandfrei.

Was habe ich bisher versucht:
Die Berechtigungen welche hier und in anderen Foren angegeben wurden habe ich überprüft.
--> cgi.cfg bereits überprüft (user nagiosadmin ist für alles authorized)
--> .htaccess erstellt und nach /usr/local/nagios/sbin + /usr/local/nagios/share kopiert

Quellcode

1
2
3
4
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /usr/local/nagios/etc/htpasswd.users
require valid-user

(.htaccess ist auf dem alten System auch nicht vorhanden gewesen)

--> unter /usr/local/nagios/etc/htpasswd.user ist der user nagiosadmin auch angelegt worden.
--> auf dem neuen System waren keine hosts.cfg, hostgroups.cfg etc. vohanden. Habe den gesamten Ordner "nagios" vom alten System (srv/www/nagiosadmin/data/nagios auf das neue System nach /etc/nagios kopiert, alle Berechtigungen angepasst und in der nagios.cfg den Eintrag cfg_dir=/etc/nagios ergänzt. Trotzdem bekam ich nach erneutem ausführen die obige Fehlermeldung. Um sicherzugehen das die Änderungen in der nagios.cfg richtig übernommen werden, habe ich Nagios gestoppt und beim neustarten bekam ich folgende Fehlermeldung:

[Nagios-users] CONFIG ERROR! Reload aborted. Check your Nagios configuration

Hieraufhin habe ich die Zeile cfg_dir=etc/nagios wieder entfernt, woraufhin Nagios sich wieder starten ließ. Trotzdem besteht das Problem weiterhin.

Woran kann das liegen? Am fehlenden rrdtol auf dem neuen System? Oder kein Nagiosadmin? Mir ist noch aufgefallen das in der process_perfdata.cfg auf dem alten System ein Verweis auf die RRD-Files (RRDPATH = /usr/local/nagios/share/perfdata) vorhanden ist. Kann es daran liegen?
Oder weil sich die Nagiosversionen unterscheiden? Oder gibt es sonst noch wo Berechtigungseinstellungen die ich übersehen habe?

Falls ich etwas Unklar ausgedrückt habe, einfach nachfragen.

Vielen Dank schonmal im voraus.

Wolfgang

Erleuchteter

Beiträge: 5 397

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

25.05.2011, 12:15

Der Eintrag cfg_dir= in der nagios.cfg sollte auf das Verzeichnis weisen, in dem deine Objektkonfigurationsdateien liegen (z.B. cfg_dir=/etc/nagios/conf.d). Anschließend solltest du die Konfiguration überprüfen (/usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg) und gefundene Fehler beseitigen. Nach dem Start von Nagios solltest du dich am Web-Interface mit "nagiosadmin" anmelden und schauen, ob du dort die gleiche Fehlermeldung bekommst. Eventuell gibt es weitere Hinweise in den Apache-Logs.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

3

25.05.2011, 13:35

Hi Wolfgang,

danke für die schnelle Antwort:

Was habe ich in der zwischenzeit getan:

In der nagios.cfg unter /usr/local/nagios/etc habe ich folgende Zeilen als Kommentar gesetzt:

#cfg_file=/usr/local/nagios/etc/objects/commands.cfg
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
#cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
#cfg_file=/usr/local/nagios/etc/objects/templates.cfg

Die cfg_dir habe ich dann auf /etc/nagios gesetzt:
cfg_dir=/etc/nagios

Über das Webinterface bekomme ich immer noch die selbe Fehlermeldung.

Anschließend habe ich folgendes ausgeführt:

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg und wurde fast erschlagen.

Folgendes Ergebnis (gekürzt) habe ich erhalten:



Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/etc/nagios'...
Processing object config file '/etc/nagios/commands.cfg'...
Processing object config file '/etc/nagios/hostgroups.cfg'...
Processing object config file '/etc/nagios/templates.cfg'...
Processing object config directory '/etc/nagios/backups'...
Processing object config file '/etc/nagios/contactgroups.cfg'...
Processing object config file '/etc/nagios/contacts.cfg'...
Processing object config file '/etc/nagios/hosts.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: Check period '24x7' specified for service 'LAN Interface' on host 'xxxx' is not defined anywhere!
Error: Notification period '24x7' specified for service 'LAN Interface' on host 'xxxx' is not defined anywhere!
...
...
    Checked 727 services.
Checking hosts...
Error: Notification period '24x7' specified for host 'xxxx' is not defined anywhere!
Error: Notification period '24x7' specified for host 'xxxx' is not defined anywhere!
...
...
        Checked 173 hosts.
Checking host groups...
    Checked 8 host groups.
Checking service groups...
    Checked 0 service groups.
Error: Service notification period '24x7' specified for contact 'xxxx' is not defined anywhere!
Error: Host notification period '24x7' specified for contact 'xxxx' is not defined anywhere!
...
...
    Checked 7 contacts.
Checking contact groups...
    Checked 7 contact groups.
Checking service escalations...
    Checked 0 service escalations.
Checking service dependencies...
    Checked 0 service dependencies.
Checking host escalations...
    Checked 0 host escalations.
Checking host dependencies...
    Checked 0 host dependencies.
Checking commands...
    Checked 42 commands.
Checking time periods...
    Checked 0 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   1641

***> One or more problems was encountered while running the pre-flight check...

        Check your configuration file(s) to ensure that they contain valid
        directives and data defintions.  If you are upgrading from a previous
        version of Nagios, you should be aware that some variables/definitions
        may have been removed or modified in this version.  Make sure to read
        the HTML documentation regarding the config files, as well as the
        'Whats New' section to find out what has changed.

Wolfgang

Erleuchteter

Beiträge: 5 397

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

25.05.2011, 14:01

Mindestens die Datei timeperiods.cfg wird nicht gefunden, den Eintrag mußt du wieder aktivieren und entsprechend anpassen. Das trifft ggf. auch auf die anderen drei Dateien zu, die du auskommentiert hast.

Gibt es Meldungen in den Apache-Logs? Eventuell sind die Berechtigungen auf die htpasswd.users-Datei nicht korrekt (/usr/local/nagios/etc/htpasswd.users).
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

5

25.05.2011, 14:53

Zitat

Gibt es Meldungen in den Apache-Logs?
In der apache error_log unter /var/log/apache2 ist der letzte Eintrag vom 13.05.2011 und nicht wirklich hilfreich.

[Fri May 13 17:00:18 2011] [error] [client w.x.y.z] File does not exist: /srv/www/htdocs/favicon.ico
[Fri May 13 17:00:18 2011] [error] [client w.x.y.z] File does not exist: /srv/www/htdocs/favicon.ico

Zitat

Eventuell sind die Berechtigungen auf die htpasswd.users-Datei nicht korrekt!
/usr/local/nagios/etc # ls -al
total 76
drwxrwxr-x 3 nagios nagios 4096 May 25 14:39 .
drwxr-xr-x 9 root root 4096 Dec 22 10:26 ..
-rw-rw-r-- 1 nagios nagios 11408 May 12 14:50 cgi.cfg
-rw-r--r-- 1 root root 51 May 12 14:36 htpasswd.users
-rw-rw-r-- 1 nagios nagios 43799 May 25 14:39 nagios.cfg
drwxrwxr-x 2 nagios nagios 4096 Dec 22 10:15 objects
-rw-rw---- 1 nagios nagios 1340 Dec 22 10:12 resource.cfg

Inhalt der htpasswd.users
nagiosadmin:

Wenn ich alle wieder auskommentiere erhalte ich folgendes:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config directory '/etc/nagios'...
Processing object config file '/etc/nagios/commands.cfg'...
Warning: Duplicate definition found for command 'check_ftp' (config file '/etc/nagios/commands.cfg', starting on line 1)
Error: Could not add object property in file '/etc/nagios/commands.cfg' on line 2.
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.


Das liegt wohl damit zusammen, das bei mir unter /etc/nagios die 3 Dateien commands.cfg, contacts.cfg und templates.cfg bereits vorhanden sind.
Wenn ich es wie folgt ändere, bekomme ich keine Fehlermeldungen mehr

nagios.cfg

Quellcode

1
2
3
4
#cfg_file=/usr/local/nagios/etc/objects/commands.cfg
#cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
#cfg_file=/usr/local/nagios/etc/objects/templates.cfg


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config directory '/etc/nagios'...
Processing object config file '/etc/nagios/commands.cfg'...
Processing object config file '/etc/nagios/hostgroups.cfg'...
Processing object config file '/etc/nagios/templates.cfg'...
Processing object config directory '/etc/nagios/backups'...
Processing object config file '/etc/nagios/contactgroups.cfg'...
Processing object config file '/etc/nagios/contacts.cfg'...
Processing object config file '/etc/nagios/hosts.cfg'...
Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Checked 727 services.
Checking hosts...
Checked 173 hosts.
Checking host groups...
Checked 8 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 7 contacts.
Checking contact groups...
Checked 7 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 0 host dependencies.
Checking commands...
Checked 42 commands.
Checking time periods...
Checked 5 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check


Leider weiterhin ohne Erfolg :(


Auszug cgi.cfg ( usr/local/nagios/etc)

Quellcode

1
2
3
4
5
6
7
8
9
/usr/local/nagios/etc # grep authorized cgi.cfg 
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
#authorized_for_read_only=user1,user2

dnsmichi

Meister

Beiträge: 2 121

Geburtstag: 30.05.1983 (28)

Geschlecht: Männlich

Wohnort: Wien

Beruf: DNS & Monitoring Developer

Anzahl Nagios-Server: 3x Icinga prod, 2x test/dev

Nagios-Version(en): s/nagios/icinga/

Icinga-Version(en): 1.4.0 / GIT

Verteiltes Monitoring: Ja

Redundantes Monitoring: Ja

Anzahl-Hosts: 1000+

Anzahl Services: 15000+

Betriebssystem(e): RHEL 5.6 x64

Plugin-Version(en): 1.4.15

IDO-Version: 1.4.0 / GIT MySQL/Postgresql/Oracle

Sonstige Addon's: PNP 0.6.11, check_mk GIT

6

25.05.2011, 15:10

ich wuerde mal drauf tippen, dass der nagiosadmin nirgends als contact den host*/service* objekten zugeordnet ist. naeheres dazu in der cgiauth.html in den docs.
Icinga 1.4 MySQL,PGSQL,Oracle and IPv6

Demos

Docs http://docs.icinga.org
Wiki https://wiki.icinga.org

Dev Tracker https://dev.icinga.org

* egrep -v "^#|^$" configfile

Join us online!
irc.freenode.net #icinga-devel

Using Icinga? Tell us!

Wolfgang

Erleuchteter

Beiträge: 5 397

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

7

25.05.2011, 15:49

Irgendwie geht bei dir alles mächtig durcheinander. Einerseits zeigst du Konfigurationsdateien unter /usr/local/nagios/etc, andererseits verweist du mit cfg_dir auf /etc/nagios. Entscheide dich für eine Stelle und paß' die Konfiguration entsprechend an, denn du tust dir (und uns) keinen Gefallen damit, wie du an den Fehlermeldungen beim Prüfen der Konfiguration siehst.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

8

25.05.2011, 16:32

Ja stimmt schon, hast Recht. Habe nun die *.cfg-Files von /etc/nagios nach /usr/local/nagios/etc/objects kopiert und in der nagios.cfg den Pfad angepasst.

cfg_dir=/usr/local/nagios/etc/objects

Nagios-VM:/usr/local/nagios/etc/objects # ls -al
-rw-rw-r-- 1 nagios nagios 7653 Jul 2 2010 commands.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 commands.cfg.md5
-rw-rw-r-- 1 nagios nagios 1118 Jul 2 2010 contactgroups.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 contactgroups.cfg.md5
-rw-rw-r-- 1 nagios nagios 2105 Feb 24 12:24 contacts.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 contacts.cfg.md5
-rw-rw-r-- 1 nagios nagios 5720 May 12 15:03 hostgroups.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 hostgroups.cfg.md5
-rw-rw-r-- 1 nagios nagios 346505 Jul 2 2010 hosts.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 hosts.cfg.md5
-rw-rw-r-- 1 nagios nagios 5403 Dec 22 10:12 localhost.cfg
-rw-rw-r-- 1 nagios nagios 3124 Dec 22 10:12 printer.cfg
drwxr-xr-x 2 root root 4096 May 25 16:02 sicherung
-rw-rw-r-- 1 nagios nagios 3293 Dec 22 10:12 switch.cfg
-rw-rw-r-- 1 nagios nagios 1936 Jul 2 2010 templates.cfg
-rw-r--r-- 1 root root 32 Jul 2 2010 templates.cfg.md5
-rw-rw-r-- 1 nagios nagios 3209 Dec 22 10:12 timeperiods.cfg
-rw-rw-r-- 1 nagios nagios 4019 Dec 22 10:12 windows.cfg

Auszug meiner hosts.cfg

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#
/usr/local/nagios/etc/objects # more hosts.cfg
# DO NOT REMOVE OR EDIT ANY '*_id_*' COMMENTS IN THIS FILE
#

# host_id_2
define host {
  host_name                   xyhost
  alias                       xyhost
  address                     w.x.y.z
  contact_groups              admins
  #icon_image                  nagiosimages/router.jpg       
  use                         generic-host
}

# service_id_2_6
define service {
  use                         generic-service
  host_name                   xyhost
  service_description         ping
  display_name                Ping
  check_command               check_ping
  contact_groups              admins
}
usw...


contacts.cfg

Quellcode

1
2
3
4
5
6
7
8
9
/usr/local/nagios/etc/objects # more contacts.cfg
define contact {
  contact_name                nagiosadmin
  alias                       Nagios Administrator
  email                       
  use                         generic-contact
}

usw..


contactgroups.cfg

Quellcode

1
2
3
4
5
6
7
8
/usr/local/nagios/etc/objects # more contactgroups.cfg
define contactgroup {
  contactgroup_name           admins
  alias                       Administrators
  members                     nagiosadmin
}

usw...


Ich vermute zwar weniger, aber kann es sein das ich zusätzlich das pnp-plugin, rrdtool und nagiosadmin installieren muss?

Wolfgang

Erleuchteter

Beiträge: 5 397

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

9

25.05.2011, 17:02

Zitat

Ich vermute zwar weniger, aber kann es sein das ich zusätzlich das pnp-plugin, rrdtool und nagiosadmin installieren muss?
Nein, diese Dinge haben nichts mit deinem Problem zu tun.
Prüf' bitte nochmal deine Konfiguration, starte Nagios neu und versuch dich als Benutzer "nagiosadmin" anzumelden. Schau dann in die Apache-Logs.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

10

26.05.2011, 10:16

Hi,

so habe einiges geändert und bin schon einen ganzen Schritt weiter.

Was habe ich getan?

In der nagios.cfg habe ich einige Pfade wie folgt angepasst:

cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg
cfg_file=/usr/local/nagios/etc/objects/hosts.cfg
cfg_file=/usr/local/nagios/etc/objects/hostgroups.cfg
cfg_file=/usr/local/nagios/etc/objects/contactgroups.cfg


In die htpasswd.users habe ich unter anderem die "members" welche in der contactgroups.cfg definiert gewesen sind hinzugefügt.

Anschließend habe ich Nagios neugestartet. Jetzt habe ich wesentlich mehr Prozesse ( ps -aux | grep nagios ).

Apache Logs

Auszug error_log

Quellcode

1
2
3
[Thu May 26 08:31:35 2011] [error] [client 192.168.2.16] user 123 not found: /nagios/stylesheets/common.css, referer: http://w.x.y.z/
[Thu May 26 08:31:35 2011] [error] [client 192.168.2.16] user 123 not found: /nagios/images/trends.gif, referer: http://w.x.y.z/
[Thu May 26 08:31:35 2011] [error] [client 192.168.2.16] user 123 not found: /nagios/stylesheets/avail.css, referer: http://w.x.y.z/



Auszug access_log

Quellcode

1
2
3
127.0.0.1 - - [26/May/2011:09:12:31 +0200] "GET / HTTP/1.0" 200 5093 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [26/May/2011:09:17:31 +0200] "GET / HTTP/1.0" 200 5093 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"
127.0.0.1 - - [26/May/2011:09:22:31 +0200] "GET / HTTP/1.0" 200 5093 "-" "check_http/v1.4.15 (nagios-plugins 1.4.15)"



Ich bekomme mittlerweile _nicht_ mehr die Meldung: It appears as though you are not authorized to view information for the specified host...

Wenn ich nun einen Zeitraum (z.B. letztes Jahr angebe) erhalte ich überall 0.00% angezeigt

State Type / Reason Time % Total Time % Known Time
UP Unscheduled 0d 0h 0m 0s 0.000% 0.000%
Scheduled 0d 0h 0m 0s 0.000% 0.000%
Total 0d 0h 0m 0s 0.000% 0.000%
DOWN Unscheduled 0d 0h 0m 0s 0.000% 0.000%
Scheduled 0d 0h 0m 0s 0.000% 0.000%
Total 0d 0h 0m 0s 0.000% 0.000%
UNREACHABLE Unscheduled 0d 0h 0m 0s 0.000% 0.000%
Scheduled 0d 0h 0m 0s 0.000% 0.000%
Total 0d 0h 0m 0s 0.000% 0.000%
Undetermined Nagios Not Running 0d 0h 0m 0s 0.000%
Insufficient Data 77d 0h 0m 0s 100.000%
Total 77d 0h 0m 0s 100.000%
All Total 77d 0h 0m 0s 100.000% 100.000%

State Breakdowns For Host Services:
Service % Time OK % Time Warning % Time Unknown % Time Critical % Time Undetermined
WAN Interface 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 100.000%
ping 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 100.000%
Average 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 0.000% (0.000%) 100.000%

Gebe ich jedoch als Zeitraum 01.01.2010 bis heute an, wird mir ab ca. 9:30 Uhr des heutigen Tages eine Downtime angezeigt, was ja richtig ist.
Allerdings fehlt mir die Angabe des Zeitraums von davor (01.01.2010 - ...).

Event Start Time Event End Time Event Duration Event/State Type Event/State Information
05-26-2011 09:28:31 05-26-2011 10:04:33 0d 0h 36m 2s+ HOST DOWN (HARD) PING CRITICAL - Packet loss = 100%


Nehme stark an das er die RRD-Files nicht findet, oder ?

Wolfgang

Erleuchteter

Beiträge: 5 397

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

11

26.05.2011, 10:26

Zitat

Nehme stark an das er die RRD-Files nicht findet, oder ?
Nein, das hat damit nichts zu tun. Vermutlich werden die archivierten Nagios-Log-Files nicht gefunden.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

12

26.05.2011, 10:46

Hi Wolfgang,

auf dem alten System sind unter /usr/local/nagios/var/archives etwa 620 log-files beginnend ab 2009 bis 2011 und im
neuen System sind es nur 60 seit Dezember 2010. Meinst du es bringt was die log files vom alten aufs neue rüberzukopieren?
Wenn ja, müsste ich Nagios anschließend neu starten ?

PS: meine nagios.log auf dem neuen System ist rasant am wachsen

Wolfgang

Erleuchteter

Beiträge: 5 397

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

13

26.05.2011, 10:57

Wachstum und Ablage hängen von verschiedenen Direktiven in der nagios.cfg ab:

Quellcode

1
grep "^log_" nagios.cfg
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

14

26.05.2011, 11:00

/usr/local/nagios/etc # grep "^log_" nagios.cfg
log_file=/usr/local/nagios/var/nagios.log
log_rotation_method=d
log_archive_path=/usr/local/nagios/var/archives
log_notifications=1
log_service_retries=1
log_host_retries=1
log_event_handlers=1
log_initial_states=0
log_external_commands=1
log_passive_checks=1

NapsterX

Anfänger

Beiträge: 8

Anzahl Nagios-Server: 2

Nagios-Version(en): 3.2.0, 3.2.3

Verteiltes Monitoring: Nein

Redundantes Monitoring: Nein

Anzahl-Hosts: 173

Anzahl Services: 727

Betriebssystem(e): OpenSuse 11.0, OpenSuse 11.2

Plugin-Version(en): rrdtool 1.3.8, pnp-0.4.14

NDO-Version: 2

15

26.05.2011, 12:37

Habe eben die 620 log-files vom alten System /usr/local/nagios/var/archives auf das neue Sytem kopiert und Voilá, es hat funktioniert. Ich erhalte keine 0.00% Werte mehr. Einzigstes Problem was noch besteht ist wie schon erwähnt das meine nagios.log am wachsen ist. Aktuell sind es ca. 70.000 Zeilen (ca. 10 MB)

Der Inhalt sieht etwa so aus:

Quellcode

1
2
3
4
5
[1306394691] SERVICE ALERT: ;cpu;CRITICAL;HARD;1 (Return code of 127 is out of bounds - plugin may be missing)
[1306394691] Warning: Return code of 127 for check of service 'WAN Interface' on host '' was out of bounds. Make sure the plugin you're trying to run actually exists.
..
.
.



PS: Auf dem neuen System soll zukünftig keine weiteres Monitoring betrieben werden. Nur die Möglichkeit bei Bedarf auf die Verfügbarkeiten zuzugreifen.

Wolfgang

Erleuchteter

Beiträge: 5 397

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

16

27.05.2011, 20:01

Quellcode

1
2
Return code of 127 is out of bounds - plugin may be missing
...Make sure the plugin you're trying to run actually exists.
Eigentlich steht die Lösung schon da. Entweder du hast keine Plugins installiert, die Berechtigungen sind falsch oder der Verweis in der resource.cfg stimmt nicht.
Nagios-Doc: Wiki-Format (3.x) oder als (3.0.6)

Icinga-Doc: (de) (en)

PNP-Troubleshooting (de) (en)

Ähnliche Themen