frogg_freebox_check/zabbix_template_v7.json

492 lines
22 KiB
JSON

{
"zabbix_export": {
"version": "7.0",
"template_groups": [
{
"uuid": "7df96b18c230490a9a0a9e2307226338",
"name": "Templates"
},
{
"uuid": "57b7ae836ca64446ba2c296389c009b7",
"name": "Templates/Modules"
}
],
"templates": [
{
"uuid": "205fb168705047bda6a14ba96b445f1b",
"template": "Template Frogg Freebox API V10",
"name": "Template Frogg Freebox API V10",
"description": "Monitoring Freebox Revolution/Delta/Ultra via API V10\nMétriques : CPU, RAM, HDD, Réseau, Températures, Ventilateur, Uptime\nScript requis : /usr/lib/zabbix/externalscripts/frogg_freebox_check.sh",
"groups": [
{
"name": "Templates/Modules"
}
],
"macros": [
{
"macro": "{$FREEBOX_APP_ID}",
"value": "",
"type": "TEXT",
"description": "App ID enregistré sur la Freebox (ex: zabbix_monitor). Obtenu lors de l'enregistrement de l'application via /api/v10/login/authorize"
},
{
"macro": "{$FREEBOX_APP_TOKEN}",
"value": "",
"type": "SECRET_TEXT",
"description": "Token d'application fourni par la Freebox lors de l'autorisation. Stocké de façon sécurisée (secret)."
},
{
"macro": "{$FREEBOX_HOST}",
"value": "mafreebox.freebox.fr",
"type": "TEXT",
"description": "Hostname ou IP de la Freebox. Par défaut : mafreebox.freebox.fr (réseau local uniquement)"
},
{
"macro": "{$CPU_WARN_THRESHOLD}",
"value": "80",
"type": "TEXT",
"description": "Seuil d'alerte WARNING pour le CPU (%)"
},
{
"macro": "{$CPU_HIGH_THRESHOLD}",
"value": "95",
"type": "TEXT",
"description": "Seuil d'alerte HIGH pour le CPU (%)"
},
{
"macro": "{$RAM_WARN_THRESHOLD}",
"value": "80",
"type": "TEXT",
"description": "Seuil d'alerte WARNING pour la RAM (%)"
},
{
"macro": "{$RAM_HIGH_THRESHOLD}",
"value": "95",
"type": "TEXT",
"description": "Seuil d'alerte HIGH pour la RAM (%)"
},
{
"macro": "{$HDD_WARN_THRESHOLD}",
"value": "80",
"type": "TEXT",
"description": "Seuil d'alerte WARNING pour l'espace disque (%)"
},
{
"macro": "{$HDD_HIGH_THRESHOLD}",
"value": "90",
"type": "TEXT",
"description": "Seuil d'alerte HIGH pour l'espace disque (%)"
},
{
"macro": "{$TEMP_WARN_THRESHOLD}",
"value": "70",
"type": "TEXT",
"description": "Seuil d'alerte WARNING pour les températures (°C)"
},
{
"macro": "{$TEMP_HIGH_THRESHOLD}",
"value": "85",
"type": "TEXT",
"description": "Seuil d'alerte HIGH pour les températures (°C)"
}
],
"items": [
{
"uuid": "60749a2fe17049cfbc0bf2163b7849cc",
"name": "Freebox - CPU Utilisation",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},cpu_percent]",
"delay": "60s",
"value_type": "FLOAT",
"units": "%",
"description": "Pourcentage d'utilisation CPU de la Freebox",
"tags": [
{ "tag": "component", "value": "cpu" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "8be7f54b1f4c4059ad6293cb8bf262ff",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},cpu_percent])>{$CPU_HIGH_THRESHOLD}",
"name": "Freebox - CPU critique (> {$CPU_HIGH_THRESHOLD}%)",
"priority": "HIGH",
"description": "L'utilisation CPU de la Freebox dépasse le seuil critique."
},
{
"uuid": "df8a14b53ce142a1b942fe27bf54cd60",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},cpu_percent])>{$CPU_WARN_THRESHOLD} and last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},cpu_percent])<={$CPU_HIGH_THRESHOLD}",
"name": "Freebox - CPU élevé (> {$CPU_WARN_THRESHOLD}%)",
"priority": "WARNING",
"description": "L'utilisation CPU de la Freebox est élevée."
}
]
},
{
"uuid": "14f29ee5ac834920b75a1e27fc41b520",
"name": "Freebox - RAM Utilisation",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_percent]",
"delay": "60s",
"value_type": "FLOAT",
"units": "%",
"description": "Pourcentage d'utilisation de la mémoire RAM",
"tags": [
{ "tag": "component", "value": "memory" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "ab75cf14e21649bda532fe17049cfbc0",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_percent])>{$RAM_HIGH_THRESHOLD}",
"name": "Freebox - RAM critique (> {$RAM_HIGH_THRESHOLD}%)",
"priority": "HIGH",
"description": "L'utilisation RAM de la Freebox dépasse le seuil critique."
},
{
"uuid": "4bf45cf2a3b44f2da6cb8ef14115e3b0",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_percent])>{$RAM_WARN_THRESHOLD} and last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_percent])<={$RAM_HIGH_THRESHOLD}",
"name": "Freebox - RAM élevée (> {$RAM_WARN_THRESHOLD}%)",
"priority": "WARNING"
}
]
},
{
"uuid": "d4fe1415e3b04bf4b2da6cb8ef14115e",
"name": "Freebox - RAM Utilisée",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_used]",
"delay": "60s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Mémoire RAM utilisée en bytes",
"tags": [
{ "tag": "component", "value": "memory" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "9c12b7a42f614bb59a3c8e43ef1907d4",
"name": "Freebox - RAM Totale",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},ram_total]",
"delay": "3600s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Mémoire RAM totale en bytes",
"tags": [
{ "tag": "component", "value": "memory" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "43e8bb81de534d0b986e74cf9783f982",
"name": "Freebox - HDD Utilisation",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_percent]",
"delay": "300s",
"value_type": "FLOAT",
"units": "%",
"description": "Pourcentage d'espace disque utilisé (agrégé sur toutes les partitions)",
"tags": [
{ "tag": "component", "value": "storage" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "b2f63810f54546419f9490184f93282b",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_percent])>{$HDD_HIGH_THRESHOLD}",
"name": "Freebox - Disque critique (> {$HDD_HIGH_THRESHOLD}%)",
"priority": "HIGH",
"description": "L'espace disque de la Freebox est presque saturé."
},
{
"uuid": "713df211832049e487560824b61d6bc0",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_percent])>{$HDD_WARN_THRESHOLD} and last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_percent])<={$HDD_HIGH_THRESHOLD}",
"name": "Freebox - Disque plein (> {$HDD_WARN_THRESHOLD}%)",
"priority": "WARNING"
}
]
},
{
"uuid": "20cf786b361a49dfbf76ba50f63a0332",
"name": "Freebox - HDD Espace Utilisé",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_used]",
"delay": "300s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Espace disque utilisé en bytes",
"tags": [
{ "tag": "component", "value": "storage" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "14f09d8be8d54d24a9e9a4f4105c3127",
"name": "Freebox - HDD Espace Total",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},hdd_total]",
"delay": "3600s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Espace disque total en bytes",
"tags": [
{ "tag": "component", "value": "storage" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "55f52ce8ec8a4df7a192f153a7b67b14",
"name": "Freebox - Statut Disque",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},disk_status]",
"delay": "300s",
"value_type": "UNSIGNED",
"description": "Statut des disques : 1=OK, 0=Problème détecté",
"tags": [
{ "tag": "component", "value": "storage" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "a82348ff98f645399cc1b8163f4b4550",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},disk_status])=0",
"name": "Freebox - Problème disque détecté",
"priority": "HIGH",
"description": "Un ou plusieurs disques de la Freebox sont en état anormal."
}
]
},
{
"uuid": "f295b95420f14d878d65e25287e0fa19",
"name": "Freebox - Débit Descendant",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_rate_down]",
"delay": "60s",
"value_type": "UNSIGNED",
"units": "bps",
"description": "Débit de téléchargement actuel en bits par seconde",
"preprocessing": [
{
"type": "MULTIPLIER",
"parameters": ["8"]
}
],
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "ea4fa7a4968840c9ae647575cc84ff5d",
"name": "Freebox - Débit Montant",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_rate_up]",
"delay": "60s",
"value_type": "UNSIGNED",
"units": "bps",
"description": "Débit d'upload actuel en bits par seconde",
"preprocessing": [
{
"type": "MULTIPLIER",
"parameters": ["8"]
}
],
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "e0e23fa271cb46bcba710640d2105e19",
"name": "Freebox - Total Octets Reçus",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_bytes_down]",
"delay": "300s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Nombre total d'octets reçus depuis le démarrage",
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "996e36d4df924b17b2b6fbe147b40742",
"name": "Freebox - Total Octets Envoyés",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_bytes_up]",
"delay": "300s",
"value_type": "UNSIGNED",
"units": "B",
"description": "Nombre total d'octets envoyés depuis le démarrage",
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "36ef970c0ba149959666fdbd424b3c9a",
"name": "Freebox - Bande Passante Max Descendante",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_bw_down]",
"delay": "3600s",
"value_type": "UNSIGNED",
"units": "bps",
"description": "Bande passante maximale descendante négociée (bit/s)",
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "60ee6e3cbcf14e9f906f369ee62ef8bf",
"name": "Freebox - Bande Passante Max Montante",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},net_bw_up]",
"delay": "3600s",
"value_type": "UNSIGNED",
"units": "bps",
"description": "Bande passante maximale montante négociée (bit/s)",
"tags": [
{ "tag": "component", "value": "network" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "62bfb9fb8ae841bc8f04f2f4cb63901b",
"name": "Freebox - Température CPU Mère",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpum]",
"delay": "120s",
"value_type": "UNSIGNED",
"units": "°C",
"description": "Température du CPU de la carte mère",
"tags": [
{ "tag": "component", "value": "temperature" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "bfd7e979d0314051a89c92257d0f9839",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpum])>{$TEMP_HIGH_THRESHOLD}",
"name": "Freebox - Température CPU mère critique (> {$TEMP_HIGH_THRESHOLD}°C)",
"priority": "HIGH"
},
{
"uuid": "f295b920bf014c628e8557b77ee0fa91",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpum])>{$TEMP_WARN_THRESHOLD} and last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpum])<={$TEMP_HIGH_THRESHOLD}",
"name": "Freebox - Température CPU mère élevée (> {$TEMP_WARN_THRESHOLD}°C)",
"priority": "WARNING"
}
]
},
{
"uuid": "569ea25f16954b41b8061df8974ee0f1",
"name": "Freebox - Température CPU Box",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpub]",
"delay": "120s",
"value_type": "UNSIGNED",
"units": "°C",
"description": "Température du CPU de la box",
"tags": [
{ "tag": "component", "value": "temperature" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "c3e5904d0fa34e8590c5fe39a4897ff3",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpub])>{$TEMP_HIGH_THRESHOLD}",
"name": "Freebox - Température CPU box critique (> {$TEMP_HIGH_THRESHOLD}°C)",
"priority": "HIGH"
}
]
},
{
"uuid": "d4fe9ca18bb04cf09d31fe5a6d7f8d02",
"name": "Freebox - Température Switch",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_sw]",
"delay": "120s",
"value_type": "UNSIGNED",
"units": "°C",
"description": "Température du switch intégré",
"tags": [
{ "tag": "component", "value": "temperature" },
{ "tag": "source", "value": "freebox-api" }
]
},
{
"uuid": "672bbce24b174fa9809cbce2441db1b2",
"name": "Freebox - Température HDD",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_hdd]",
"delay": "300s",
"value_type": "UNSIGNED",
"units": "°C",
"description": "Température du disque dur interne",
"tags": [
{ "tag": "component", "value": "temperature" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "ea52c36203c5499cbce2442d531b1a33",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_hdd])>{$TEMP_HIGH_THRESHOLD}",
"name": "Freebox - Température HDD critique (> {$TEMP_HIGH_THRESHOLD}°C)",
"priority": "HIGH"
}
]
},
{
"uuid": "f4b17a79409f49128da060d6ae51b333",
"name": "Freebox - Vitesse Ventilateur",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},fan_rpm]",
"delay": "120s",
"value_type": "UNSIGNED",
"units": "RPM",
"description": "Vitesse de rotation du ventilateur interne",
"tags": [
{ "tag": "component", "value": "hardware" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "cbde43ef19074d4ea52c36203c5499cb",
"expression": "last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},fan_rpm])=0 and last(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},temp_cpum])>40",
"name": "Freebox - Ventilateur arrêté (température > 40°C)",
"priority": "HIGH",
"description": "Le ventilateur ne tourne plus alors que la température est élevée."
}
]
},
{
"uuid": "bcce2442d53141a2ba50f63a0332f295",
"name": "Freebox - Uptime",
"type": "EXTERNAL",
"key": "frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},uptime]",
"delay": "300s",
"value_type": "UNSIGNED",
"units": "uptime",
"description": "Durée de fonctionnement de la Freebox depuis le dernier redémarrage",
"tags": [
{ "tag": "component", "value": "system" },
{ "tag": "source", "value": "freebox-api" }
],
"triggers": [
{
"uuid": "8b061df8974e40f1a89c92257d0f9839",
"expression": "change(/Template Frogg Freebox API V10/frogg_freebox_check.sh[{$FREEBOX_APP_ID},{$FREEBOX_APP_TOKEN},{$FREEBOX_HOST},uptime])<0",
"name": "Freebox - Redémarrage détecté",
"priority": "INFO",
"description": "L'uptime a diminué, la Freebox a redémarré."
}
]
}
]
}
]
}
}