tornado-relayer/monitoring/templates/Tornado-relayer-template.yaml

71 lines
2.3 KiB
YAML
Raw Permalink Normal View History

zabbix_export:
version: '5.2'
date: '2021-12-01T13:26:59Z'
groups:
2022-01-19 15:11:00 +03:00
- name: Templates/Applications
templates:
2022-01-19 15:11:00 +03:00
- template: Tornado-relayer
name: Tornado-relayer
groups:
2022-01-19 15:11:00 +03:00
- name: Templates/Applications
items:
2022-01-19 15:11:00 +03:00
- name: 'tornado-relayer: health.error'
type: DEPENDENT
key: tornado-relayer.health.error
delay: '0'
trends: '0'
value_type: TEXT
preprocessing:
2022-01-19 15:11:00 +03:00
- type: JSONPATH
parameters:
- $.health.error
master_item:
key: 'web.page.get[{$URL}]'
triggers:
2022-01-19 15:11:00 +03:00
- expression: '{last()}<>""'
name: 'tornado-relayer: health error'
priority: AVERAGE
2022-01-19 15:11:00 +03:00
- name: 'tornado-relayer: health.status'
type: DEPENDENT
key: tornado-relayer.health.status
delay: '0'
trends: '0'
value_type: TEXT
preprocessing:
2022-01-19 15:11:00 +03:00
- type: JSONPATH
parameters:
- $.health.status
master_item:
key: 'web.page.get[{$URL}]'
triggers:
2022-01-19 15:11:00 +03:00
- expression: '{last(#3)}<>"true"'
name: 'tornado-relayer: health status <> true'
priority: HIGH
2022-01-19 15:11:00 +03:00
- name: 'tornado-relayer: data'
type: ZABBIX_ACTIVE
key: 'web.page.get[{$URL}]'
history: '0'
trends: '0'
value_type: TEXT
preprocessing:
2022-01-19 15:11:00 +03:00
- type: REGEX
parameters:
- '\n\s?\n([\s\S]*)'
- \1
httptests:
2022-01-19 15:11:00 +03:00
- name: 'tornado-relayer: status page'
agent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/80.0.3987.87 Chrome/80.0.3987.87 Safari/537.36'
steps:
2022-01-19 15:11:00 +03:00
- name: 'status page'
url: '{$URL}'
follow_redirects: 'NO'
required: status
status_codes: '200'
triggers:
2022-01-19 15:11:00 +03:00
- expression: '{Tornado-relayer:web.test.fail[tornado-relayer: status page].last()}>0'
name: 'tornado-relayer: status page failed'
priority: AVERAGE
2022-01-19 15:11:00 +03:00
- expression: '{Tornado-relayer:web.test.rspcode[tornado-relayer: status page,status page].last(#3)}<>200'
name: 'tornado-relayer: status page rspcode <>200'
priority: HIGH