Difference between revisions of "Monitoring Zimbra with Nagios"

Jump to navigation Jump to search
m
→‎Clam AV Service: Updated for Zimbra v8
(Initial creation)
 
m (→‎Clam AV Service: Updated for Zimbra v8)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
This page covers Zimbra application specific monitoring checks, OS specific checks (eg low disk space, or high CPU) are not included.  The majority of it was gleamed from this forum thread - http://www.zimbra.com/forums/administrators/20029-zimbra-monitoring-nagios.html
This page covers Zimbra application specific monitoring checks, OS specific checks (eg low disk space, or high CPU) are not included.  The majority of it was gleamed from this forum thread - http://www.zimbra.com/forums/administrators/20029-zimbra-monitoring-nagios.html
__TOC__


All my Zimbra specific checks are applied to specific hosts via a <code>zimbra-servers</code> hostgroup.  Create a group in your <code>hostgroups_nagios2.cfg</code> file to contain you Zimbra hosts, for example...
All my Zimbra specific checks are applied to specific hosts via a <code>zimbra-servers</code> hostgroup.  Create a group in your <code>hostgroups_nagios2.cfg</code> file to contain you Zimbra hosts, for example...
Line 14: Line 16:
** Restarts the Nagios service
** Restarts the Nagios service


== Basic Service Checks ==
== Core Service Checks ==
Note that not all checks will be appropriate for your installation.  For example, if you only allow user access over secure links then the [[#IMAP|IMAP]] and [[#HTTP / Web Client|HTTP / Web Client]] checks will not apply.
Note that not all checks will be appropriate for your installation.  For example, if you only allow user access over secure links then the [[#IMAP|IMAP]] and [[#HTTP / Web Client|HTTP / Web Client]] checks will not apply.


Line 96: Line 98:
== System Checks ==
== System Checks ==
=== Clam AV Service ===
=== Clam AV Service ===
Checks that the Clam Anti Virus service is running. Requires [[Nagios#NRPE|NRPE]] to installed and running 1st.
Checks that the Clam Anti Virus service is running. Requires [[Nagios#NRPE|NRPE]] to be installed and running 1st.


On the Zimbra server, add the following to <code>/etc/nagios/nrpe.cfg</code>
On the Zimbra server, '''if you're running Zimbra v7 or earlier''', add the following to <code>/etc/nagios/nrpe.cfg</code>
  command[check_clamd]=/usr/lib/nagios/plugins/check_clamd -H localhost
  command[check_clamd]=/usr/lib/nagios/plugins/check_clamd -H localhost
On the Zimbra server, '''if you're running Zimbra v8''', add the following to <code>/etc/nagios/nrpe.cfg</code>
command[check_clamd]=/usr/lib/nagios/plugins/check_clamd /opt/zimbra/data/clamav/clamav.sock


Add a new service (on Nagios server)...
Add a new service (on Nagios server)...
Line 110: Line 115:


=== Clam AV Updates ===
=== Clam AV Updates ===
Requires both [[Nagios#NRPE|NRPE]] to installed and running 1st, and also a 3rd party script to perform the check.
Requires both [[Nagios#NRPE|NRPE]] to be installed and running 1st, and also a 3rd party script to perform the check.


On the Zimbra server
On the Zimbra server
Line 139: Line 144:


=== LMTP ===
=== LMTP ===
Requires [[Nagios#NRPE|NRPE]] to installed and running 1st
Checks that [[Acronyms#L|LMTP]] (used internal routing of emails through Clam, to mailboxes, etc) is functioning.  Requires [[Nagios#NRPE|NRPE]] to be installed and running 1st


On the Zimbra server, add the following to <code>/etc/nagios/nrpe.cfg</code>.  Note that you need to update the FQDN for your server in the expected return field.
On the Zimbra server, add the following to <code>/etc/nagios/nrpe.cfg</code>.  Note that you need to update the FQDN for your server in the expected return field.
Line 152: Line 157:
  }
  }


=== Spellcheck ===
Checks that the spelling checker service is available.  Requires [[Nagios#NRPE|NRPE]] to installed and running 1st.
On the Zimbra server, add the following to <code>/etc/nagios/nrpe.cfg</code>
command[check_zimbra_spell]=/usr/lib/nagios/plugins/check_http -H localhost -p 7780
Add a new service (on Nagios server)...
define service {
        use                    zimbra-svc-template
        hostgroup_name          zimbra-servers
        service_description    Zimbra Spelling
        check_command          check_nrpe!check_spell
}
== Dependency Checks ==
=== DNS ===
Checks that your Zimbra server is able to make DNS lookups.  Requires [[Nagios#NRPE|NRPE]] to installed and running 1st.
Note that if you need to consider which DNS server(s) it is most appropriate to check against.  For example, if you run a local Bind instance on your Zimbra server, you may want to test both that, and the DNS server which it forwards requests to.
On the Zimbra server, add the following to <code>/etc/nagios/nrpe.cfg</code>
command[check_dns]=/usr/lib/nagios/plugins/check_dns -H google.com
If you need to resolution again a DNS server different to the default (as specified in <code>/etc/resolv.conf</code> use the <code>-s</code> option, for example...
command[check_dns]=/usr/lib/nagios/plugins/check_dns -H google.com -s 8.8.8.8
Add a new service (on Nagios server)...
define service {
        use                    zimbra-svc-template
        hostgroup_name          zimbra-servers
        service_description    DNS Resolution
        check_command          check_nrpe!check_dns
}


[[Category:Zimbra]]
[[Category:Zimbra]]
[[Category:Nagios]]
[[Category:Nagios]]
[[Category:Monitoring]]
[[Category:Monitoring]]

Navigation menu