Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > 4edbca00f8879ee12282b01a1c9707ba > files > 36

pnp4nagios-0.4.14-4.fc14.x86_64.rpm

You'll find an english description half way down ;-)

Ab PNP-Version 0.4.12 gibt es im contrib-Verzeichnis das Perl-Script 
verify_pnp_config, mit dem neben der Konfiguration auch die Performance-
Daten von Hosts und Services geprueft werden koennen. Es kann sowohl vor 
als auch waehrend des Betriebs von PNP genutzt werden.

*** Hinweis ***: Die Angaben beziehen sich auf verify_pnp_config v0.1.12,
das ueber http://www.pnp4nagios.org/pnp/dwnld in der aktuellen Developer-
Version zu finden ist (ab SVN Rev. 625).
Aeltere Versionen haben teilweise weniger Optionen, so dass es in den 
Beschreibungen der einzelnen Optionen Hinweise auf die PNP-Version gibt.

PNP-Version 0.4.12 enthaelt verify_pnp_config 0.1.2
PNP-Version 0.4.13 enthaelt verify_pnp_config 0.1.9
PNP-Version 0.4.14 enthaelt verify_pnp_config 0.1.12

Die einfachste Form des Aufrufs zur Überprüfung der Konfiguration lautet: 
./verify_pnp_config -m <Modus>
wobei <Modus> durch den benutzen PNP-Modus zu ersetzen ist (default, bulk
oder NPCD).

Das Script liefert beim Aufruf mit der Option -h bzw --help u.a. die folgende
Ausgabe:

	-m <mode> [ -l <logfile>] [ -p ] | -o <object>
	[ -b <basedir> ]
	[ -B <binary> ]
	[ -c <config file> ]
	[ -N <npcd config file> ]
	[ -P process_perfdata config file> ]
	[ -R <perfdata directory>|no ]
	[ -u <user> ]
	[ -g <group> ]
	[ -e ]
	[ -d | -q ]
	   
parameters:
	-h, --help        print these lines
	-b, --basedir=s   Nagios Base directory (default: /usr/local/nagios)
	-B, --binary=s    Nagios binary (default: nagios)
	-c, --config=s    Nagios main config file (default: /usr/local/nagios/etc/nagios.cfg)
	-m, --mode=s      PNP mode ("default", "bulk", "NPCD")
	-l, --logfile=s   check configure log file 
	-N, --npcdcfg=s   PNP config file for NPCD mode (default: /usr/local/nagios/etc/pnp/npcd.cfg)
	-P, --ppcfg=s     process_perfdata config file (default: /usr/local/nagios/etc/pnp/process_perfdata.cfg)
	-p, --precheck    use config files instead of objects cache
	-r, --rrdtool=s   specify the location of the RRDtool binary
	-R, --RRDpath=s   specify the perfdata directory (default: /usr/local/nagios/share/perfdata) or "no" for no check
	-u, --user=s      user of the perfdata directory
	-g, --group=s     group of the perfdata directory 	
	-q, --quiet       quiet mode, non-zero return code will indicate errors
	-o, --object=s    Nagios object (host name/service description)
	                  "Name" : search for matching host name or service desc
	                  "Name;": search for matching host name
	                  ";Name": search for service description
	-e, --english     show english messages/links
	-d, --debug       some debugging output

Das Nagios-Programm und der Zugriff auf die Hauptkonfigurationsdatei
nagios.cfg werden immer benoetigt. Bei vom Standard abweichenden Pfaden fuer
Nagios gibt es daher die Moeglichkeit, sowohl das Basisverzeichnis (-b bzw.
--basedir), den Namen des Programms (-B bzw. --binary) als auch den Standort
der Hauptkonfigurationsdatei (-c bzw. --config) mit Hilfe von Optionen anzu-
geben. Wenn der Name des Programms mit einem "/" beginnt, dann wird dieser
Wert als absolute Angabe betrachtet und unveraendert uebernommen. Ohne "/"
ergibt sich der Pfad aus dem Basisverzeichnis mit angehaengten "bin" und dem
Binary-Namen.
(-b / -c ab PNP 0.4.12; -B ab Rev. 612, PNP 0.4.14)

Ohne Angabe von Optionen wird die Hilfeseite ausgegeben, so dass entweder
der Modus oder ein Objekt als Parameter anzugeben sind.

Mit der Option -m (--mode) wird dabei der PNP-Modus angegeben, dessen
Einstellungen untersucht werden. Dabei erlaubt die Option -l <Dateiname>
bzw. --logfile=<Dateiname> die Pruefung der Konfiguration waehrend der
Installationsphase. Sie muessen bereits ./configure (ggf. mit zusaetzlichen
Optionen) ausgefuehrt haben. Dadurch wird die Datei config.log erstellt,
deren Name als Parameter uebergeben wird. Das Script prueft, ob die
Software-Voraussetzungen erfuellt werden bzw. ob verschiedene Einstellungen
korrekt vorgenommen wurden. Dazu gehoert auch ein Aufruf des RRDtool-
Programms, so dass ggf. die Option -r (--rrdtool) benutzt werden muss, wenn
es nicht unter /usr/bin/rrdtool zu finden ist.
(-m / -l ab PNP 0.4.12, -r ab PNP 0.4.13)

Das Script prueft, ob fuer Dateien/Verzeichnisse im perfdata-Verzeichnis
Benutzer und Gruppe mit den Werten uebereinstimmen, die in der nagios.cfg
eingetragen sind. Ausserdem wird geprueft, ob innerhalb der xml-Dateien
Return-Codes des RRDtools gefunden werden, die auf einen Fehler hinweisen.
Dabei kann mit der Option -R (--RRDpath) das Verzeichnis angegeben werden,
unter dem die RRD-Dateien abgelegt sind, falls es vom Standard abweicht.
Falls keine Pruefung gewuenscht wird, ist "no" als Verzeichnis anzugeben
Mit den Optionen -u (--user) und -g (--group) können Benutzer und Gruppe
des Perfdata-Verzeichnisses angegeben werden, falls diese vom Nagios-
Benutzer abweichen sollten.
(-R ab SVN 598 bzw. PNP 0.4.14).

Nach der Installation koennen die Aenderungen in der nagios.cfg mit der
Option -p (--precheck) ueberprueft werden, bevor ein Neustart erfolgt ist.
Das ist sinnvoll, um ggf. fehlerhafte Eintraege zu korrigieren, ohne Nagios
jeweils neu starten zu muessen.
(-p ab PNP 0.4.12)

Beim Aufruf mit der Option -o, der als Parameter eine Zeichenkette folgt,
werden alle Hosts bzw. Services mit diesem Namen sowie die Informationen zu
Performance-Daten ausgegeben. Die Zeichenkette sollte in Anfuehrungszeichen
gesetzt werden. Falls keine bzw. fehlerhafte Performance-Daten vorhanden
sind, gibt es entsprechende Meldungen.

Durch das Anhaengen eines Semikolons werden nur Hosts mit der angegebenen
Zeichenkette untersucht, durch Voranstellen nur Services.
Enthaelt die Zeichenkette mittendrin ein Semikolon, dann wird der erste Teil
als Hostname und der zweite als Servicebeschreibung betrachtet und die Aus-
wertung auf diesen Host mit dem entsprechenden Service beschraenkt:
Hostname/Servicebeschreibung => Zeichenkette in Hostname oder Servicebeschreibung
Hostname; => Einschraenkung auf Hostnamen
;Servicebeschreibung => Einschraenkung auf Servicebeschreibung
Hostname;Servicebeschreibung => Einschraenkung auf Hostname und Servicebeschreibung
(-o ab PNP 0.4.12, Beruecksichtigung des Semikolons ab PNP 0.4.13)

Im NPCD-Modus kann durch die Option -N (--npcdcfg) der Name der Konfi-
gurationsdatei angegeben werden, falls Name oder Ort nicht dem Standard
entspricht (NAGIOS_BASE/etc/pnp/npcd.cfg).
(-N ab PNP 0.4.13).

Mit der Option -P (--ppcfg) wird der Name der Konfigurationsdatei fuer
process_perfdata.pl angegeben, falls Name oder Ort vom Standard abweicht
(NAGIOS_BASE/etc/pnp/process_data.cfg)
(-P ab PNP 0.4.13).

Die Option -e (--english) erzwingt die Anzeige von englischen Meldungen,
selbst wenn deutsche Spracheinstellungen erkannt werden
(-e ab PNP 0.4.13).

Durch Angabe der Option -d bzw. --debug werden zusaetzliche Zeilen ausge-
geben, die bei der Fehlersuche helfen koennen, -q bzw. --quiet unterdrueckt
saemtliche Ausgaben.
In jedem Fall fuehren Fehler zu einem Return-Code ungleich Null.
(-d ab PNP 0.4.12, -q ab PNP 0.4.13) 

Die Ausgaben selbst beginnen mit einem Buchstaben, der genauere Informationen
ueber die Art der Ausgaben gibt:

[I] Informationen zu Einstellungen, ...
[A] durchzufuehrende Aktionen
[W] Warnung: beeintraechtigt nicht die Arbeitsweise von PNP
[E] Fehlermeldung: PNP wird nicht korrekt arbeiten, solange das Problem
    besteht
[H] Hinweis: es ist ratsam, die angegebene Dokumentation zu lesen
[D] Debugging-Meldung, die hoffentlich zur Fehlerbehebung fuehrt
(ab PNP 0.4.13)

###

Since PNP 0.4.12 the contrib directory contains a perl script
(verify_pnp_config) which enables you to check the configuration settings
as well as performance data of hosts or services. It can be used prior and
during runtime of PNP.

*** Note ***: The information applies to verify_pnp_config v0.1.12 which
is available in the current developer version (starting with SVN Rev. 625)
downloadable via http://www.pnp4nagios.org/pnp/dwnld.
Older versions may have fewer options so in the descriptions of the various
option you will find hints to the PNP versions.

PNP-Version 0.4.12 contains verify_pnp_config 0.1.2
PNP-Version 0.4.13 contains verify_pnp_config 0.1.9
PNP-Version 0.4.14 contains verify_pnp_config 0.1.12


Checking the configuration can be done executing
./verify_pnp_config -m <mode>
replacing <mode> by default, bulk or NPCD.

Specifying the option -h or --help respectively shows the following lines:

	-m <mode> [ -l <logfile>] [ -p ] | -o <object>
	[ -b <basedir> ]
	[ -B <binary> ]
	[ -c <config file> ]
	[ -N <npcd config file> ]
	[ -P <process_perfdata config file> ]
	[ -R <perfdata directory>|no ]
	[ -u <user> ]
	[ -g <group> ]
	[ -e ]
	[ -d | -q ]
	   
parameters:
	-h, --help        print these lines
	-b, --basedir=s   Nagios Base directory (default: /usr/local/nagios)
	-B, --binary=s    Nagios binary (default: nagios)
	-c, --config=s    Nagios main config file (default: /usr/local/nagios/etc/nagios.cfg)
	-m, --mode=s      PNP mode ("default", "bulk", "NPCD")
	-l, --logfile=s   check configure log file 
	-N, --npcdcfg=s   PNP config file for NPCD mode (default: /usr/local/nagios/etc/pnp/npcd.cfg)
	-P, --ppcfg=s     process_perfdata config file (default: /usr/local/nagios/etc/pnp/process_perfdata.cfg)
	-p, --precheck    use config files instead of objects cache
	-r, --rrdtool=s   specify the location of the RRDtool binary
	-R, --RRDpath=s   specify the perfdata directory (default: /usr/local/nagios/share/perfdata) or "no" for no check
	-u, --user=s      user of the perfdata directory
	-g, --group=s     group of the perfdata directory 	
	-q, --quiet       quiet mode, non-zero return code will indicate errors
	-o, --object=s    Nagios object (host name/service description)
	                  "Name" : search for matching host name or service desc
	                  "Name;": search for matching host name
	                  ";Name": search for service description
	-e, --english     show english messages/links
	-d, --debug       some debugging output
	
The Nagios program and access to the main configuration file are always
necessary. If you have non-standard paths you can use three options (-b, -B 
and -c) to specify the nagios base directory, the name of the binary and the
place of the main config file. If the program name starts with a "/" then
this value is taken as an absolute path which isn't modified anymore. If it
doesn't start with a "/" then the path is composed of the basedir, the string
"bin" and the binary.
(-b / -c starting with PNP 0.4.12; -B starting with Rev. 612, PNP 0.4.14)

Without specifying any options the help page will be shown so you'll have to
specify either the mode or an object.

Using the option -m (--mode) you specify one of the PNP modes whose settings
will be checked. The option -l <filename> (--logfile=<filename>) allows to
check the config during installation of PNP. You have to execute ./configure
(with additional options if necessary) first which creates the file config.log.
This name has to be passed as parameter value. The script checks if software
requirements are met and if several settings have been specified correctly.
That includes a call of the RRDtool binary so you may use the option 
-r <location> (--rrdtool <location>) if the binary can not be found at
/usr/bin/rrdtool.
(-m / -l starting with PNP 0.4.12, -r starting with PNP 0.4.13)

The script checks if owner and group of the directories and files below
the perfdata folder correspond to the values given in nagios.cfg.
Additionally the xml files are checked for non-zero return codes of RRDtool.
Using the option -R (--RRDpath) you can specify the directory where the
RRD files are located if its place is non-standard. If you don't wish these
checks to be performed please specify "no" as directory name.
Using the options -u (--user) and -g (--group) you can specify user and/or
group of the perfdata directory if they don't match the values of the
nagios user.
(-R starting with SVN Rev. 598, PNP 0.4.14).

After the installation the changes in nagios.cfg can be checked using the
option -p (--precheck) before restarting nagios. This way you can correct
any errors without restarting every time.
(-p starting with PNP 0.4.12)

Together with the option -o you specify a string which is compared to host-
names and/or service descriptions in the objects cache file. The string
should be enclosed in quotes to escape blanks and several special characters.
If the string matches the name and any performance data will be shown. If no
or invalid performance data is present appropriate messages will be given.

Appending a semicolon to the string will result in comparing only hostnames,
prepending a semicolon only inspects service descriptions. A semicolon within
the string separates hostname and service description.

hostname/service description => string matches hostname or service description
hostname; => string only matches against hostnames
;service description => string only matches against service descriptions
hostname;service description => hostname and service description have to match
(-o starting with PNP 0.4.12, semikolon starting with PNP 0.4.13)

When using the NPCD mode you can use -N (--npcdcfg) to specify the location of
the config file if its name or location differs from the default
(NAGIOS_BASE/etc/pnp/npcd.cfg).
(-N starting with PNP 0.4.13)

Using the option -P (--ppcfg) you can specify the name of the config file for
process_perfdata.pl if name or location differs from the default
(NAGIOS_BASE/etc/pnp/process_perfdata.cfg).
(-P starting with PNP 0.4.13)

The option -e (--english) enables you to force the use of english messages
if the script detects german language settings.
(-e starting with PNP 0.4.13)

The option -d (--debug) will output additional lines which may help during
trouble shooting whereas -q (--quiet) suppresses all output.
Errors will result in a non-zero return code.
(-d starting with PNP 0.4.12, -q starting with PNP 0.4.13)

Each output line will start with a letter indicating the type of information:

[I] informational message about settings, things to be done, ...
[A] actions to be taken
[W] warning message
[E] error message: PNP will not work without resolving the problem(s)
[H] hint: it might be worth reading the appropriate documentation
[D] debugging message, hopefully showing the source of your problem
(one letter types starting with PNP 0.4.13)