From 0eb817c4320964bc41e9964150f5eceb427be2bd Mon Sep 17 00:00:00 2001 From: Pavel Muhortov Date: Fri, 28 Jun 2024 00:30:40 +0300 Subject: [PATCH] added 'check.business.ru' --- .../check.business.ru/6.0/README.md | 55 +++++ .../6.0/check.business.ru.yaml | 225 ++++++++++++++++++ 2 files changed, 280 insertions(+) create mode 100755 templates/applications/check.business.ru/6.0/README.md create mode 100644 templates/applications/check.business.ru/6.0/check.business.ru.yaml diff --git a/templates/applications/check.business.ru/6.0/README.md b/templates/applications/check.business.ru/6.0/README.md new file mode 100755 index 0000000..71f4dae --- /dev/null +++ b/templates/applications/check.business.ru/6.0/README.md @@ -0,0 +1,55 @@ + +# check.business.ru + +## Overview + +This template is designed for [check.business.ru](https://check.business.ru/) monitoring monitoring by Zabbix and requires external script. + +## Requirements + +- Zabbix version: 6.0 and higher. +- [check.business.ru_monitor.py](https://git.hmp.today/pavel.muhortov/utils/src/branch/master/check.business.ru_monitor) + +## Tested versions + +This template has been tested on: + +- [Debian GNU/Linux 12](http://ftp.debian.org/debian/dists/bookworm/) + +### Macros used + +|Name|Description|Default| +|----|-----------|-------| +|{$APP_ID}|[https://check.business.ru/settings/integrations](https://check.business.ru/settings/integrations)|`API_APP_ID`| +|{$SECRET}|[https://check.business.ru/settings/integrations](https://check.business.ru/settings/integrations)|`API_SECRET`| + +### Items + +|Name|Description|Type|Key and additional info| +|----|-----------|----|-----------------------| +|check.business.ru request|-|External check|check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]| +|check.business.ru check_completed|-|Dependent item|check.business.ru.check_completed| +|check.business.ru check_completed_in_error|-|Dependent item|check.business.ru.check_completed_in_error| +|check.business.ru check_completed_in_queue|-|Dependent item|check.business.ru.check_completed_in_queue| +|check.business.ru check_completed_success|-|Dependent item|check.business.ru.check_completed_success| +|check.business.ru check_progress|-|Dependent item|check.business.ru.check_progress| +|check.business.ru date_last_connect_app|-|Dependent item|check.business.ru.date_last_connect_app| +|check.business.ru date_last_connect_ofd|-|Dependent item|check.business.ru.date_last_connect_ofd| +|check.business.ru printer_status|-|Dependent item|check.business.ru.printer_status| + +### Triggers + +|Name|Description|Expression|Severity|Dependencies and additional info| +|----|-----------|----------|--------|--------------------------------| +|Очередь на кассу: {ITEM.VALUE1}|-|last(/check.business.ru/check.business.ru.check_completed_in_queue)>0|Average|Operational data: Необходимо на ККТ запустить приложение 'Бизнес.Ру Онлайн Чеки'| +|Передано с ошибкой: {ITEM.VALUE1}|-|last(/check.business.ru/check.business.ru.check_completed_in_error)>0|Average|Operational data: Необходимо в ЛК запустить повторно фискализацию или обратиться в ТП Бизнес.Ру| +|Статус ККТ: Не найден|-|last(/check.business.ru/check.business.ru.printer_status,#1)=0|Average|Operational data: Необходимо в ЛК проверить привязку ККТ| +|Статус ККТ: Нет чековой ленты или смена превысила 24 часа|-|last(/check.business.ru/check.business.ru.printer_status,#1)=2|Average|Operational data: Необходимо проверить состояние ККТ| + +### Discovery rules + +There are no discovery rules in this template. + +### Item prototypes for Clients discovery + +There are no item prototypes in this template. diff --git a/templates/applications/check.business.ru/6.0/check.business.ru.yaml b/templates/applications/check.business.ru/6.0/check.business.ru.yaml new file mode 100644 index 0000000..f1afe8f --- /dev/null +++ b/templates/applications/check.business.ru/6.0/check.business.ru.yaml @@ -0,0 +1,225 @@ +zabbix_export: + version: '6.0' + date: '2024-06-27T00:00:00Z' + groups: + - + uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 + name: Templates/Applications + templates: + - + uuid: 85f79fa1818c4e839d377a6826b81f80 + template: check.business.ru + name: check.business.ru + description: 'check.business.ru monitor' + groups: + - + name: Templates/Applications + items: + - + uuid: 3864bc8b61974806894f9e818c669a77 + name: 'check.business.ru check_completed' + type: DEPENDENT + key: check.business.ru.check_completed + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.check_completed + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + - + uuid: e239ccdb4e01489d8a4af883300bd158 + name: 'check.business.ru check_completed_in_error' + type: DEPENDENT + key: check.business.ru.check_completed_in_error + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.check_completed_in_error + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + triggers: + - + uuid: 49a16315016c4e7ea8c497a675b911c3 + expression: last(/check.business.ru/check.business.ru.check_completed_in_error)>0 + name: 'Передано с ошибкой: {ITEM.VALUE1}' + opdata: 'Необходимо в ЛК запустить повторно фискализацию или обратиться в ТП Бизнес.Ру' + priority: AVERAGE + tags: + - + tag: Application + value: check.business.ru + - + uuid: 9e18aea4c5804e98b1d0f33c79b8024a + name: 'check.business.ru check_completed_in_queue' + type: DEPENDENT + key: check.business.ru.check_completed_in_queue + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.check_completed_in_queue + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + triggers: + - + uuid: cad8c7ab28ed4b9a87cd834731898629 + expression: last(/check.business.ru/check.business.ru.check_completed_in_queue)>0 + name: 'Очередь на кассу: {ITEM.VALUE1}' + opdata: 'Необходимо на ККТ запустить приложение ''Бизнес.Ру Онлайн Чеки''' + priority: AVERAGE + tags: + - + tag: Application + value: check.business.ru + - + uuid: d5f63f65e73c40c48b2578ebabe17c59 + name: 'check.business.ru check_completed_success' + type: DEPENDENT + key: check.business.ru.check_completed_success + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.check_completed_success + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + - + uuid: fefdfa327b7e4d938504372a0d87ef8b + name: 'check.business.ru check_progress' + type: DEPENDENT + key: check.business.ru.check_progress + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.check_progress + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + - + uuid: f6d9f1b27ebf43288f900474c8c54bee + name: 'check.business.ru date_last_connect_app' + type: DEPENDENT + key: check.business.ru.date_last_connect_app + delay: '0' + trends: '0' + value_type: TEXT + preprocessing: + - + type: JSONPATH + parameters: + - $.date_last_connect_app + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + - + uuid: 999696f324724fbeb5ec38f80a12a2bd + name: 'check.business.ru date_last_connect_ofd' + type: DEPENDENT + key: check.business.ru.date_last_connect_ofd + delay: '0' + trends: '0' + value_type: TEXT + preprocessing: + - + type: JSONPATH + parameters: + - $.date_last_connect_ofd + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + - + uuid: d3a842dcf4cd423fa7890b21b17b21fe + name: 'check.business.ru printer_status' + type: DEPENDENT + key: check.business.ru.printer_status + delay: '0' + preprocessing: + - + type: JSONPATH + parameters: + - $.printer_status + master_item: + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + tags: + - + tag: Application + value: check.business.ru + triggers: + - + uuid: 5c61c5e417d94bc0a53441c6796a791d + expression: 'last(/check.business.ru/check.business.ru.printer_status,#1)=0' + name: 'Статус ККТ: Не найден' + opdata: 'Необходимо в ЛК проверить привязку ККТ' + priority: AVERAGE + tags: + - + tag: Application + value: check.business.ru + - + uuid: d075c1d736b8421d8f88a25852f69e7e + expression: 'last(/check.business.ru/check.business.ru.printer_status,#1)=2' + name: 'Статус ККТ: Нет чековой ленты или смена превысила 24 часа' + opdata: 'Необходимо проверить состояние ККТ' + priority: AVERAGE + tags: + - + tag: Application + value: check.business.ru + - + uuid: 27e0cf0c2d1f4fa0bcd9a76ed97bb3dc + name: 'check.business.ru request' + type: EXTERNAL + key: 'check.business.ru_monitor.py["--app_id","{$APP_ID}","--secret","{$SECRET}","--json"]' + history: 14d + trends: '0' + value_type: TEXT + tags: + - + tag: Application + value: check.business.ru + tags: + - + tag: Application + value: check.business.ru + macros: + - + macro: '{$APP_ID}' + value: API_APP_ID + description: 'https://check.business.ru/settings/integrations' + - + macro: '{$SECRET}' + value: API_SECRET + description: 'https://check.business.ru/settings/integrations'