xenzbx 1.4 version with mdmxen backup trigger
This commit is contained in:
parent
2119c85dd0
commit
0c5c4c4415
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<zabbix_export>
|
||||
<version>3.4</version>
|
||||
<date>2021-01-26T10:07:03Z</date>
|
||||
<date>2021-02-01T11:41:44Z</date>
|
||||
<groups>
|
||||
<group>
|
||||
<name>Templates</name>
|
||||
@ -639,7 +639,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 name-label</name>
|
||||
<name>SR $2 name-label</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -681,7 +681,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 physical-size</name>
|
||||
<name>SR $2 physical-size</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -723,7 +723,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 physical-utilisation</name>
|
||||
<name>SR $2 physical-utilisation</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -765,7 +765,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 type</name>
|
||||
<name>SR $2 type</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -807,7 +807,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 virtual-allocation</name>
|
||||
<name>SR $2 virtual-allocation</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -849,7 +849,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 autorun</name>
|
||||
<name>VM $2 autorun</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -891,7 +891,49 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 memory-actual</name>
|
||||
<name>VM $2 backup</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
<key>xenzbx[xen.vm_is_backuped,{#VM_UUID}]</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>XenServer - VM</name>
|
||||
</application>
|
||||
</applications>
|
||||
<valuemap/>
|
||||
<logtimefmt/>
|
||||
<preprocessing/>
|
||||
<jmx_endpoint/>
|
||||
<application_prototypes/>
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>VM $2 memory-actual</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -933,7 +975,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 name-label</name>
|
||||
<name>VM $2 name-label</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -975,7 +1017,7 @@
|
||||
<master_item_prototype/>
|
||||
</item_prototype>
|
||||
<item_prototype>
|
||||
<name>$2 power-state</name>
|
||||
<name>VM $2 power-state</name>
|
||||
<type>7</type>
|
||||
<snmp_community/>
|
||||
<snmp_oid/>
|
||||
@ -1034,6 +1076,22 @@
|
||||
<dependencies/>
|
||||
<tags/>
|
||||
</trigger_prototype>
|
||||
<trigger_prototype>
|
||||
<expression>{xenzbx active:xenzbx[xen.vm_is_backuped,{#VM_UUID}].last()}=0</expression>
|
||||
<recovery_mode>0</recovery_mode>
|
||||
<recovery_expression/>
|
||||
<name>Xen vm {#VM_UUID} without backup</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>
|
||||
<graph_prototype>
|
||||
|
||||
@ -5,9 +5,12 @@
|
||||
export LC_ALL=""
|
||||
export LANG="en_US.UTF-8"
|
||||
|
||||
version="1.3"
|
||||
version="1.4"
|
||||
XE="/opt/xensource/bin/xe"
|
||||
|
||||
# path to mdmxen cfg backup system
|
||||
VMSCFG="/root/bin/mdmxen/etc/vms.cfg"
|
||||
|
||||
JSON=""
|
||||
##### PARAMETERS#####
|
||||
METRIC="$1"
|
||||
@ -284,6 +287,16 @@ xen.vm_autorun)
|
||||
exit 0
|
||||
;;
|
||||
|
||||
xen.vm_is_backuped)
|
||||
if [ -z "$ITEM" ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
RET=`cat ${VMSCFG} | awk -F: '/^[^#]/ { print $1 }' | awk -v UUID="${ITEM}" '{ if($2==UUID){print $0} }' | wc -l`
|
||||
echo ${RET}
|
||||
exit 0;
|
||||
;;
|
||||
|
||||
|
||||
script.version)
|
||||
echo ${version}
|
||||
@ -293,7 +306,7 @@ script.version)
|
||||
help)
|
||||
echo "please use these params
|
||||
{
|
||||
discovery
|
||||
discovery
|
||||
xen.version
|
||||
xen.dom0_mem
|
||||
xen.brand
|
||||
@ -314,12 +327,12 @@ xen.vm_runnig
|
||||
xen.vm_name-label
|
||||
xen.vm_power-state
|
||||
xen.vm_memory-actual
|
||||
xen.vm_is_backuped
|
||||
xen.vm_autorun
|
||||
script.version
|
||||
}"
|
||||
script.version
|
||||
}"
|
||||
;;
|
||||
|
||||
|
||||
*)
|
||||
echo ""
|
||||
;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user