informatique:system_admin:prometheus
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:system_admin:prometheus [30/09/2026 17:25] – [prometheus-postfix-exporter] cyrille | informatique:system_admin:prometheus [12/10/2026 09:39] (Version actuelle) – cyrille | ||
|---|---|---|---|
| Ligne 10: | Ligne 10: | ||
| Prometheus differs from [[/ | Prometheus differs from [[/ | ||
| + | |||
| + | ===== prometheus-node-exporter ===== | ||
| + | |||
| + | Désactiver les services inutiles sur des VM cloud : | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl disable --now prometheus-node-exporter-smartmon.timer | ||
| + | sudo systemctl disable --now prometheus-node-exporter-nvme.timer | ||
| + | sudo systemctl disable --now prometheus-node-exporter-ipmitool-sensor.timer | ||
| + | sudo systemctl disable --now prometheus-node-exporter-mellanox-hca-temp.timer | ||
| + | </ | ||
| + | |||
| + | Purger le dossier ''/ | ||
| + | |||
| + | Exemple de configuration ''/ | ||
| + | |||
| + | 📢 Attention, selon les versions de l' | ||
| + | |||
| + | < | ||
| + | # Le filtre `--collector.systemd.unit-include` est important : | ||
| + | # passe de ~550-600 (~115 units x 5) à 25 (5 units x 5 status) | ||
| + | # et 15 ms vs 157 ms (divise par 10 le coût du scrape systemd) | ||
| + | # À adapter selon les services à surveiller | ||
| + | # | ||
| + | ARGS=" | ||
| + | --collector.diskstats.ignored-devices=\" | ||
| + | --collector.systemd.unit-include=\" | ||
| + | --no-collector.bcache \ | ||
| + | --no-collector.btrfs \ | ||
| + | --no-collector.bonding \ | ||
| + | --no-collector.dmi \ | ||
| + | --no-collector.drbd \ | ||
| + | --no-collector.edac \ | ||
| + | --no-collector.fibrechannel \ | ||
| + | --no-collector.hwmon \ | ||
| + | --no-collector.infiniband \ | ||
| + | --no-collector.mdadm \ | ||
| + | --no-collector.nfs \ | ||
| + | --no-collector.nfsd \ | ||
| + | --no-collector.powersupplyclass \ | ||
| + | --no-collector.rapl \ | ||
| + | --no-collector.tapestats \ | ||
| + | --no-collector.thermal_zone \ | ||
| + | --no-collector.xfs \ | ||
| + | --no-collector.zfs \ | ||
| + | --no-collector.wifi \ | ||
| + | --no-collector.ipvs \ | ||
| + | --no-collector.cpufreq \ | ||
| + | --no-collector.entropy \ | ||
| + | --no-collector.nvme \ | ||
| + | --no-collector.selinux | ||
| + | " | ||
| + | </ | ||
| ===== prometheus-postfix-exporter ===== | ===== prometheus-postfix-exporter ===== | ||
| - | ATTENTION: la version .deb fourni avec ubuntu 26 et debian | + | ATTENTION: la version .deb fourni avec Debian |
| Après installation vérifier : | Après installation vérifier : | ||
| Ligne 22: | Ligne 75: | ||
| * dans '' | * dans '' | ||
| + | Installer **" | ||
| + | |||
| + | <code bash> | ||
| + | # Récup du binaire | ||
| + | wget https:// | ||
| + | # décompression qui donne le seul fichier `postfix_exporter` | ||
| + | tar zxf postfix_exporter_systemd_0.21.2_linux_amd64.tar.gz | ||
| + | # stop le service | ||
| + | sudo systemctl stop prometheus-postfix-exporter.service | ||
| + | # Diversion dpkg | ||
| + | sudo dpkg-divert --add --rename --divert / | ||
| + | Adding 'local diversion of / | ||
| + | # vérif diversion | ||
| + | $ dpkg-divert --list | grep postfix | ||
| + | local diversion of / | ||
| + | # install le nouveau binaire | ||
| + | sudo install -o root -g root -m 0755 postfix_exporter / | ||
| + | # restart le service | ||
| + | sudo systemctl start prometheus-postfix-exporter.service | ||
| + | </ | ||
| + | |||
| + | Attention au nom des services dans journald: | ||
| + | |||
| + | Par défaut il cherche '' | ||
| + | * ajouter 2 fois option '' | ||
| + | |||
| + | < | ||
| + | # Extra arguments for the daemon. | ||
| + | ARGS=" | ||
| + | | ||
| + | | ||
| + | | ||
| + | " | ||
| + | </ | ||
informatique/system_admin/prometheus.1790781933.txt.gz · Dernière modification : de cyrille
