Differences

This shows you the differences between two versions of the page.

fr:pnp-0.6:verify_pnp_config [2010/11/07 17:58]
yannig created
fr:pnp-0.6:verify_pnp_config [2012/10/06 16:23] (current)
jacques.soubelet
Line 1: Line 1:
======verify_pnp_config====== ======verify_pnp_config======
-En cas de problème, il existe le script ''verify_pnp_config.pl'' qui se trouve dans le répertoire ''scripts''. Il permet de vérifier la configuration ainsi que les données de performances de vos machines et services. Il peut être lancé avant ou pendant l'utilisation de PNP.+En cas de problèmes, il existe un script appelé ''verify_pnp_config.pl'' localisé sur  http://verify.pnp4nagios.org. Ce script vous permet de vérifier votre configuration complète aussi bien sur les données de performance des Hosts et des services. Il peut être utilisé avant le lancement de PNP ou pendant son utilisation.
-*** NB *** : ce document s'appuie sur la version v0.1.24 de verify_pnp_config qui est disponible dans la version stable courante disponible par téléchargement à l'emplacement suivant : http://www.pnp4nagios.org/pnp/dwnld. +===== Download ======
-Les anciennes versions pourraient disposer de moins d'options. Vous trouverez des indications sur chacune d'elle en fonction des versions.\\+
-*** NB *** : Dans la version 0.6.4 de PNP, il manque une ligne dans le script qui empêche sont fonctionnement. Il faut ajouter la ligne suivante avant exécution : 
-<code>     $CPcfg{'$conf[\'max_age\']'} = 'n;^\(?[\d\* ]+\)?$'; 
-     $CPcfg{'$conf[\'temp\']'} = 'd;;'; 
-     $CPcfg{'$conf[\'base_url\']'} = "S;.+;";   # <-- add this line 
-     $CPcfg{'$conf[\'nagios_base\']'} = "S;.+;"; 
-     $CPcfg{'$conf[\'allowed_for_service_links\']'} = 'S;[\S,]+;';</code> 
- 
-*** NB *** : Les options longues commencent toujours avec deux "-" ce qui n'est pas forcément toujours bien visible dans le texte.\\ 
- 
-Le test de la configuration peut-être fait en exécutant <code>./verify_pnp_config.pl -m <mode></code> en remplaçant <mode> par sync, bulk or NPCD. 
- 
-L'utilisation de l'option ''-h'' ou ''–-help'' renvoi le message suivant : 
<code> <code>
--h, --help        print these lines +wget http://verify.pnp4nagios.org/verify_pnp_config
--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 ("sync", "bulk", "NPCD") +
--l, --logfile=s   check configure log file +
--D, --pnpdir=s    PNP root dir (PNP version >= 0.6) +
--N, --npcdcfg=s   PNP config file for NPCD mode (default: /usr/local/pnp4nagios/etc/pnp/npcd.cfg) +
--P, --ppcfg=s     process_perfdata config file (default: /usr/local/pnp4nagios/etc/pnp/process_perfdata.cfg) +
--C, --cpcfg=s     PNP config file (config.php) +
--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/pnp4nagios/var/perfdata) or "no" for no check +
--U, --resource=s  location of the resource config file (default: /usr/local/nagios/etc/resource.cfg) +
--M, --monitor=s   specify the monitoring product (default: nagios; may be "icinga") +
--L, --layout=s    specify a layout (Nagios2, Nagios3, SuSE, Fedora) +
--T, --template=s  specify the path to the templates directory (default /usr/local/pnp4nagios/share/templates.dist) +
--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) +
--t, --time        show warnings if RRDfiles are too old +
--s, --skip        skip check of installed packages +
--n, --native      show messages in native language (so far "es" or "de") +
--e, --english     show english messages/links +
--d, --debug       some debugging output +
--I, --info        show information about compile time variable settings+
</code> </code>
-Le programme nagios et l'accès au fichier de configuration sont nécessaire. Si vous n'avez pas de chemin standard pour votre installation du fait de l'utilisation d'un package, vous pouvez utiliser les chemins pré-définis via l'option -L. "suse" et "fedora" marcherons pour ces distributions tandis que "nagios2" et "nagios3" marcherons sur les autres distributions en fonction de votre version de nagios installé. Si rien de tout ceci ne fonctionne, vous pouvez utiliser une de ces 3 options (-b -B ou -c) pour spécifier l'emplacement de base de nagios, le nom de votre binaire ainsi que l'emplacement du fichier de configuration principal. TODO 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. Using -U you can specify the location on the resource config file. 
-Without specifying any options the help page will be shown so you'll have to specify either the mode or an object.+===== Test ======
-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''.+Le script de vérification est accessible sur http://verify.pnp4nagios.org et a besoin de trois options pour être utilisé
-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.+  * ''--mode'' One of the modes described on [[modes]] 
 +  * ''--config'' Path nagios.cfg or icinga.cfg 
 +  * ''--pnpcfg'' Path to PNP´s etc directory
-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. +<code> 
- +lenny:~# perl verify_pnp_config --mode npcdmod --config=/usr/local/nagios/etc/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc 
-Together with the option ''-o <object>'' (''--object=<object>'') you specify a string which is compared to hostnames and/or service descriptions in the objects cache file. The string should be enclosed in quotes to escape blanks and several special characters+[INFO]  ========== Starting Environment Checks ============ 
-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. +[INFO]  My version is: verify_pnp_config-0.6.14-R.31 
- +[INFO]  Reading /usr/local/nagios/etc/nagios.cfg 
-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+[OK  ]  Running product is 'nagios' 
-   * hostname/service description => string matches hostname or service description +[OK  ]  object_cache_file is defined 
-   * hostname; => string only matches against hostnames +[OK  ]  object_cache_file=/usr/local/nagios/var/objects.cache 
-   * ;service description => string only matches against service descriptions +[INFO]  Reading /usr/local/nagios/var/objects.cache 
-   * hostname;service description => hostname and service description have to match +[OK  ]  resource_file is defined 
- +[OK  ]  resource_file=/usr/local/nagios/etc/resource.cfg 
-Starting with PNP version 0.6 the directory layout has changed so all files are below a separate directory which can be specified using "-D" (--pnpdir) if it differs from /usr/local/pnp4nagios. This also affects the options "-N", "-P" and "-C", respectively, so you may not have to specify separate values for these options. +[INFO]  Reading /usr/local/nagios/etc/resource.cfg 
- +[INFO]  Reading /usr/local/pnp4nagios/etc/process_perfdata.cfg 
-When using the NPCD mode you can use ''-N <config file>'' (''--npcdcfg=<config file>'') to specify the location of the config file if its name or location differs from the default (/usr/local/pnp4nagios/etc/npcd.cfg). +[INFO]  Reading /usr/local/pnp4nagios/etc/pnp4nagios_release 
- +[OK  ]  Found PNP4Nagios version "0.6.14
-Using the option ''-P <config file>'' (''--ppcfg=<config file>'') you can specify the name of the config file for process_perfdata.pl if name or location differs from the default (/usr/local/pnp4nagios/etc/process_perfdata.cfg)+[OK  ]  Effective User is 'nagios' 
- +[OK  ]  User nagios exists with ID '1000' 
-Using the option -M (--monitor) enables you to specify the product which delivers the data to PNP. The default is "nagios" but "icinga" is supported now as well. Additionally you may have to use the options -b, -B and -c as well. +[OK  ]  Effective group is 'nagios' 
- +[OK  ]  Group nagios exists with ID '1000' 
-Sometimes changes in template files result in errors which are hard to find in the web GUI. Using the option -T the template files are checked for errors. Specify the path to the templates diretory as a parameter+[INFO]  ========== Checking npcdmod Mode Config  ============ 
- +[OK  ]  process_performance_data is 1 compared with '/1/' 
-Per default the script checks if certain packages are installed. If you experience difficulties with these checks (or when you're sure the required packages are installed) you can use the option -s (--skip) to skip these checks+[OK  ]  event_broker_options is defined 
- +[OK  ]  event_broker_options=-1 
-Using -n (--native) you can specify "es" or "de" to see spanish or german messages, respectively+[OK  ]  event_broker_option bits 2 and 3 enabled (12) 
- +[OK  ]  broker_module is defined 
-The option ''-e'' (''--english'') enables you to force the use of english messages if the script detects german language settings+[OK  ]  broker_module=/usr/local/pnp4nagios/lib/npcdmod.o config_file=/usr/local/pnp4nagios/etc/npcd.cfg 
- +[OK  ]  npcdmod.o config file is /usr/local/pnp4nagios/etc/npcd.cfg 
-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. +[OK  ]  /usr/local/pnp4nagios/etc/npcd.cfg used by npcdmod.o is readable 
- +[OK  ]  npcd daemon is running 
-The option ''-I'' (''--info'') shows the settings of variables like ''prefix'', ''datadir'' and other things you might have changed during './configure'. In some cases we need to know these values and using this option is easier than searching different files. The option is available starting with PNP 0.6.7+[OK  ]  /usr/local/pnp4nagios/etc/npcd.cfg is used by npcd and readable 
-  +[OK  ]  npcd and npcdmod.o are using the same config file (/usr/local/pnp4nagios/etc/npcd.cfg) 
-Each output line will start with a letter indicating the type of information: +[INFO]  Nagios config looks good so far 
- +[INFO]  ========== Checking config values ============ 
-''[I] ''informational message about settings, things to be done, ...\\  +[INFO]  Reading /usr/local/pnp4nagios/etc/npcd.cfg 
-''[A] ''actions to be taken\\  +[OK  ]  Script /usr/local/pnp4nagios/libexec/process_perfdata.pl is executable 
-''[W] ''warning message\\  +[INFO]  ========== Starting global checks ============ 
-''[E] ''error message: PNP will not work without resolving the problem(s)\\  +[OK  ]  status_file is defined 
-''[H] ''hint: it might be worth reading the appropriate documentation\\ +[OK  ]  status_file=/dev/shm/status.dat 
-''[D] ''debugging message, hopefully showing the source of your problem\\ +[INFO]  Reading /dev/shm/status.dat 
 +[INFO]  ==== Starting rrdtool checks ==== 
 +[OK ]  RRDTOOL is defined 
 +[OK  ]  RRDTOOL=/usr/bin/rrdtool 
 +[OK  ]  /usr/bin/rrdtool is executable 
 +[OK  ]  RRDtool 1.3.1  Copyright 1997-2008 by Tobias Oetiker <tobi@oetiker.ch> 
 +[OK  ]  USE_RRDs is defined 
 +[OK  ]  USE_RRDs=1 
 +[OK  ]  Perl RRDs modules are loadable 
 +[INFO] ==== Starting directory checks ==== 
 +[OK  ] RRDPATH is defined 
 +[OK  ] RRDPATH=/usr/local/pnp4nagios/var/perfdata 
 +[OK  ] Perfdata directory '/usr/local/pnp4nagios/var/perfdata' exists 
 +[WARN]  62 hosts/services are not providing performance data 
 +[WARN] 'process_perf_data 1' is set for 43 hosts/services which are not providing performance data! 
 +[WARN]  'process_perf_data 0' is set for 27 of your hosts/services 
 +[OK  ] 'process_perf_data 1' is set for 243 of your hosts/services 
 +[INFO]  ==== System sizing ==== 
 +[OK  ]  269 hosts/service objects defined 
 +[INFO]  ==== Check statistics ==== 
 +[WARN]  Warning: 3, Critical: 0 
 +[WARN]  Checks finished... 
 +</code>
-[[start|back to contents]] | [[webfe|web frontend]] 
fr/pnp-0.6/verify_pnp_config.1289149093.txt.gz · Last modified: 2010/11/07 17:58 by yannig
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0