Skip to main content

Status Monitor

· One min read
Alejandro Revilla
jPOS project founder

/by apr/ There's a new QBean in eecore called org.jpos.ee.status.Monitor. It has an easy to extend interface:

 public interface MonitorTask {
public String checkService ();
}

that can be used to monitor different kind of services. We just have a pseudo-Ping implementation so far, but we plan to add monitoring capabilities for other services, both external (http, ftp, smtp, etc.) as well as internals (channels, muxes, servers). The configuration is very simple too:

<monitor class='org.jpos.ee.status.Monitor' logger='Q2'>
<monitor id='webserver jPOS.org Web server' delay='15000' period='180000'>
<class>org.jpos.ee.status.Ping</class>
<property name='host' value='www.jpos.org' />
<property name='port' value='80' />
</monitor>

<monitor id="secureserver jPOS.org Secure Web server"
delay='20000' period='180000'>
<class>org.jpos.ee.status.Ping</class>
<property name='host' value='www.jpos.org' />
<property name='port' value='443' />
</monitor>
...
...
</monitor>

Here is a live demo (login with user 'guest', password 'guest'). Several modules have been updated, so you may want to call

  ant update
ant setup

In addition, the documentation has been updated, you may want to fetch a new copy. If you find this useful and you plan to use it, please consider contributing some MonitorTask implementations.