ses-monitor/zabbix/zbx_ses_template_5.0.xml
Maksim Totmin 8dca7eb46b Initial commit: SES Monitor
Watchdog-демон для непрерывного мониторинга SES.
- Liveness-проверки API, лицензии, списка роботов
- Диалоговые сценарии из YAML с агрегацией в 6 фиксированных Zabbix-метрик
- Доставка: zabbix_sender (push) или UserParameter (poll)
- Hot-reload сценариев без перезапуска
2026-06-19 21:04:05 +07:00

213 lines
9.8 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version='1.0' encoding='utf-8'?>
<zabbix_export>
<version>5.0</version>
<date>2026-06-19T12:00:00Z</date>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<templates>
<template>
<template>SES Monitor</template>
<name>SES Monitor — Service Engine Server</name>
<description>Шаблон для мониторинга диалоговой сценарной машины SES.
Метрики отправляются watchdog-демоном ses-monitor через zabbix_sender (trapper).
Проверяет: доступность API, лицензию, выполнение сценариев.
Сценарии задаются в YAML-файлах (config/scenarios/). Все сценарии
агрегируются в фиксированные метрики — шаблон универсален и не зависит
от количества или состава сценариев.</description>
<groups>
<group>
<name>Templates</name>
</group>
</groups>
<macros>
<macro>
<macro>{$SES_API_TIMEOUT_MS}</macro>
<value>5000</value>
<description>Порог медленного ответа API (миллисекунды)</description>
</macro>
</macros>
<items>
<!-- Liveness -->
<item>
<name>SES: API доступность</name>
<type>TRAP</type>
<key>ses.api.liveness</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>0 — API недоступен, 1 — работает. Проверяется GET /ses/hostname.</description>
<triggers>
<trigger>
<expression>{SES Monitor:ses.api.liveness.last()}=0</expression>
<name>SES API недоступен на {HOST.NAME}</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: время ответа API</name>
<type>TRAP</type>
<key>ses.api.response_time</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<description>Время ответа GET /ses/hostname в миллисекундах.</description>
<triggers>
<trigger>
<expression>{SES Monitor:ses.api.response_time.last()}&gt;{$SES_API_TIMEOUT_MS}</expression>
<name>SES: медленный ответ API (&gt;{$SES_API_TIMEOUT_MS} мс)</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: дней до окончания лицензии</name>
<type>TRAP</type>
<key>ses.license.days_remaining</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>d</units>
<description>Количество дней до окончания лицензии SES. -1 = бессрочная.</description>
</item>
<item>
<name>SES: статус лицензии</name>
<type>TRAP</type>
<key>ses.license.ok</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>0 — проблема с лицензией, 1 — в порядке.</description>
<triggers>
<trigger>
<expression>{SES Monitor:ses.license.ok.last()}=0</expression>
<name>SES: проблема с лицензией на {HOST.NAME}</name>
<priority>HIGH</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: количество сценариев (роботов)</name>
<type>TRAP</type>
<key>ses.robots.count</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>Общее количество зарегистрированных сценариев (роботов).
Изменение значения может сигнализировать о проблемах конфигурации.</description>
</item>
<!-- Сценарии -->
<item>
<name>SES: сценарии — все успешны</name>
<type>TRAP</type>
<key>ses.scenario.ok</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>1 — все сценарии прошли, 0 — есть упавшие.</description>
<triggers>
<trigger>
<expression>{SES Monitor:ses.scenario.ok.last()}=0</expression>
<name>SES: сценарии мониторинга падают на {HOST.NAME}</name>
<priority>AVERAGE</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: сценарии — всего</name>
<type>TRAP</type>
<key>ses.scenario.total</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>Количество активных сценариев мониторинга.</description>
</item>
<item>
<name>SES: сценарии — упало</name>
<type>TRAP</type>
<key>ses.scenario.failed</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<description>Количество упавших сценариев за последний цикл.</description>
<triggers>
<trigger>
<expression>{SES Monitor:ses.scenario.failed.last()}&gt;0</expression>
<name>SES: сценарии мониторинга падают на {HOST.NAME}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: сценарии — среднее время</name>
<type>TRAP</type>
<key>ses.scenario.avg_time</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<description>Среднее время выполнения сценария (миллисекунды).</description>
</item>
<item>
<name>SES: сценарии — макс. время</name>
<type>TRAP</type>
<key>ses.scenario.max_time</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<description>Максимальное время выполнения сценария (миллисекунды).</description>
</item>
<item>
<name>SES: сценарии — ошибка</name>
<type>TRAP</type>
<key>ses.scenario.error</key>
<delay>0</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>TEXT</value_type>
<description>Текст ошибки: "N сценариев упали". Пустая строка если всё хорошо.</description>
</item>
</items>
</template>
</templates>
</zabbix_export>