hi all<br><br>I ammonitoring a jboss server and have to generate an alert. I have written a sample script as follows into a file named "alertscript.sh", which I have placed in ~server/ext/ directory.<br>####################alertscript.sh##################<br>
<font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;" lang="EN-US"></span></font>#!/bin/sh<br>#DESTINATION_FILE="/home/hobbit/server/ext/alerts.log"<br>DATE="`date | cut -f 2-3 -d ' '|replace ' ' '-'`"<br>
TIME="`date | cut -f 4 -d ' '`"<br>DATA="An alert was raised on $DATE at $TIME"<br>echo $DATA >> alert.log<br>exit 0<br>####<br><br>I have added the following code into hobbit-alerts.cfg:<br>
################################################<br>HOST=<a href="http://abc.xyz.com">abc.xyz.com</a> COLOR=yellow REPEAT=2m<br>        SCRIPT /home/hobbit/server/ext/alertscript.sh 0 DURATION>1 REPEAT=1<br>################################################<br>
<br>I think these are the only two things I have to do to make the alert work. If there are any more steps, or any modifications to be made in the above mensioned code, please tell me.<br>If you think this is the only thing I have to do, kindly deploy this code at your end and let me know if the code works fine. <br>
Please reply ASAP.<br><br>Thanks in advance.<br>Regards<br>Rakz<br>