Outils pour utilisateurs

Outils du site


tech:notes_supervision_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:notes_supervision_nagios [2026/01/14 14:52] Jean-Baptistetech:notes_supervision_nagios [2026/01/16 14:51] (Version actuelle) Jean-Baptiste
Ligne 7: Ligne 7:
  
 Voir : Voir :
 +* [[Exemple simple de conf Nagios]]
 * [Stop using Nagios - Andy Sykes](https://www.youtube.com/watch?v=Q9BagdHGopg) * [Stop using Nagios - Andy Sykes](https://www.youtube.com/watch?v=Q9BagdHGopg)
 * https://guihot.fr/assets/doc/documentation_supervision.pdf * https://guihot.fr/assets/doc/documentation_supervision.pdf
Ligne 59: Ligne 60:
 ~~~bash ~~~bash
  
-define service{+define service {
         service_description     Memory         service_description     Memory
         hostgroup_name          WEB_APP1         hostgroup_name          WEB_APP1
Ligne 78: Ligne 79:
 ~~~bash ~~~bash
  
-define command{+define command {
         command_name    check_snmp_mem_cpu         command_name    check_snmp_mem_cpu
         command_line    $USER1$/check_snmp_mem.sh -H $HOSTADDRESS$ -t $ARG1$ -w $ARG2$ -c $ARG3$         command_line    $USER1$/check_snmp_mem.sh -H $HOSTADDRESS$ -t $ARG1$ -w $ARG2$ -c $ARG3$
Ligne 100: Ligne 101:
 Dans certains cas il faudrait créer un hôte fantôme pour porter le service  Dans certains cas il faudrait créer un hôte fantôme pour porter le service 
  
 +Dummy
 +
 +''commands.cfg''
 +~~~bash
 +# 'check_dummy' command definition
 +# NOTE: This command always returns an 'OK' result no matter what.
 +define command {
 +        command_name    check_dummy
 +        command_line    $USER1$/check_dummy 0
 +}
 +~~~
 +
 +
 +''remotes.cfg''
 ~~~c ~~~c
-define host{+define host {
         host_name     generic         host_name     generic
- use                 linux-server+        use                 generic-host
  check_command     check_dummy!0     # Revoit toujours OK  check_command     check_dummy!0     # Revoit toujours OK
         max_check_attempts  1         max_check_attempts  1
Ligne 109: Ligne 124:
 } }
  
-define service{+define service {
         service_description plop         service_description plop
         use generic-service         use generic-service
Ligne 115: Ligne 130:
  check_command check_plop!80  check_command check_plop!80
 } }
- 
-~~~ 
- 
- 
- 
-#### Bonne solution 
- 
-Finalement la solution est 
- 
- 
-~~~c 
-define host{ 
-        host_name target 
- use             generic-host 
-} 
- 
-define service{ 
-        service_description plop 
-        use generic-service 
- host_name target 
- check_command check_plop!80 
-} 
- 
- 
 ~~~ ~~~
  
Ligne 186: Ligne 177:
 ''etc/objects/servers.cfg'' ''etc/objects/servers.cfg''
 ~~~c ~~~c
-define service{+define service {
     use generic-service     use generic-service
     hostgroup linux-remotes-servers     hostgroup linux-remotes-servers
Ligne 201: Ligne 192:
  
 ~~~c ~~~c
-define service{+define service {
         service_description     CPU Stats         service_description     CPU Stats
         servicegroups   sysres         servicegroups   sysres
Ligne 211: Ligne 202:
 ~~~ ~~~
  
- 
-### Conf command 
- 
-Dummy 
-''commands.cfg'' 
-~~~bash 
-# 'check_dummy' command definition 
-# NOTE: This command always returns an 'OK' result no matter what. 
-define command{ 
-        command_name    check_dummy 
-        command_line    $USER1$/check_dummy 0 
-} 
-~~~ 
  
  
  
  
tech/notes_supervision_nagios.1768398729.txt.gz · Dernière modification : de Jean-Baptiste

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki