Outils pour utilisateurs

Outils du site


tech:exemple_simple_de_conf_nagios

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
tech:exemple_simple_de_conf_nagios [2026/01/15 22:17] Jean-Baptistetech:exemple_simple_de_conf_nagios [2026/01/22 17:06] (Version actuelle) Jean-Baptiste
Ligne 6: Ligne 6:
 Voir : Voir :
 * https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/objectinheritance.html * https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/3/en/objectinheritance.html
 +* https://packages.debian.org/sid/nagios4-common
 +* https://github.com/Webconverger/nagios
 +
 +Voir aussi :
 +* https://github.com/monitoring-fr/Documentation-Nagios-3.x-French
  
  
Ligne 11: Ligne 16:
  
  
-Le fichier de conf principale appelant tous les autres : +Le fichier de conf principal appelant tous les autres : 
-* etc/nagios.cfg+etc/nagios.cfg  
 +  * Voir https://github.com/NagiosEnterprises/nagioscore/blob/master/t/etc/nagios.cfg
  
 Fichier contenant les commandes à exécuter : Fichier contenant les commandes à exécuter :
Ligne 43: Ligne 49:
 ## Exemple de conf ## Exemple de conf
  
-### Fichier de conf principale nagios.cfg+### Fichier de conf principal nagios.cfg
  
 Extrait Extrait
Ligne 84: Ligne 90:
  
 ~~~c ~~~c
-# 'check-host-alive' command definition 
 define command { define command {
     command_name    check-host-alive     command_name    check-host-alive
Ligne 90: Ligne 95:
 } }
  
-# 'notify-service-by-email' command definition 
 define command { define command {
     command_name    notify-service-by-email     command_name    notify-service-by-email
Ligne 96: Ligne 100:
 } }
  
-# 'notify-host-by-email' command definition 
 define command { define command {
     command_name    notify-host-by-email     command_name    notify-host-by-email
Ligne 265: Ligne 268:
     saturday         00:00-24:00     saturday         00:00-24:00
 } }
- 
  
 # 'workhours' timeperiod definition # 'workhours' timeperiod definition
Ligne 287: Ligne 289:
     email                   nagios@localhost  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******     email                   nagios@localhost  ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
 } }
 +
  
 define contactgroup { define contactgroup {
Ligne 365: Ligne 368:
     hostgroup_name          App     hostgroup_name          App
     alias                   ReseauGlobalApp     alias                   ReseauGlobalApp
-    # hostgroup_members      linux-hosts, Switchs, Routeurs, printer-hosts+    # hostgroup_members       linux-hosts, Switchs, Routeurs, printer-hosts
     hostgroup_members       linux-hosts     hostgroup_members       linux-hosts
 } }
Ligne 399: Ligne 402:
 Trouver les commandes non utilisées Trouver les commandes non utilisées
 ~~~bash ~~~bash
-for CMD in $(grep command_name etc/objects/commands.cfg | grep -v "^#" |awk '{ print $2}' | sort  -u) ; do grep -q "$CMD" $(find etc/objects/ -type f -not -name commands.cfg) || echo $CMD; done+for CMD in $(grep command_name etc/objects/commands.cfg | grep -v "^#" | awk '{ print $2}' | sort  -u) ; do grep -q "$CMD" $(find etc/objects/ -type f -not -name commands.cfg) || echo $CMD; done
 ~~~ ~~~
  
Ligne 442: Ligne 445:
 * Pour toute directive "use" il doit y avoir un template corespondant (template.cfg) * Pour toute directive "use" il doit y avoir un template corespondant (template.cfg)
 * Pour chaque "check_command" il doit y avoir une entrée "command_name" correspondante (commands.cfg) * Pour chaque "check_command" il doit y avoir une entrée "command_name" correspondante (commands.cfg)
-* Tous les noms indiqués par la directive "name" dans les objets de type "host"+* Tous les noms indiqués par la directive "name" dans les objets de type "host" doivent être résolvables  
  
tech/exemple_simple_de_conf_nagios.1768511863.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki