NAGIOS commandes

NAGIOS

Creer un host:

                Creer un nouveau fichier de conf dans /etc/nagios4/objects (srvLin.cfg)

L’ajouter aux hostgroups:

                nano /etc/nagios4/objects/hostgroup.cfg

                check_local_disk

                check_ping

                check_local

Ajouter un service:

                Ajouter le service soit sur l’hostgroup soit sur le host cfg.

                define service{

                               use                                        generic-service

                               hostnam

                               }

Ca ligne de commande se check depuis le dossier /usr/lib/nagios/plugins/

                               Pour avoir l’aide il faut faire ./check_http -h

Créer fichier de config :

Pour creer le fichier de config si inexistant, le creer soit dans objects soit dans /etc/nagios-plugins/config

                               Il aura cette forme la:

        define command{
			command_name	check_http
			command_line	/usr/lib/nagios/plugins/check_http -H '$var$ -I '$var2$'
		}
                     

Updated on 15 May 2025