« Apache - Remove Auth From SubdirectoryPHPList Install to RackSpace Cloud Server (CentOS) »

Zabbix - Monitor for Apache config errors

11/17/09

Permalink 04:39:56 am, by admin Email , 150 words   English (US)
Categories: Apache

Zabbix - Monitor for Apache config errors

To monitor for Apache config file errors in Zabbix do the following:

1. Create monitor test script at /etc/zabbix/apache_configtest.pl with the following contents:

#!/usr/bin/perl

my $result = `/usr/sbin/apachectl configtest 2>&1`;
if ($result =~ /Syntax\ OK/ )  {
        print "0";
} else {
        print "1";
};

2. Add the following line to the end of /etc/zabbix/zabbix_agentd.conf:

UserParameter=apache.configtest,/etc/zabbix/apache_configtest.pl

3. From the Zabbix web interface add an Item for the new monitor at Configuration -> Items -> Create Item with the following settings:

Description: Apache config has errors
Type: Zabbix Agent
Key: apache.configtest
Type of information: Numeric
Status: Active
Applications: Apache

Other fields can be left at default.

4. Add a Trigger for the new Item at Configuration -> Triggers -> Create Trigger with the following settings:

Name: Apache config has errors
Expression: {host:apache.configtest.last(0)}=1
Severity: Hight

Other fields can be left at default.

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

free blog software