Browse Source

zabbix-check-postfix (0.1~dev11) Add postfix.activedeferred to check count of deferred in mailq * Update XML to Zabbix version 3 * Add sudoers.d includedir warning

master
Christoph Hueffelmann 4 years ago
parent
commit
1da000b3aa
5 changed files with 166 additions and 38 deletions
  1. +8
    -0
      debian/changelog
  2. +11
    -0
      debian/postinst
  3. +3
    -0
      debian/rules
  4. +1
    -0
      etc/zabbix/zabbix_agentd.d/userparameter_postfix.conf
  5. +143
    -38
      usr/share/doc/zabbix-check-postfix/examples/zabbix-check-postfix-template.xml

+ 8
- 0
debian/changelog View File

@ -1,3 +1,11 @@
zabbix-check-postfix (0.1~dev11) precise; urgency=medium
* Add postfix.activedeferred to check count of deferred in mailq
* Update XML to Zabbix version 3
* Add sudoers.d includedir warning
-- Christoph Hueffelmann <chr@istoph.de> Wed, 11 Jan 2017 09:31:23 +0100
zabbix-check-postfix (0.1~dev10) precise; urgency=medium
* Add sudo for:


+ 11
- 0
debian/postinst View File

@ -22,6 +22,17 @@ case "$1" in
configure)
chmod -v +x /usr/lib/zabbix-check/bin/zabbix-check-postfix.sh
chmod -v +x /usr/lib/zabbix-check/bin/zabbix-check-postfix2.sh
chmod 440 /etc/sudoers.d/zabbix-check-postfix
#check sudoers.d
if ! grep -q '^#includedir /etc/sudoers.d' /etc/sudoers; then
echo 'Warning: Please add #includedir /etc/sudoers.d to /etc/sudoers
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
'
fi
if which invoke-rc.d >/dev/null 2>&1; then
invoke-rc.d zabbix-agent stop || true


+ 3
- 0
debian/rules View File

@ -3,6 +3,9 @@
%:
dh $@
override_dh_builddeb:
dh_builddeb -- -Zgzip
override_dh_install:
dh_install --sourcedir=.


+ 1
- 0
etc/zabbix/zabbix_agentd.d/userparameter_postfix.conf View File

@ -1,3 +1,4 @@
EnableRemoteCommands=1
UserParameter=postfix.pfmailq,sudo /usr/lib/zabbix-check/bin/zabbix-check-postfix2.sh active
UserParameter=postfix.activedeferred,sudo /usr/lib/zabbix-check/bin/zabbix-check-postfix2.sh deferred
UserParameter=postfix[*],/usr/lib/zabbix-check/bin/zabbix-check-postfix.sh $1

+ 143
- 38
usr/share/doc/zabbix-check-postfix/examples/zabbix-check-postfix-template.xml View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>2.0</version>
<date>2015-06-12T12:42:13Z</date>
<version>3.0</version>
<date>2017-01-11T08:28:21Z</date>
<groups>
<group>
<name>Templates</name>
@ -11,6 +11,7 @@
<template>
<template>Template App Postfix Service</template>
<name>Template App Postfix Service</name>
<description/>
<groups>
<group>
<name>Templates</name>
@ -22,6 +23,92 @@
</application>
</applications>
<items>
<item>
<name>Postfix Mail Queue Deferred</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix.activedeferred</key>
<delay>300</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Postfix</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Mail Queue Active</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix.pfmailq</key>
<delay>300</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
<snmpv3_authprotocol>0</snmpv3_authprotocol>
<snmpv3_authpassphrase/>
<snmpv3_privprotocol>0</snmpv3_privprotocol>
<snmpv3_privpassphrase/>
<formula>1</formula>
<delay_flex/>
<params/>
<ipmi_sensor/>
<data_type>0</data_type>
<authtype>0</authtype>
<username/>
<password/>
<publickey/>
<privatekey/>
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Postfix</name>
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Bounced</name>
<type>0</type>
@ -36,7 +123,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -63,6 +150,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Bytes Delivered</name>
@ -78,7 +166,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>B</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -105,6 +193,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Bytes Received</name>
@ -120,7 +209,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>B</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -147,6 +236,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Deferred</name>
@ -162,7 +252,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -189,6 +279,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Delivered</name>
@ -204,7 +295,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -231,6 +322,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Discarded</name>
@ -246,7 +338,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -273,6 +365,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Forwarded</name>
@ -288,7 +381,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -315,6 +408,7 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Held</name>
@ -330,7 +424,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -357,22 +451,23 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Mail Queue</name>
<name>Postfix Received</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix.pfmailq</key>
<delay>300</delay>
<key>postfix[received]</key>
<delay>600</delay>
<history>30</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -399,14 +494,15 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Received</name>
<name>Postfix Rejected</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix[received]</key>
<key>postfix[rejected]</key>
<delay>600</delay>
<history>30</history>
<trends>365</trends>
@ -414,7 +510,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -441,14 +537,15 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Rejected</name>
<name>Postfix Reject Warnings</name>
<type>0</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix[rejected]</key>
<key>postfix[reject_warnings]</key>
<delay>600</delay>
<history>30</history>
<trends>365</trends>
@ -456,7 +553,7 @@
<value_type>3</value_type>
<allowed_hosts/>
<units>mails</units>
<delta>0</delta>
<delta>2</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
<snmpv3_securitylevel>0</snmpv3_securitylevel>
@ -483,21 +580,22 @@
</application>
</applications>
<valuemap/>
<logtimefmt/>
</item>
<item>
<name>Postfix Reject Warnings</name>
<type>0</type>
<name>SMTPS notAfter</name>
<type>10</type>
<snmp_community/>
<multiplier>0</multiplier>
<snmp_oid/>
<key>postfix[reject_warnings]</key>
<key>zabbix-check-ssl-notafter.sh[{HOSTNAME},25]</key>
<delay>600</delay>
<history>30</history>
<history>90</history>
<trends>365</trends>
<status>0</status>
<value_type>3</value_type>
<value_type>0</value_type>
<allowed_hosts/>
<units>mails</units>
<units/>
<delta>0</delta>
<snmpv3_contextname/>
<snmpv3_securityname/>
@ -519,19 +617,16 @@
<port/>
<description/>
<inventory_link>0</inventory_link>
<applications>
<application>
<name>Postfix</name>
</application>
</applications>
<applications/>
<valuemap/>
<logtimefmt/>
</item>
</items>
<discovery_rules/>
<macros/>
<templates>
<template>
<name>Template App SMTP Service</name>
<name>Template SMTP Server</name>
</template>
</templates>
<screens/>
@ -548,6 +643,16 @@
<type>0</type>
<dependencies/>
</trigger>
<trigger>
<expression>{Template App Postfix Service:postfix.activedeferred.last(0)}&gt;50</expression>
<name>Postfix: {ITEM.LASTVALUE} deferred mails in mailq on {HOST.NAME}</name>
<url/>
<status>0</status>
<priority>2</priority>
<description/>
<type>0</type>
<dependencies/>
</trigger>
<trigger>
<expression>{Template App Postfix Service:postfix[deferred].last(0)}&gt;50</expression>
<name>Postfix: {ITEM.LASTVALUE} deferred mails on {HOST.NAME}</name>
@ -559,7 +664,7 @@
<dependencies/>
</trigger>
<trigger>
<expression>{Template App Postfix Service:postfix[held].last(0)}&gt;200 | {Template App Postfix Service:postfix.pfmailq.last(0)}&gt;200</expression>
<expression>{Template App Postfix Service:postfix[held].last(0)}&gt;200 or {Template App Postfix Service:postfix.pfmailq.last(0)}&gt;200</expression>
<name>Postfix: {ITEM.LASTVALUE} held mails on {HOST.NAME}</name>
<url/>
<status>0</status>
@ -575,25 +680,25 @@
<status>0</status>
<priority>4</priority>
<description/>
<type>0</type>
<type>1</type>
<dependencies/>
</trigger>
<trigger>
<expression>{Template App Postfix Service:postfix[rejected].last(0)}&gt;20 | {Template App Postfix Service:postfix[reject_warnings].last(0)}&gt;20</expression>
<expression>{Template App Postfix Service:postfix[rejected].last(0)}&gt;20 or {Template App Postfix Service:postfix[reject_warnings].last(0)}&gt;20</expression>
<name>Postfix: {ITEM.LASTVALUE} rejected mails on {HOST.NAME}</name>
<url/>
<status>0</status>
<status>1</status>
<priority>2</priority>
<description/>
<type>0</type>
<dependencies/>
</trigger>
<trigger>
<expression>{Template App Postfix Service:postfix[rejected].last(0)}&gt;200 | {Template App Postfix Service:postfix[reject_warnings].last(0)}&gt;200</expression>
<expression>{Template App Postfix Service:postfix[rejected].last(0)}&gt;200 or {Template App Postfix Service:postfix[reject_warnings].last(0)}&gt;200</expression>
<name>Postfix: {ITEM.LASTVALUE} rejected mails on {HOST.NAME}</name>
<url/>
<status>0</status>
<priority>3</priority>
<priority>2</priority>
<description/>
<type>0</type>
<dependencies/>


Loading…
Cancel
Save