MONITORING - Configuration du monitoring RPS : Différence entre versions
De PedroWiki
(Nouvelle page : = Introduction = Article "bloc-note" sur la mise en place du monitoring de rps.pedrono.fr = Objectifs = Monitoring de services: * monitorer le service "ssh" * monitorer le service...) |
|||
Ligne 22 : | Ligne 22 : | ||
[http://nagios.sourceforge.net/docs/3_0/monitoring-linux.html Monitorer des hôtes Linux] | [http://nagios.sourceforge.net/docs/3_0/monitoring-linux.html Monitorer des hôtes Linux] | ||
+ | |||
+ | == Monitorer le RPS == | ||
+ | |||
+ | Sur Corni, édition de ''/usr/local/nagios/etc/nagios.cfg'': | ||
+ | ... | ||
+ | # Definitions for monitoring the RPS server | ||
+ | cfg_file=/usr/local/nagios/etc/objects/rps.cfg | ||
+ | ... | ||
+ | |||
+ | Sur Corni, création d'un fichier de config pour serveur Linux: | ||
+ | jules@corni:/usr/local/nagios/etc$ sudo cp objects/localhost.cfg objects/rps.cfg | ||
+ | |||
+ | Adaptation de la configuration, déclaration du serveur: | ||
+ | define host{ | ||
+ | use linux-server | ||
+ | host_name rps.pedrono.fr | ||
+ | alias '''rps''' | ||
+ | address 87.98.167.215 | ||
+ | } | ||
+ | |||
+ | define hostgroup{ | ||
+ | hostgroup_name '''serveur_prod''' | ||
+ | alias Serveurs de production | ||
+ | members '''rps''' | ||
+ | } | ||
+ | |||
+ | Adaptation de la configuration, déclaration des services: | ||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''PING''' | ||
+ | check_command check_ping!100.0,20%!500.0,60% | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Check du slash''' | ||
+ | check_command check_nrpe!check_slash | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Check du home''' | ||
+ | check_command check_nrpe!check_home | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Utilisateurs Connectés''' | ||
+ | check_command check_nrpe!check_users | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Nombre de processus''' | ||
+ | check_command check_nrpe!check_total_procs | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Charge systeme''' | ||
+ | check_command check_nrpe!check_load | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''Postfix queue''' | ||
+ | check_command check_nrpe!check_mailq | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''SSH''' | ||
+ | check_command check_ssh | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''HTTP''' | ||
+ | check_command check_http | ||
+ | } | ||
+ | |||
+ | define service{ | ||
+ | use generic-service | ||
+ | host_name rps | ||
+ | service_description '''FTP''' | ||
+ | check_command check_ftp | ||
+ | } | ||
[[Category:Monitoring]] | [[Category:Monitoring]] | ||
[[Category:Securite]] | [[Category:Securite]] | ||
[[Category:Howto]] | [[Category:Howto]] |
Version du 22 mars 2009 à 15:42
Introduction
Article "bloc-note" sur la mise en place du monitoring de rps.pedrono.fr
Objectifs
Monitoring de services:
- monitorer le service "ssh"
- monitorer le service "http"
- monitorer le service "ftp"
Monitoring NRPE:
- monitorer la queue de mail (détection d'utilisation frauduleuse du smtp)
- monitorer le remplissage de /
- monitorer le remplissage de /home (sites web)
- monitorer les utilisateurs connectés
- monitorer la charge système
Configuration
Référence documentaire
Monitorer le RPS
Sur Corni, édition de /usr/local/nagios/etc/nagios.cfg:
... # Definitions for monitoring the RPS server cfg_file=/usr/local/nagios/etc/objects/rps.cfg ...
Sur Corni, création d'un fichier de config pour serveur Linux:
jules@corni:/usr/local/nagios/etc$ sudo cp objects/localhost.cfg objects/rps.cfg
Adaptation de la configuration, déclaration du serveur:
define host{ use linux-server host_name rps.pedrono.fr alias rps address 87.98.167.215 }
define hostgroup{ hostgroup_name serveur_prod alias Serveurs de production members rps }
Adaptation de la configuration, déclaration des services:
define service{ use generic-service host_name rps service_description PING check_command check_ping!100.0,20%!500.0,60% }
define service{ use generic-service host_name rps service_description Check du slash check_command check_nrpe!check_slash }
define service{ use generic-service host_name rps service_description Check du home check_command check_nrpe!check_home }
define service{ use generic-service host_name rps service_description Utilisateurs Connectés check_command check_nrpe!check_users }
define service{ use generic-service host_name rps service_description Nombre de processus check_command check_nrpe!check_total_procs }
define service{ use generic-service host_name rps service_description Charge systeme check_command check_nrpe!check_load }
define service{ use generic-service host_name rps service_description Postfix queue check_command check_nrpe!check_mailq }
define service{ use generic-service host_name rps service_description SSH check_command check_ssh }
define service{ use generic-service host_name rps service_description HTTP check_command check_http }
define service{ use generic-service host_name rps service_description FTP check_command check_ftp }