There are several ways of monitor a wordpress blog by using Nagios or op5 Monitor.
WordPress uses the following parts to work:
- Webserver frontend
- PHP scripts
- MySQL database backend
- At least one system to run it on
I found one article describing howto monitor the Webserver and the MySQL database and even that a certain webpage contain a certain phrase. But I would like to emulate a user that clicks on some pages and graph the performance.
The tool I like for in-depth web monitoring is webinject. It allows scripting a simulated web user with alot of features.
I recommend to read the excellent how-to written by op5 support team and of cource use webinjects reference manual.
The testcase I’ve created looks like this:
<testcases repeat="1">
<case
id="1"
description1="Startsidan www.it-slav.net/blogs"
method="get"
url="http://www.it-slav.net/blogs/"
verifypositive="An It-Slave in the digital saltmine"
/>
<case
id="2"
description1="Nagios or op5 Monitor plugin for 1-wire humidity measurement"
method="get"
url="http://www.it-slav.net/blogs/?p=802"
verifypositive="1-wire humidity probe"
/>
<case
id="3"
description1="op5 Monitor or Nagios plugin for 1-wire temperature measurement"
method="get"
url="http://www.it-slav.net/blogs/?p=115"
verifypositive="check_1-wiretemp"
/>
<case
id="4"
description1="Wp-Admin"
method="get"
url="http://www.it-slav.net/blogs/wp-admin"
verifyresponsecode="301"
/>
</testcases>
And when run in Nagios mode:
[root@op5 webinject]# ./webinject.pl -c config.xml testcases/wordpressblog.xml WebInject OK - All tests passed successfully in 4.143 seconds |time=4.143;10;;0
In checkcommands.cfg:
# command 'check_webinject'
define command{
command_name check_webinject
command_line $USER1$/webinject/webinject.pl testcases/$ARG1$
}
In services.cfg:
# service 'Webinject Blog'
define service{
use default-service
host_name dull
service_description Webinject Blog
check_command check_webinject!wordpressblog.xml
contact_groups it-slav_sms,it-slav_mail,call_it-slav
}
This is a nice pnp graph of my Webinject check:

Links:
- Webinject
- op5 Webinject Howto
- Nagios
- op5 Monitor
Leave a Reply
You must be logged in to post a comment.



