[BlueOnyx:13079] Re: Reading Active Monitor

Michael Stauber mstauber at blueonyx.it
Mon May 20 20:04:19 -05 2013


Hi DD,

> ActiveMonitor appears to run off the back of shell output from reading
> various bits in /proc/ amongst other things, so I am looking at having a
> cron job do something similar - really just to create a page I can leave on
> a small android tablet I have kicking about.

Sort of, yes. Both Swatch (the monitoring component) and the GUI pages
to display the result are modular.

Swatch runs every 15 minutes and executes all the component scripts to
monitor services. The status results are stored in CODB. The GUI page
then displays the various individual status messages on a single page.

If you want to create your own active monitor module, then it is best to
look at an example.

For the MySQL Active Monitor element for example we're using this code:

MySQL AM Schema file:

http://devel.blueonyx.it/trac/browser/BlueOnyx/ui/base-mysql.mod/glue/schemas/mysql-am.schema

This defines the CODB database fields for the MySQL AM.

MySQL AM GUI element:

http://devel.blueonyx.it/trac/browser/BlueOnyx/ui/base-mysql.mod/ui/web/mysql_amdetails.php

This shows as part inside the Active Monitor Status GUI page.

Expect script that runs as part of Active Monitor's Swatch component:

http://devel.blueonyx.it/trac/browser/BlueOnyx/ui/base-mysql.mod/src/base-mysql-am/am_mysql.exp

Shell script that the Expect script uses to check MySQLd:

http://devel.blueonyx.it/trac/browser/BlueOnyx/ui/base-mysql.mod/src/base-mysql-am/check-mysql.sh

Lastly, there is a config file that tells CCEd to include or exclude
checking of MySQL's status depending on if MySQLd is enabled or disabled:

http://devel.blueonyx.it/trac/browser/BlueOnyx/ui/base-mysql.mod/glue/conf/mysql.conf

After all, we don't need to monitor a disabled service.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list