Outils pour utilisateurs

Outils du site


admin:services:date.chapril.org

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
Prochaine révisionLes deux révisions suivantes
admin:chatons:date.chapril.org [2019/10/16 20:17] – [Préparation] dclermonteadmin:chatons:date.chapril.org [2019/12/07 18:52] – [Monitoring] dclermonte
Ligne 424: Ligne 424:
 45 23 * * * /usr/bin/php /var/www/date.chapril.org/admin/cron_purge.php >> /srv/date.chapril.org/cron_purge.log 2>&1 45 23 * * * /usr/bin/php /var/www/date.chapril.org/admin/cron_purge.php >> /srv/date.chapril.org/cron_purge.log 2>&1
 </code> </code>
 +
 +====== Monitoring ======
 +
 +Mettre dans le dossier /usr/lib/nagios/plugins un fichier check_datechaprilorg_update:
 +
 +<code>
 +#!/bin/bash
 +function usage() {
 + echo "Usage : $0"
 +}
 +
 +#
 +if [ "$#" -ne 0 ]; then
 +    usage
 +else
 +    lastVersion=$(curl -s https://framagit.org/api/v4/projects/16/releases | jshon -a -e name|cut -d '"' -f2|grep -v '[\^\(alpha\)]'|head -n 1)
 +    currentVersion=$(cd /var/www/date.chapril.org && git branch | grep '*'|cut -c 11-100 )
 +
 +    #echo $currentVersion
 +    #echo $lastVersion
 +    if [ $currentVersion = $lastVersion ]; then
 + echo "OK"
 + result=0
 +    else
 + echo "WARNING : new version available, current is $currentVersion, last is $lastVersion."
 + result=1
 +    fi    
 +fi
 +exit $result
 +
 +</code>
 +
 +Le fichier est commité dans ''/var/www/date.chapril.org/tools/''.
admin/services/date.chapril.org.txt · Dernière modification : 2023/02/25 11:30 de obitanz