Skip to content

Commit bdbab91

Browse files
committed
Zimbra NE backups check for Zabbix
1 parent 6c4e808 commit bdbab91

File tree

4 files changed

+99
-6
lines changed

4 files changed

+99
-6
lines changed

zabbix-zimbra/README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Zimbra monitoring with Zabbix
2-
=============================
1+
# Zimbra monitoring with Zabbix
32

43
This template offers services autodiscover, version tracking and service status.
54
It's compatibile with Zimbra 8.6+ (and its services with spaces).
@@ -20,7 +19,12 @@ Please note you should **change the timeout on the server/proxy** accordingly.
2019

2120
The bash script was inspired by [blog.linuxnet.ch](https://blog.linuxnet.ch/zimbra-monitoring-with-zabbix/).
2221

22+
# Zimbra Network Edition backup check
2323

24-
License & Copyright
25-
-------------------
26-
Code and documentation copyright 2017 YetOpen S.r.l.. Released under the GPLv3 license.
24+
This is a basic check which runs `zmbackupquery` looking for the number of completed backup in the last *n*th hours.
25+
By default the template check the latest 24h, but you can change or add new check as you prefer.
26+
27+
In the future it can be improved with different checks for full or incremental backups.
28+
29+
# License & Copyright
30+
Code and documentation copyright 2018 YetOpen S.r.l.. Released under the GPLv3 license.

zabbix-zimbra/sudo_zbx-zimbra.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Don't log every invocation of zmcontrol
2-
Cmnd_Alias ZIMBRA_BIN_ZABBIX = /opt/zimbra/bin/zmcontrol
2+
Cmnd_Alias ZIMBRA_BIN_ZABBIX = /opt/zimbra/bin/zmcontrol,/opt/zimbra/bin/zmbackupquery
33
Defaults!ZIMBRA_BIN_ZABBIX !syslog
44
zabbix ALL=(zimbra) NOPASSWD: ZIMBRA_BIN_ZABBIX
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
UserParameter=zimbrane.backup[*],sudo -u zimbra /opt/zimbra/bin/zmbackupquery --from "$(date +%Y%m%d%H%M%S -d '$1 hour ago')" | grep "Status: completed" | wc -l
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<zabbix_export>
3+
<version>3.0</version>
4+
<date>2018-12-12T13:04:45Z</date>
5+
<groups>
6+
<group>
7+
<name>Templates</name>
8+
</group>
9+
</groups>
10+
<templates>
11+
<template>
12+
<template>Template Zimbra NE</template>
13+
<name>Template Zimbra NE</name>
14+
<description>Zimbra Network Edition checks by YetOpen</description>
15+
<groups>
16+
<group>
17+
<name>Templates</name>
18+
</group>
19+
</groups>
20+
<applications>
21+
<application>
22+
<name>Zimbra</name>
23+
</application>
24+
</applications>
25+
<items>
26+
<item>
27+
<name>Number of backups in the last 24h</name>
28+
<type>0</type>
29+
<snmp_community/>
30+
<multiplier>0</multiplier>
31+
<snmp_oid/>
32+
<key>zimbrane.backup[24]</key>
33+
<delay>3600</delay>
34+
<history>90</history>
35+
<trends>365</trends>
36+
<status>0</status>
37+
<value_type>3</value_type>
38+
<allowed_hosts/>
39+
<units/>
40+
<delta>0</delta>
41+
<snmpv3_contextname/>
42+
<snmpv3_securityname/>
43+
<snmpv3_securitylevel>0</snmpv3_securitylevel>
44+
<snmpv3_authprotocol>0</snmpv3_authprotocol>
45+
<snmpv3_authpassphrase/>
46+
<snmpv3_privprotocol>0</snmpv3_privprotocol>
47+
<snmpv3_privpassphrase/>
48+
<formula>1</formula>
49+
<delay_flex/>
50+
<params/>
51+
<ipmi_sensor/>
52+
<data_type>0</data_type>
53+
<authtype>0</authtype>
54+
<username/>
55+
<password/>
56+
<publickey/>
57+
<privatekey/>
58+
<port/>
59+
<description>Number of Zimbra backups in the last &quot;n&quot; hours</description>
60+
<inventory_link>0</inventory_link>
61+
<applications>
62+
<application>
63+
<name>Zimbra</name>
64+
</application>
65+
</applications>
66+
<valuemap/>
67+
<logtimefmt/>
68+
</item>
69+
</items>
70+
<discovery_rules/>
71+
<macros/>
72+
<templates/>
73+
<screens/>
74+
</template>
75+
</templates>
76+
<triggers>
77+
<trigger>
78+
<expression>{Template Zimbra NE:zimbrane.backup[24].last()}=0</expression>
79+
<name>No backups in the last 24h</name>
80+
<url/>
81+
<status>0</status>
82+
<priority>3</priority>
83+
<description/>
84+
<type>0</type>
85+
<dependencies/>
86+
</trigger>
87+
</triggers>
88+
</zabbix_export>

0 commit comments

Comments
 (0)