# KB - Supervision

# KB - Supervision - Zabbix

# KB-Zabbix-Server - Erreur Cache Usage

<p class="callout info">S'applique à : Zabbix, toutes versions.  
</p>

### <span style="text-decoration: underline;">Symptôme(s)</span>

Le service ne se lance pas et une erreur “cache usage” apparaît.

---

### <span style="text-decoration: underline;">Problème</span>

Le cache défini n’est pas suffisant pour contenir l’ensemble des données et nécessite d'être étendu.

---

### <span style="text-decoration: underline;">Solution</span>

Éditer le fichier “<span style="color: rgb(132,63,161);">/***<span class="fabric-text-color-mark">etc/zabbix/zabbix\_server.cnf</span>***</span>”

Dé commenter la ligne “<span style="color: rgb(132,63,161);">***CacheSize=9M***</span>” et définir une nouvelle taille de cache.

[![image.png](https://docs.labs404.fr/uploads/images/gallery/2026-07/scaled-1680-/DOqimage-png.png)](https://docs.labs404.fr/uploads/images/gallery/2026-07/scaled-1680-/DOqimage-png.png)

Relancer les services Zabbix.

---

### <span style="text-decoration: underline;">Sources</span>

n/a<span style="background-color: rgb(251,238,184);">  
</span>

# KB-Zabbix-Server - Partition DB pleine

<p class="callout info">S'applique à : Zabbix, toutes versions.</p>

### <span style="text-decoration: underline;">Symptôme(s)</span>

Impossible de lancer le service de base de donnée car la partition est pleine.

---

### <span style="text-decoration: underline;">Problème</span>

Par défaut, la DB garde en mémoire toutes les informations et par conséquent ne fait que grossir.

---

### <span style="text-decoration: underline;">Solution</span>

Exécuter un script de purge de la DB.

```
-- intervals in days
SET @history_interval = 7;
SET @trends_interval = 90;
 
DELETE FROM alerts WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM acknowledges WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM events WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
 
DELETE FROM history WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM history_uint WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM history_str WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM history_text WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
DELETE FROM history_log WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@history_interval * 24 * 60 * 60);
 
DELETE FROM trends WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@trends_interval * 24 * 60 * 60);
DELETE FROM trends_uint WHERE (UNIX_TIMESTAMP(NOW()) - clock) > (@trends_interval * 24 * 60 * 60);
```

---

### <span style="text-decoration: underline;">Sources</span>

n/a