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/19 10:10] Jean-Baptistetech:exemple_simple_de_conf_nagios [2026/01/22 17:06] (Version actuelle) Jean-Baptiste
Ligne 16: 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   * Voir https://github.com/NagiosEnterprises/nagioscore/blob/master/t/etc/nagios.cfg
Ligne 49: Ligne 49:
 ## Exemple de conf ## Exemple de conf
  
-### Fichier de conf principale nagios.cfg+### Fichier de conf principal nagios.cfg
  
 Extrait Extrait
Ligne 90: Ligne 90:
  
 ~~~c ~~~c
-# 'check-host-alive' command definition 
 define command { define command {
     command_name    check-host-alive     command_name    check-host-alive
Ligne 96: 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 102: 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 371: 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 405: 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
 ~~~ ~~~
  
tech/exemple_simple_de_conf_nagios.1768813825.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki