ses-monitor/zabbix/zbx_ses_template_5.0_up.xml
Maksim Totmin 11a96222f4 add triggers to all Zabbix templates
- add WARNING trigger on ses.license.days_remaining (< 30 days)
- add CRITICAL trigger on ses.scenario.error (strlen > 0)
- populate all 5 missing triggers in zbx_ses_template_5.0_up.xml

All 4 templates now have 7 triggers each.
2026-06-23 18:13:43 +07:00

318 lines
14 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 через UserParameter (Zabbix агент).
JSON с метриками пишется в /var/tmp/ses_monitor/metrics.json и читается
скриптом scripts/zbx_get.py. Master-элемент: ses.metrics.
Проверяет: доступность 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>
<item>
<name>SES: все метрики (JSON)</name>
<type>ZABBIX_PASSIVE</type>
<key>ses.metrics</key>
<delay>30s</delay>
<history>7d</history>
<trends>31536000</trends>
<value_type>TEXT</value_type>
<description>Полный JSON со всеми метриками ses-monitor. Используется как master item для dependent items с JSONPath.</description>
</item>
<!-- Liveness -->
<item>
<name>SES: API доступность</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.api.liveness"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.api.liveness</key>
<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>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.api.response_time"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<key>ses.api.response_time</key>
<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>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.license.ok"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.license.ok</key>
<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>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.license.days_remaining"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>d</units>
<key>ses.license.days_remaining</key>
<triggers>
<trigger>
<expression>{SES Monitor:ses.license.days_remaining.last()}&gt;0 and {SES Monitor:ses.license.days_remaining.last()}&lt;30</expression>
<name>SES: лицензия истекает через (&lt;30 дней) на {HOST.NAME}</name>
<priority>WARNING</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
<item>
<name>SES: количество сценариев (роботов)</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.robots.count"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.robots.count</key>
</item>
<!-- Сценарии -->
<item>
<name>SES: сценарии — все успешны</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.ok"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.scenario.ok</key>
<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>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.total"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.scenario.total</key>
</item>
<item>
<name>SES: сценарии — упало</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.failed"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>UNSIGNED</value_type>
<key>ses.scenario.failed</key>
<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>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.avg_time"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<key>ses.scenario.avg_time</key>
</item>
<item>
<name>SES: сценарии — макс. время</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.max_time"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>FLOAT</value_type>
<units>ms</units>
<key>ses.scenario.max_time</key>
</item>
<item>
<name>SES: сценарии — ошибка</name>
<type>DEPENDENT</type>
<master_item>
<key>ses.metrics</key>
</master_item>
<preprocessing>
<step>
<type>JSONPATH</type>
<params>$["ses.scenario.error"]</params>
</step>
</preprocessing>
<history>7d</history>
<trends>31536000</trends>
<value_type>TEXT</value_type>
<key>ses.scenario.error</key>
<triggers>
<trigger>
<expression>{SES Monitor:ses.scenario.error.strlen()}&gt;0</expression>
<name>SES: критическая ошибка выполнения сценариев на {HOST.NAME}</name>
<priority>CRITICAL</priority>
<manual_close>YES</manual_close>
</trigger>
</triggers>
</item>
</items>
</template>
</templates>
</zabbix_export>