Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente |
informatique:systeme:monitoring:nagios [2013/02/18 08:25] – bn8 | informatique:systeme:monitoring:nagios [2013/12/18 17:58] (Version actuelle) – bn8 |
---|
<note>Le plugin officiel ne retourne pas d'information de performance en suivant la syntaxe Nagios. J'ai écris [[http://git.zionetrix.net/check_mysql_with_perfdata|un plugin]] qui utilise le plugin officiel et réécris le résultat en intégrant les informations de performances en suivant la syntaxe de Nagios.</note> | <note>Le plugin officiel ne retourne pas d'information de performance en suivant la syntaxe Nagios. J'ai écris [[http://git.zionetrix.net/check_mysql_with_perfdata|un plugin]] qui utilise le plugin officiel et réécris le résultat en intégrant les informations de performances en suivant la syntaxe de Nagios.</note> |
| |
| == MongoDB == |
| |
| * Installation du plugin nagios : <code>git clone https://github.com/tag1consulting/check_mongo /usr/local/src/check_mongo |
| ln -s /usr/local/src/check_mongo/check_mongo /usr/local/lib/nagios/plugins/</code> |
| |
| <note>Il y avait une coquille dans le script original que j'ai corrigé. Une [[https://github.com/tag1consulting/check_mongo/pull/3|pull request]] a été proposé sur le github du projet pour corrigé cela.</note> |
| |
| * Puis ajouter la commande //check_mongo// dans la configuration d'NRPE et recharger sa configuration : <code>echo "command[check_mongo]=/usr/local/lib/nagios/plugins/check_mongo -H 127.0.0.1 -P 27017 -A connect" > /etc/nagios/nrpe.d/mongo.cfg</code> |
| |
| |
| == PostgreSQL == |
| |
| * Créér l'utilisateur PostgreSQL local //nagios// et lui donner les droits de se connecter : <code>su - postgres |
| createuser -D -R -S nagios |
| exit |
| echo "local template1 nagios ident" >> /etc/postgresql/9.1/main/pg_hba.conf |
| service postgresql reload</code> |
| |
| * Puis ajouter la commande //check_psql// dans la configuration d'NRPE et recharger sa configuration : <code>echo "# Postgresql connexion |
| # Requirement: |
| # * as user postgres, run "createuser -D -R -S nagios" |
| # * add this on top of pg_hba.conf rules: |
| # local template1 nagios ident |
| command[check_pgsql]=/usr/lib/nagios/plugins/check_pgsql -l nagios" > /etc/nagios/nrpe.d/postgresql.cfg</code> |
| |
== SMTP == | == SMTP == |
| |
== Synchronisation LDAP == | == Synchronisation LDAP == |
* Utiliser ce script : [[http://exchange.nagios.org/directory/Plugins/Network-Protocols/LDAP/Openldap-Syncrepl/details|check_syncrepl.py]] | * Utiliser ce script : [[http://git.zionetrix.net/check_syncrepl_extended|check_syncrepl_extended]] |
* Copier le ici :<code>/usr/local/lib/nagios/plugins/check_syncrepl</code> | * Copier le dans ///usr/local/lib/nagios/plugins// |
* Rendre le plugin exécutable : <code>chmod +x /usr/local/lib/nagios/plugins/check_syncrepl</code> | * Rendre le plugin exécutable : <code>chmod +x /usr/local/lib/nagios/plugins/check_syncrepl_extended</code> |
* Installer les dépenses :<code>apt-get install python-ldap</code> | * Installer les dépenses :<code>apt-get install python-ldap</code> |
* Ligne de la commande à ajouter dans //nrpe_local.cfg// : <code>command[ldapsync]=/usr/local/lib/nagios/plugins/check_syncrepl -q -n -D"DN" -p "MDP1" -P "MPD2" -b "BASEDN" -t 10 "LDAPURI1" "LDAPURI2"</code> | * Ligne de la commande à ajouter dans //nrpe_local.cfg// : <code>command[ldapsync]=/usr/local/lib/nagios/plugins/check_syncrepl_extended -q -n -D"DN" -P "MDP" -b "BASEDN" -p "LDAPURI1" -c "LDAPURI2" -a</code> |
| |
| |