Archive for the ‘Experiments’ Category

A nagios plugin to check Tomcat Apps

Wednesday, February 5th, 2014

I wrote a simple nagios plugin to check the status of tomcat webapps.
Instead of looking pages like this one…
click to enlarge
I’d better to use some script like this.
To put the plugin in the nagios environment, add these lines

define command{
command_name check_tomcat_app
command_line /bin/bash /usr/lib/nagios/plugins/check_tomcat_app $ARG1$ $ARG2$ $ARG3$
}

to the commands.cfg file definitions.Then add some line like theese

define service{
use generic-service
host_name myhostname
service_description Examples Web Service
is_volatile 0
check_period 24×7
max_check_attempts 3
normal_check_interval 15
retry_check_interval 1
contact_groups admins
notification_interval 240
notification_period 24×7
notification_options c,r
check_command check_tomcat_app!”http://tomcatserver.my.lan:8080/manager/html/list”!Examples!admin:passw
}

into the services.cfg file.
Off corse username and password has to be set up in tomcat-users.xml file

$ cat /usr/local/apache-tomcat/conf/tomcat-users.xml
<?xml version=’1.0′ encoding=’utf-8′?>
<tomcat-users>
<role rolename=”manager”/>
<role rolename=”admin-gui”/>
<role rolename=”manager-gui”/>
<role rolename=”manager-status”/>
<user username=”admin” password=”passw” roles=”manager,manager-gui,manager-status,admin-gui”/>
</tomcat-users>

Fight the spam with ASSP

Friday, April 17th, 2009

I’ve just beginned the test of ASSP (Anti Spam SMTP Proxy) in a 1000 mailboxes organization.

I’ve set up a very small Ubuntu server on a virtual vmware host (512 Mbytes of RAM, 1 processor, 10 Gbytes of disk), and then I’ve followed the quick installation steps.
In a few minutes I was able to move all incoming mail traffic into my new SMTP proxy.
Monitoring the situation in the web interface at 55555 port of the Ubuntu box, it looks all ok.
Log files on the real mail server are showing all is running ok, too.

Info and Stats page of ASSP web Interface
Info and Stats page of ASSP web Interface

I’m very happy of this experiment: I found ASSP a good spam fighter, easy to install and configure and with a nice web interface for configuration and monitoring the SMTP traffic.