Compare commits
9 Commits
docker-mdm
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ce0534cbb | |||
| 4bf94fe39f | |||
| 291bd94750 | |||
| 0d666a8405 | |||
| cb423f4432 | |||
|
|
8f60aee9d6 | ||
| ee40b7ba30 | |||
| 475489e680 | |||
| ebf9fbacdc |
3
docker/docker.conf
Normal file
3
docker/docker.conf
Normal file
@ -0,0 +1,3 @@
|
||||
#docker zabbix
|
||||
UserParameter=docker[*],sudo /etc/zabbix/scripts/docker.sh "$1" "$2" "$3"
|
||||
|
||||
@ -3,8 +3,63 @@
|
||||
# author mikedmorto 2021 year
|
||||
export LC_ALL=""
|
||||
export LANG="en_US.UTF-8"
|
||||
version="0.0"
|
||||
version="0.1"
|
||||
DOCKER="/usr/bin/docker"
|
||||
|
||||
echo "test"
|
||||
JSON=""
|
||||
#### PARAMETRS ####
|
||||
METRIC="$1"
|
||||
ITEM="$2"
|
||||
|
||||
case "$METRIC" in
|
||||
discovery)
|
||||
|
||||
JSON="{ \"data\":["
|
||||
DCLIST=""
|
||||
|
||||
|
||||
# get all docker containers list of id
|
||||
DCLIST=`${DOCKER} ps -a | tail -n +2 | awk '{print $1}'`
|
||||
|
||||
|
||||
# show all docker id
|
||||
for DOCKERID in ${DCLIST}; do
|
||||
JSON=${JSON}" {\"{#DOCKERID}\":\"${DOCKERID}\"},"
|
||||
done
|
||||
|
||||
|
||||
JSON=${JSON::-1}
|
||||
JSON=${JSON}"]}"
|
||||
echo ${JSON}
|
||||
exit 0
|
||||
;;
|
||||
|
||||
# get container status
|
||||
docker.container_running)
|
||||
|
||||
RET=`${DOCKER} stats --no-stream | tail -n +2 | awk -v IT="${ITEM}" ' BEGIN {$count=0;} { if ($1 == IT) count += 1 } END {if (count > 1) print ""; else if (count == 1) print 1; else if (count == 0) print 0} '`
|
||||
echo ${RET}
|
||||
|
||||
|
||||
exit 0
|
||||
;;
|
||||
|
||||
script.version)
|
||||
|
||||
echo ${version}
|
||||
|
||||
exit 0
|
||||
;;
|
||||
|
||||
help)
|
||||
echo "please use these parametrs
|
||||
{
|
||||
discovery
|
||||
docker.container_running
|
||||
script.version
|
||||
}"
|
||||
;;
|
||||
*)
|
||||
echo ""
|
||||
;;
|
||||
esac
|
||||
|
||||
182
docker/mdm_docker_active-3x.xml
Normal file
182
docker/mdm_docker_active-3x.xml
Normal file
@ -0,0 +1,182 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-09-30T09:28:57Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm_docker_active</template>
|
||||
<name>mdm_docker_active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Docker</name>
|
||||
</application>
|
||||
<application>
|
||||
<name>Docker-Containers</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items>
|
||||
<item>
|
||||
<name>docker script version</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>docker[script.version]</key>
|
||||
<delay>1m</delay>
|
||||
<history>90d</history>
|
||||
<trends>0</trends>
|
||||
<status>0</status>
|
||||
<value_type>4</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Docker</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
</items>
|
||||
<discovery_rules>
|
||||
<discovery_rule>
|
||||
<name>DockerDiscovery</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>docker[discovery]</key>
|
||||
<delay>1m</delay>
|
||||
<status>0</status>
|
||||
<allowed_hosts/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<filter>
|
||||
<evaltype>0</evaltype>
|
||||
<formula/>
|
||||
<conditions/>
|
||||
</filter>
|
||||
<lifetime>7d</lifetime>
|
||||
<description/>
|
||||
<item_prototypes>
|
||||
<item_prototype>
|
||||
<name>Container $2 running</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>docker[docker.container_running,{#DOCKERID}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Docker-Containers</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
</item_prototypes>
|
||||
<trigger_prototypes>
|
||||
<trigger_prototype>
|
||||
<expression>{mdm_docker_active:docker[docker.container_running,{#DOCKERID}].last()}=0</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Docker cont {#DOCKERID} is not running</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger_prototype>
|
||||
</trigger_prototypes>
|
||||
<graph_prototypes/>
|
||||
<host_prototypes/>
|
||||
<jmx_endpoint/>
|
||||
</discovery_rule>
|
||||
</discovery_rules>
|
||||
<httptests/>
|
||||
<macros/>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
</zabbix_export>
|
||||
533
iostat/mdm-iostat-agent-active.xml
Normal file
533
iostat/mdm-iostat-agent-active.xml
Normal file
@ -0,0 +1,533 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-06-13T08:07:09Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>MyTemplates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm_iostat_agent active</template>
|
||||
<name>mdm_iostat_agent active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>MyTemplates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items/>
|
||||
<discovery_rules>
|
||||
<discovery_rule>
|
||||
<name>IOSTAT: Hard disk drive discovery</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[]</key>
|
||||
<delay>1h</delay>
|
||||
<status>0</status>
|
||||
<allowed_hosts/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<filter>
|
||||
<evaltype>0</evaltype>
|
||||
<formula/>
|
||||
<conditions/>
|
||||
</filter>
|
||||
<lifetime>1d</lifetime>
|
||||
<description/>
|
||||
<item_prototypes>
|
||||
<item_prototype>
|
||||
<name>iostat: $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[avgqu,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>req</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description>Средний размер очереди.</description>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[await,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>ms</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description>Среднее время ожидания запроса в очереди</description>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: KBps $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[read,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>Bps</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing>
|
||||
<step>
|
||||
<type>10</type>
|
||||
<params/>
|
||||
</step>
|
||||
<step>
|
||||
<type>1</type>
|
||||
<params>1024</params>
|
||||
</step>
|
||||
</preprocessing>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: read req on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[rs,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>req</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description>Запросов на чтение</description>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[svctm,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>ms</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description>Среднее время выполнения операций на диске</description>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[util,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>%</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: KBps $1 on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[write,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>Bps</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing>
|
||||
<step>
|
||||
<type>10</type>
|
||||
<params/>
|
||||
</step>
|
||||
<step>
|
||||
<type>1</type>
|
||||
<params>1024</params>
|
||||
</step>
|
||||
</preprocessing>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>iostat: write req on $2</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>iostat[ws,{#HDNAME}]</key>
|
||||
<delay>30s</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>req</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description>Запросов на запись</description>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>iostat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
</item_prototypes>
|
||||
<trigger_prototypes/>
|
||||
<graph_prototypes>
|
||||
<graph_prototype>
|
||||
<name>iostat: {#HDNAME} speed</name>
|
||||
<width>900</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>1</show_work_period>
|
||||
<show_triggers>1</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>1</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>0</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>009900</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_iostat_agent active</host>
|
||||
<key>iostat[read,{#HDNAME}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>DD0000</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_iostat_agent active</host>
|
||||
<key>iostat[write,{#HDNAME}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph_prototype>
|
||||
<graph_prototype>
|
||||
<name>iostat: {#HDNAME} util</name>
|
||||
<width>900</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>1</show_work_period>
|
||||
<show_triggers>1</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>1</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>0</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>00EEEE</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_iostat_agent active</host>
|
||||
<key>iostat[util,{#HDNAME}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>00DD00</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_iostat_agent active</host>
|
||||
<key>iostat[rs,{#HDNAME}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>2</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>FF6666</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_iostat_agent active</host>
|
||||
<key>iostat[ws,{#HDNAME}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph_prototype>
|
||||
</graph_prototypes>
|
||||
<host_prototypes/>
|
||||
<jmx_endpoint/>
|
||||
</discovery_rule>
|
||||
</discovery_rules>
|
||||
<httptests/>
|
||||
<macros/>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
</zabbix_export>
|
||||
168
netstat/mdm-netstat-connection-active.xml
Normal file
168
netstat/mdm-netstat-connection-active.xml
Normal file
@ -0,0 +1,168 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-06-14T12:23:50Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm netstat connections active</template>
|
||||
<name>mdm netstat connections active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Netstat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items>
|
||||
<item>
|
||||
<name>Http established cons on 80 and 443 ports</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>netstat-conn[established]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>conn</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Netstat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Http time waiting conns on 80 and 443 ports</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>netstat-conn[time_wait]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>conn</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Netstat</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
</items>
|
||||
<discovery_rules/>
|
||||
<httptests/>
|
||||
<macros/>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
<graphs>
|
||||
<graph>
|
||||
<name>Netstat: connections on 80 and 443 ports</name>
|
||||
<width>600</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>0</show_work_period>
|
||||
<show_triggers>0</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>0</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>0</sortorder>
|
||||
<drawtype>2</drawtype>
|
||||
<color>AA00AA</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm netstat connections active</host>
|
||||
<key>netstat-conn[established]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>00DD00</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm netstat connections active</host>
|
||||
<key>netstat-conn[time_wait]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph>
|
||||
</graphs>
|
||||
</zabbix_export>
|
||||
3
netstat/netstat_conn.conf
Executable file
3
netstat/netstat_conn.conf
Executable file
@ -0,0 +1,3 @@
|
||||
#netstat connections status
|
||||
# $1 METRIC
|
||||
UserParameter=netstat-conn[*],/etc/zabbix/scripts/netstat_conn.sh "$1"
|
||||
39
netstat/netstat_conn.sh
Executable file
39
netstat/netstat_conn.sh
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Netstat connections monitoring
|
||||
|
||||
METRIC="$1"
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "Please enter metric"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CACHETTL="55" # Время действия кеша в секундах (чуть меньше чем период опроса элементов)
|
||||
CACHE="/tmp/netstat-status-`echo netstat| md5sum | cut -d" " -f1`.cache"
|
||||
|
||||
if [ -s "$CACHE" ]; then
|
||||
TIMECACHE=`stat -c"%Z" "$CACHE"`
|
||||
else
|
||||
TIMECACHE=0
|
||||
fi
|
||||
|
||||
TIMENOW=`date '+%s'`
|
||||
|
||||
if [ "$(($TIMENOW - $TIMECACHE))" -gt "$CACHETTL" ]; then
|
||||
netstat -tan|grep -e ':80\|:443' > $CACHE || exit 1
|
||||
fi
|
||||
|
||||
case $METRIC in
|
||||
'established')
|
||||
cat $CACHE | grep "ESTABLISHED" | wc -l
|
||||
;;
|
||||
'time_wait')
|
||||
cat $CACHE | grep "TIME_WAIT" | wc -l
|
||||
;;
|
||||
*)
|
||||
echo "Not selected metric"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
607
nginx/mdm-nginx-active.xml
Normal file
607
nginx/mdm-nginx-active.xml
Normal file
@ -0,0 +1,607 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-06-14T11:47:45Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>MyTemplates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm_nginx_agent active</template>
|
||||
<name>mdm_nginx_agent active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>MyTemplates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items>
|
||||
<item>
|
||||
<name>Nginx: connections accepted per sec</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>nginx[accepts,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>c/sec</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing>
|
||||
<step>
|
||||
<type>10</type>
|
||||
<params/>
|
||||
</step>
|
||||
</preprocessing>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: connects active</name>
|
||||
<type>7</type>
|
||||
<snmp_community>public</snmp_community>
|
||||
<snmp_oid>interfaces.ifTable.ifEntry.ifInOctets.1</snmp_oid>
|
||||
<key>nginx[active,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: connections handled per sec</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>nginx[handled,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>c/sec</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing>
|
||||
<step>
|
||||
<type>10</type>
|
||||
<params/>
|
||||
</step>
|
||||
</preprocessing>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: connections reading</name>
|
||||
<type>7</type>
|
||||
<snmp_community>public</snmp_community>
|
||||
<snmp_oid>interfaces.ifTable.ifEntry.ifInOctets.1</snmp_oid>
|
||||
<key>nginx[reading,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: requests per sec</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>nginx[requests,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>0</value_type>
|
||||
<allowed_hosts/>
|
||||
<units>r/sec</units>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing>
|
||||
<step>
|
||||
<type>10</type>
|
||||
<params/>
|
||||
</step>
|
||||
</preprocessing>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: connections waiting</name>
|
||||
<type>7</type>
|
||||
<snmp_community>public</snmp_community>
|
||||
<snmp_oid>interfaces.ifTable.ifEntry.ifInOctets.1</snmp_oid>
|
||||
<key>nginx[waiting,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: connections writing</name>
|
||||
<type>7</type>
|
||||
<snmp_community>public</snmp_community>
|
||||
<snmp_oid>interfaces.ifTable.ifEntry.ifInOctets.1</snmp_oid>
|
||||
<key>nginx[writing,{$NGINX_STATS_URL}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Nginx: Number of processes $1</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>proc.num[nginx]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>Nginx</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
</items>
|
||||
<discovery_rules/>
|
||||
<httptests/>
|
||||
<macros/>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
<triggers>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:nginx[active,{$NGINX_STATS_URL}].last(0)}>{$NGINX_CON_NUM}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: many active connections on {HOST.NAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>2</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].avg(240)}>{$NGINX_REQ_NUM}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: many requests on {HOST.NAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>2</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>Nginx: too many requests on {HOST.NAME}</name>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].avg(240)}>{$NGINX_REQ_NUM}*1.5</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].last(0)}>{$NGINX_REQ_NUM}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: many requests on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>2</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>Nginx: too many requests on {HOSTNAME}</name>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].last(0)}>{$NGINX_REQ_NUM}*1.3</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:proc.num[nginx].last(0)}<1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: nginx is not running on {HOST.NAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>5</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].avg(240)}>{$NGINX_REQ_NUM}*1.5</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: too many requests on {HOST.NAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>3</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_nginx_agent active:nginx[requests,{$NGINX_STATS_URL}].last(0)}>{$NGINX_REQ_NUM}*1.3</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Nginx: too many requests on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>3</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
</triggers>
|
||||
<graphs>
|
||||
<graph>
|
||||
<name>Nginx: Connections</name>
|
||||
<width>600</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>0</show_work_period>
|
||||
<show_triggers>1</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>0</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>0</sortorder>
|
||||
<drawtype>4</drawtype>
|
||||
<color>3333FF</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[active,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>FF6666</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[writing,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>2</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>EEEE00</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[reading,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>3</sortorder>
|
||||
<drawtype>0</drawtype>
|
||||
<color>00CC00</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[waiting,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph>
|
||||
<graph>
|
||||
<name>Nginx: Requests</name>
|
||||
<width>600</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>0</show_work_period>
|
||||
<show_triggers>1</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>0</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>5</drawtype>
|
||||
<color>FF3333</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[requests,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>2</sortorder>
|
||||
<drawtype>2</drawtype>
|
||||
<color>00EE00</color>
|
||||
<yaxisside>1</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm_nginx_agent active</host>
|
||||
<key>nginx[accepts,{$NGINX_STATS_URL}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph>
|
||||
</graphs>
|
||||
</zabbix_export>
|
||||
2
nginx/nginx-stats.conf
Executable file
2
nginx/nginx-stats.conf
Executable file
@ -0,0 +1,2 @@
|
||||
UserParameter=nginx[*],/etc/zabbix/scripts/nginx-stats.sh "none" "$1" "$2"
|
||||
|
||||
54
nginx/nginx-stats.sh
Executable file
54
nginx/nginx-stats.sh
Executable file
@ -0,0 +1,54 @@
|
||||
#!/bin/bash
|
||||
##### OPTIONS VERIFICATION #####
|
||||
if [[ -z "$1" || -z "$2" || -z "$3" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
##### PARAMETERS #####
|
||||
RESERVED="$1"
|
||||
METRIC="$2"
|
||||
STATSURL="$3"
|
||||
CURL="/usr/bin/curl"
|
||||
CACHE_TTL="55"
|
||||
CACHE_FILE="/tmp/zabbix.nginx.`echo $STATSURL | md5sum | cut -d" " -f1`.cache"
|
||||
EXEC_TIMEOUT="1"
|
||||
NOW_TIME=`date '+%s'`
|
||||
##### RUN #####
|
||||
if [ -s "${CACHE_FILE}" ]; then
|
||||
CACHE_TIME=`stat -c"%Y" "${CACHE_FILE}"`
|
||||
else
|
||||
CACHE_TIME=0
|
||||
fi
|
||||
DELTA_TIME=$((${NOW_TIME} - ${CACHE_TIME}))
|
||||
#
|
||||
if [ ${DELTA_TIME} -lt ${EXEC_TIMEOUT} ]; then
|
||||
sleep $((${EXEC_TIMEOUT} - ${DELTA_TIME}))
|
||||
elif [ ${DELTA_TIME} -gt ${CACHE_TTL} ]; then
|
||||
echo "" >> "${CACHE_FILE}" # !!!
|
||||
DATACACHE=`${CURL} --insecure -s "${STATSURL}" 2>&1`
|
||||
echo "${DATACACHE}" > "${CACHE_FILE}" # !!!
|
||||
chmod 640 "${CACHE_FILE}"
|
||||
fi
|
||||
#
|
||||
if [ "${METRIC}" = "active" ]; then
|
||||
cat "${CACHE_FILE}" | grep "Active connections" | cut -d':' -f2
|
||||
fi
|
||||
if [ "${METRIC}" = "accepts" ]; then
|
||||
cat "${CACHE_FILE}" | sed -n '3p' | cut -d" " -f2
|
||||
fi
|
||||
if [ "${METRIC}" = "handled" ]; then
|
||||
cat "${CACHE_FILE}" | sed -n '3p' | cut -d" " -f3
|
||||
fi
|
||||
if [ "${METRIC}" = "requests" ]; then
|
||||
cat "${CACHE_FILE}" | sed -n '3p' | cut -d" " -f4
|
||||
fi
|
||||
if [ "${METRIC}" = "reading" ]; then
|
||||
cat "${CACHE_FILE}" | grep "Reading" | cut -d':' -f2 | cut -d' ' -f2
|
||||
fi
|
||||
if [ "${METRIC}" = "writing" ]; then
|
||||
cat "${CACHE_FILE}" | grep "Writing" | cut -d':' -f3 | cut -d' ' -f2
|
||||
fi
|
||||
if [ "${METRIC}" = "waiting" ]; then
|
||||
cat "${CACHE_FILE}" | grep "Waiting" | cut -d':' -f4 | cut -d' ' -f2
|
||||
fi
|
||||
#
|
||||
exit 0
|
||||
5
php-fpm/fpm-status.conf
Executable file
5
php-fpm/fpm-status.conf
Executable file
@ -0,0 +1,5 @@
|
||||
#php-fpm status
|
||||
# $1 METRIC
|
||||
# $2 FPM URL
|
||||
# $3 FPM PORT
|
||||
UserParameter=php-fpm[*],/etc/zabbix/scripts/fpm-status.sh "$1" "$2" "$3"
|
||||
80
php-fpm/fpm-status.sh
Executable file
80
php-fpm/fpm-status.sh
Executable file
@ -0,0 +1,80 @@
|
||||
#!/bin/bash
|
||||
##### OPTIONS VERIFICATION #####
|
||||
if [ -z "$1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
##### PARAMETERS #####
|
||||
METRIC="$1"
|
||||
POOL_PORT="${3:-9001}"
|
||||
STATSURL="${2:-http://localhost/fpm-status?port=$POOL_PORT}"
|
||||
CURL="/usr/bin/curl"
|
||||
CACHE_TTL="55"
|
||||
CACHE_FILE="/tmp/zabbix.fpm-status.`echo $STATSURL | md5sum | cut -d" " -f1`.cache"
|
||||
EXEC_TIMEOUT="1"
|
||||
NOW_TIME=`date '+%s'`
|
||||
##### RUN #####
|
||||
if [ -s "${CACHE_FILE}" ]; then
|
||||
CACHE_TIME=`stat -c"%Y" "${CACHE_FILE}"`
|
||||
else
|
||||
CACHE_TIME=0
|
||||
fi
|
||||
DELTA_TIME=$((${NOW_TIME} - ${CACHE_TIME}))
|
||||
#
|
||||
if [ ${DELTA_TIME} -lt ${EXEC_TIMEOUT} ]; then
|
||||
sleep $((${EXEC_TIMEOUT} - ${DELTA_TIME}))
|
||||
elif [ ${DELTA_TIME} -gt ${CACHE_TTL} ]; then
|
||||
echo "" >> "${CACHE_FILE}" # !!!
|
||||
DATACACHE=`${CURL} --insecure -s "${STATSURL}" 2>&1`
|
||||
echo "${DATACACHE}" > "${CACHE_FILE}" # !!!
|
||||
chmod 640 "${CACHE_FILE}"
|
||||
fi
|
||||
|
||||
#
|
||||
case $METRIC in
|
||||
pool)
|
||||
grep "^pool:" $CACHE_FILE | cut -d ':' -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
process_manager)
|
||||
grep "^process manager:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
start_time)
|
||||
grep "^start time:" $CACHE_FILE | sed 's|^start time:\s\+||'
|
||||
;;
|
||||
start_since)
|
||||
grep "^start since:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
accepted_conn)
|
||||
grep "^accepted conn:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
listen_queue)
|
||||
grep "^listen queue:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
max_listen_queue)
|
||||
grep "^max listen queue:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
listen_queue_len)
|
||||
grep "^listen queue len:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
idle_processes)
|
||||
grep "^idle processes:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
active_processes)
|
||||
grep "^active processes:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
total_processes)
|
||||
grep "^total processes:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
max_active_processes)
|
||||
grep "^max active processes:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
max_children_reached)
|
||||
grep "^max children reached:" $CACHE_FILE | cut -d ":" -f 2 | sed 's|^\s\+||'
|
||||
;;
|
||||
*)
|
||||
echo "Unsupported metric $METRIC"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
#
|
||||
|
||||
exit 0
|
||||
418
php-fpm/mdm-php-fpm-active.xml
Normal file
418
php-fpm/mdm-php-fpm-active.xml
Normal file
@ -0,0 +1,418 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-06-14T12:27:54Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm php-fpm active</template>
|
||||
<name>mdm php-fpm active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items>
|
||||
<item>
|
||||
<name>php-fpm - ping check</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>fpm[ping,{$POOL_PORT}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>60d</trends>
|
||||
<status>1</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>php-fpm - number of active processes</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>php-fpm[active_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>60d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>php-fpm - number of idle processes</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>php-fpm[idle_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>60d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>php-fpm - number of total processes</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>php-fpm[total_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>60d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>Number of running processes $1</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>proc.num[{$FPM_PROCESS_NAME}]</key>
|
||||
<delay>1m</delay>
|
||||
<history>1w</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>php-fpm</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
</items>
|
||||
<discovery_rules/>
|
||||
<httptests/>
|
||||
<macros>
|
||||
<macro>
|
||||
<macro>{$FPM_PROCESS_IDLE_CR}</macro>
|
||||
<value>2</value>
|
||||
</macro>
|
||||
<macro>
|
||||
<macro>{$FPM_PROCESS_IDLE_TR}</macro>
|
||||
<value>10</value>
|
||||
</macro>
|
||||
<macro>
|
||||
<macro>{$FPM_PROCESS_NAME}</macro>
|
||||
<value>php-fpm</value>
|
||||
</macro>
|
||||
<macro>
|
||||
<macro>{$POOL_PORT}</macro>
|
||||
<value>9001</value>
|
||||
</macro>
|
||||
</macros>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
<triggers>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:fpm[ping,{$POOL_PORT}].last(0)}<>0</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm is not running on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>1</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>php-fpm process is not running on {HOSTNAME}</name>
|
||||
<expression>{mdm php-fpm active:proc.num[{$FPM_PROCESS_NAME}].last(0)}<1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:php-fpm[idle_processes,{$FPM_URL},{$FPM_PORT}].last(0)}<{$FPM_PROCESS_IDLE_TR}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm number of idle processes is too low on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:php-fpm[idle_processes,{$FPM_URL},{$FPM_PORT}].nodata(3m)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm number of idle processes nodata > 180s {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:php-fpm[idle_processes,{$FPM_URL},{$FPM_PORT}].last(0)}<{$FPM_PROCESS_IDLE_CR}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm number of idle process is critical on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:proc.num[{$FPM_PROCESS_NAME}].last(0)}<1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm process is not running on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm php-fpm active:php-fpm[total_processes,{$FPM_URL},{$FPM_PORT}].last()}>{$PHPFPM_MAXPROC}</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>php-fpm total processes is too high on {HOSTNAME}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>3</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
</triggers>
|
||||
<graphs>
|
||||
<graph>
|
||||
<name>php-fpm proccess</name>
|
||||
<width>600</width>
|
||||
<height>200</height>
|
||||
<yaxismin>0.0000</yaxismin>
|
||||
<yaxismax>100.0000</yaxismax>
|
||||
<show_work_period>0</show_work_period>
|
||||
<show_triggers>0</show_triggers>
|
||||
<type>0</type>
|
||||
<show_legend>1</show_legend>
|
||||
<show_3d>0</show_3d>
|
||||
<percent_left>0.0000</percent_left>
|
||||
<percent_right>0.0000</percent_right>
|
||||
<ymin_type_1>0</ymin_type_1>
|
||||
<ymax_type_1>0</ymax_type_1>
|
||||
<ymin_item_1>0</ymin_item_1>
|
||||
<ymax_item_1>0</ymax_item_1>
|
||||
<graph_items>
|
||||
<graph_item>
|
||||
<sortorder>0</sortorder>
|
||||
<drawtype>2</drawtype>
|
||||
<color>009900</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm php-fpm active</host>
|
||||
<key>php-fpm[total_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>1</sortorder>
|
||||
<drawtype>2</drawtype>
|
||||
<color>CC0000</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm php-fpm active</host>
|
||||
<key>php-fpm[idle_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
<graph_item>
|
||||
<sortorder>2</sortorder>
|
||||
<drawtype>5</drawtype>
|
||||
<color>0000BB</color>
|
||||
<yaxisside>0</yaxisside>
|
||||
<calc_fnc>2</calc_fnc>
|
||||
<type>0</type>
|
||||
<item>
|
||||
<host>mdm php-fpm active</host>
|
||||
<key>php-fpm[active_processes,{$FPM_URL},{$FPM_PORT}]</key>
|
||||
</item>
|
||||
</graph_item>
|
||||
</graph_items>
|
||||
</graph>
|
||||
</graphs>
|
||||
</zabbix_export>
|
||||
306
test_backup/mdm_test_backup_active.xml
Normal file
306
test_backup/mdm_test_backup_active.xml
Normal file
@ -0,0 +1,306 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-06-14T11:56:47Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<templates>
|
||||
<template>
|
||||
<template>mdm_test_backup_active</template>
|
||||
<name>mdm_test_backup_active</name>
|
||||
<description/>
|
||||
<groups>
|
||||
<group>
|
||||
<name>MDM</name>
|
||||
</group>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
</group>
|
||||
</groups>
|
||||
<applications>
|
||||
<application>
|
||||
<name>backup</name>
|
||||
</application>
|
||||
</applications>
|
||||
<items>
|
||||
<item>
|
||||
<name>test_logfile</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>test_backup[log]</key>
|
||||
<delay>30s</delay>
|
||||
<history>90d</history>
|
||||
<trends>365d</trends>
|
||||
<status>0</status>
|
||||
<value_type>3</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>backup</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
<item>
|
||||
<name>state</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>test_backup[state]</key>
|
||||
<delay>20s</delay>
|
||||
<history>52w</history>
|
||||
<trends>0</trends>
|
||||
<status>0</status>
|
||||
<value_type>4</value_type>
|
||||
<allowed_hosts/>
|
||||
<units/>
|
||||
<snmpv3_contextname/>
|
||||
<snmpv3_securityname/>
|
||||
<snmpv3_securitylevel>0</snmpv3_securitylevel>
|
||||
<snmpv3_authprotocol>0</snmpv3_authprotocol>
|
||||
<snmpv3_authpassphrase/>
|
||||
<snmpv3_privprotocol>0</snmpv3_privprotocol>
|
||||
<snmpv3_privpassphrase/>
|
||||
<params/>
|
||||
<ipmi_sensor/>
|
||||
<authtype>0</authtype>
|
||||
<username/>
|
||||
<password/>
|
||||
<publickey/>
|
||||
<privatekey/>
|
||||
<port/>
|
||||
<description/>
|
||||
<inventory_link>0</inventory_link>
|
||||
<applications>
|
||||
<application>
|
||||
<name>backup</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<master_item/>
|
||||
</item>
|
||||
</items>
|
||||
<discovery_rules/>
|
||||
<httptests/>
|
||||
<macros/>
|
||||
<templates/>
|
||||
<screens/>
|
||||
</template>
|
||||
</templates>
|
||||
<triggers>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].nodata(3m)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: no data</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on backup,#1)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: on backup</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on rotation,#1)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: on rotation</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on sending,#1)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: on sending</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(starting script,#1)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: starting</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>1</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(fail,#1)}=1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>backup: {ITEM.LASTVALUE1}</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>4</priority>
|
||||
<description/>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>({mdm_test_backup_active:test_backup[log].last()}<>1 and {mdm_test_backup_active:test_backup[log].time()}>{$BACKUP_ROTATION_TIME})</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Today, after macro-time, script was not running</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>0</status>
|
||||
<priority>3</priority>
|
||||
<description>отсутствует резервная копия после времени, которое заданно в макросе
|
||||
Time format:170200 ( 17 - hours, 02 minutes, 00 seconds)
|
||||
Macros name: {$BACKUP_ROTATION_TIME}</description>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>backup: on backup</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on backup,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: on rotation</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on rotation,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: on sending</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on sending,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: starting</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(starting script,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: {ITEM.LASTVALUE1}</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(fail,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<tags/>
|
||||
</trigger>
|
||||
<trigger>
|
||||
<expression>{mdm_test_backup_active:test_backup[log].last()}<>1</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Today script was not running</name>
|
||||
<correlation_mode>0</correlation_mode>
|
||||
<correlation_tag/>
|
||||
<url/>
|
||||
<status>1</status>
|
||||
<priority>3</priority>
|
||||
<description>отсутствует резервная копия</description>
|
||||
<type>0</type>
|
||||
<manual_close>0</manual_close>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<name>backup: on backup</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on backup,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: on rotation</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on rotation,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: on sending</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(on sending,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: starting</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(starting script,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<name>backup: {ITEM.LASTVALUE1}</name>
|
||||
<expression>{mdm_test_backup_active:test_backup[state].str(fail,#1)}=1</expression>
|
||||
<recovery_expression/>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<tags/>
|
||||
</trigger>
|
||||
</triggers>
|
||||
</zabbix_export>
|
||||
Loading…
x
Reference in New Issue
Block a user