#!/bin/bash # Icinga Probe Script for WordPress Performance Metrics # Usage: ./icinga-probe.sh [url] # Configuration URL="${1:-https://wp.unil.ch/}" SECRET="M4iov6OfDNnw6dMXGh2abq5s" # Must match performance-probe.php TARGET_URL="${URL%/}/performance-status" # performance-probe.php endpoint. Must be installed as a mu-plugin. # Thresholds (in ms) WARN_MS=2000 CRIT_MS=10000 # Fetch the probe data using a Request Header instead of query param (cleaner logs) RESPONSE=$(curl -s -H "X-WP-Performance-Probe: ${SECRET}" "$TARGET_URL") # Check if curl succeeded and the response contains JSON if [ $? -ne 0 ] || [[ ! "$RESPONSE" =~ "total_ms" ]]; then echo "CRITICAL - Could not reach the WordPress performance probe at ${URL}" exit 2 fi TOTAL_MS=$(echo "$RESPONSE" | grep -o '"total_ms":[0-9.]*' | cut -d: -f2) QUERIES=$(echo "$RESPONSE" | grep -o '"queries":[0-9]*' | cut -d: -f2) MEMORY=$(echo "$RESPONSE" | grep -o '"memory_mb":[0-9.]*' | cut -d: -f2) # Determine Icinga status STATUS="OK" EXIT_CODE=0 # awk-based comparison for floating point numbers IS_CRIT=$(awk -v total="$TOTAL_MS" -v crit="$CRIT_MS" 'BEGIN {print (total > crit) ? 1 : 0}') IS_WARN=$(awk -v total="$TOTAL_MS" -v warn="$WARN_MS" 'BEGIN {print (total > warn) ? 1 : 0}') if [ "$IS_CRIT" -eq 1 ]; then STATUS="CRITICAL" EXIT_CODE=2 elif [ "$IS_WARN" -eq 1 ]; then STATUS="WARNING" EXIT_CODE=1 fi # Format Icinga/Nagios: STATUS - Message | label=value[UOM];[warn];[crit];[min];[max] echo "${STATUS} - WP Bootstrap: ${TOTAL_MS}ms (${QUERIES} queries, ${MEMORY}MB) | wp_total_ms=${TOTAL_MS}ms;${WARN_MS};${CRIT_MS};0; wp_queries=${QUERIES};;;0; wp_memory_mb=${MEMORY}MB;;;0;" exit $EXIT_CODE Un stratège vaudois au service de Napoléon - Rarissima

Un stratège vaudois au service de Napoléon

Antoine-Henri Jomini, Atlas pour servir à l’intelligence de l’Histoire critique et militaire des guerres de la Révolution
Bruxelles : chez J.-B. Petit, 1840
AC 546

Important atlas documentant les guerres du 1er Empire Son auteur, Antoine-Henri Jomini, né à Payerne en 1779, a été appelé par Napoléon à rejoindre l’Etat major de la Grande armée. Son Précis de l’art de la guerre, en particulier, fut considéré au XIXe siècle comme le guide le plus méthodique et le plus complet sur les mécanismes des opérations militaires. Il a été enseigné dans les écoles militaires de Russie, d’Angleterre, d’Allemagne, de France, de Belgique et des États-Unis.

Contient 38 cartes lithographiées, dont 2 imprimées sur un même feuillet, certaines avec des replis ou des superpositions, rehaussées à l’aquarelle pour certaines.