start:developpement:joomla:nagioscheck4updates
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| start:developpement:joomla:nagioscheck4updates [2012/12/07 16:39] – fufroma | start:developpement:joomla:nagioscheck4updates [2012/12/07 16:45] (Version actuelle) – fufroma | ||
|---|---|---|---|
| Ligne 14: | Ligne 14: | ||
| * http:// | * http:// | ||
| - | ==== Intégration dans Nagios ==== | + | ===== Intégration dans Nagios |
| - | === Wrapper Nagios === | + | ==== Wrapper Nagios |
| <code bash / | <code bash / | ||
| #!/bin/bash | #!/bin/bash | ||
| - | # Recupere le status de la sonde d' | + | # Wrapper for nagioscheck4updates |
| - | # Simple page sans balise | + | # Documentation: http:// |
| - | # - premiere ligne, le code de retour pour nagios | + | |
| - | # - seconde ligne, le commentaire pour nagios | + | if [ 3 -ne $# ] ; then |
| + | echo "Wrong parameters." | ||
| + | echo "Usage : $0 web_site username password" | ||
| + | exit | ||
| + | fi | ||
| site=$1 | site=$1 | ||
| Ligne 37: | Ligne 41: | ||
| STATE_DEPENDENT=4 | STATE_DEPENDENT=4 | ||
| + | # Get status | ||
| ret=$(wget -q -O - " | ret=$(wget -q -O - " | ||
| nbl=$(echo -e " | nbl=$(echo -e " | ||
| + | # Check the content of the page | ||
| if [ 2 -ne $nbl ] ; then | if [ 2 -ne $nbl ] ; then | ||
| echo " | echo " | ||
| Ligne 50: | Ligne 56: | ||
| comment=$(echo -e " | comment=$(echo -e " | ||
| + | # Check informations of the Joomla! component | ||
| if [[ ! " | if [[ ! " | ||
| echo " | echo " | ||
| Ligne 55: | Ligne 62: | ||
| fi | fi | ||
| + | # Return informations | ||
| echo $comment | echo $comment | ||
| exit $state | exit $state | ||
| </ | </ | ||
| - | === Configuration de Nagios === | + | ==== Configuration de Nagios |
| Tout d' | Tout d' | ||
start/developpement/joomla/nagioscheck4updates.1354894779.txt.gz · Dernière modification : 2012/12/07 16:39 de fufroma
