start:developpement:joomla:nagioscheck4updates
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
start:developpement:joomla:nagioscheck4updates [2012/12/07 15:32] – created 212.85.130.11 | start:developpement:joomla:nagioscheck4updates [2012/12/07 16:45] (Version actuelle) – fufroma | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | Nagios Check4Updates est un composant Joomla! | + | ====== Nagios Check4Updates ====== |
+ | Nagios Check4Updates est un composant | ||
- | Il est ainsi possible de suivre depuis Nagios un grand nombre | + | Il facilite la supervision des mises à jour de Joomla! |
- | Après installation de ce composant dans Joomla, n' | + | Il est ainsi possible de superviser depuis votre outil de monitoring (type Nagios) vos sites Joomla! afin de suivre les mise à jour et ainsi profiter de la correction des failles de sécuritées. |
+ | |||
+ | Après installation de ce composant dans Joomla, n' | ||
Ce composant est édité sous licence Libre GPL. | Ce composant est édité sous licence Libre GPL. | ||
- | {{: | + | ===== Téléchargement ===== |
+ | |||
+ | * http:// | ||
+ | |||
+ | ===== Intégration dans Nagios ===== | ||
+ | ==== Wrapper Nagios ==== | ||
+ | <code bash / | ||
+ | # | ||
+ | |||
+ | # Wrapper for nagioscheck4updates | ||
+ | # Documentation: | ||
+ | |||
+ | if [ 3 -ne $# ] ; then | ||
+ | echo "Wrong parameters." | ||
+ | echo "Usage : $0 web_site username password" | ||
+ | exit | ||
+ | fi | ||
+ | |||
+ | site=$1 | ||
+ | user=$2 | ||
+ | pass=$3 | ||
+ | |||
+ | url=" | ||
+ | |||
+ | # Var NAGIOS | ||
+ | STATE_OK=0 | ||
+ | STATE_WARNING=1 | ||
+ | STATE_CRITICAL=2 | ||
+ | STATE_UNKNOWN=3 | ||
+ | STATE_DEPENDENT=4 | ||
+ | |||
+ | # Get status | ||
+ | ret=$(wget -q -O - " | ||
+ | |||
+ | nbl=$(echo -e " | ||
+ | |||
+ | # Check the content of the page | ||
+ | if [ 2 -ne $nbl ] ; then | ||
+ | echo " | ||
+ | echo -e " | ||
+ | exit $STATE_UNKNOWN | ||
+ | fi | ||
+ | |||
+ | state=$(echo -e " | ||
+ | comment=$(echo -e " | ||
+ | |||
+ | # Check informations of the Joomla! component | ||
+ | if [[ ! " | ||
+ | echo " | ||
+ | exit $STATE_UNKNOWN | ||
+ | fi | ||
+ | |||
+ | # Return informations | ||
+ | echo $comment | ||
+ | exit $state | ||
+ | </ | ||
+ | |||
+ | ==== Configuration de Nagios ==== | ||
+ | |||
+ | Tout d' | ||
+ | <code / | ||
+ | # Definition de services | ||
+ | define service{ | ||
+ | name generic-joomla-upgrade | ||
+ | service_description | ||
+ | use | ||
+ | check_command | ||
+ | check_interval | ||
+ | retry_interval | ||
+ | notification_interval | ||
+ | register | ||
+ | | ||
+ | |||
+ | define command{ | ||
+ | command_name | ||
+ | command_line | ||
+ | } | ||
+ | </ | ||
+ | Maintenant, pour chaque site que vous souhaitez superviser : | ||
+ | <code / | ||
+ | define service{ | ||
+ | host_name | ||
+ | service_description | ||
+ | use | ||
+ | check_command | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
start/developpement/joomla/nagioscheck4updates.1354890728.txt.gz · Dernière modification : 2012/12/07 15:32 de 212.85.130.11