<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>I use check_log on a remote host and get the 
result on Nagios with the help of check_nrpe.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>Now, the point is that i'm using stalking option so to 
log even if the state didn't change but the content of the message 
did.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>Currently, after a 1st critical state --> i'm 
notified</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005><SPAN class=395224513-03112005>the objective : being 
notified even if the state didn't change but the content of the message 
did</SPAN></SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>any idea ?</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=395224513-03112005>regards</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=fr dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De :</B> Sébastien Barbereau 
[mailto:barbereau@gmail.com] <BR><B>Envoyé :</B> jeudi 3 novembre 2005 
11:27<BR><B>À :</B> 
nagios-users@lists.sourceforge.net<BR><B>Objet :</B> [Nagios-users] Simple 
AJAX in Nagios<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi,</DIV>
<DIV>
<P>This are some tries to add some AJAX technology to Nagios.</P>
<P>Sample1 & Sample2:<BR>This 2 samples are very similar. They provide a way 
to refresh the status pages only when some HARD status change occurs.<BR></P>
<P>To achieve this I modified the status.cgi so that it loads a simple 
javascript (nagiosajax.js) at startup and set a hidden var in the page. 
The  javascript <BR>polls every 5 seconds a PHP script wich returns the 
last HARD change time. this value is compared to the one stored into the page 
and reloads the frame if <BR>they are different.</P>
<P>=> Sample1 is built on top of a nagios1.3 with mysql support. Therefor we 
use some SQL query to get the laststatechange.<BR>=> Sample2 is built on top 
of a nagios2.0b4. We use a global event handler to "log" the last HARD state 
change. </P>
<P>Files can be found here:</P>
<P><A 
href="http://www.barbich.net/websvn/wsvn/nagios/nagios/divers/ajaxify_nagios_cgi/sample1/">http://www.barbich.net/websvn/wsvn/nagios/nagios/divers/ajaxify_nagios_cgi/sample1/</A><BR><A 
href="http://www.barbich.net/websvn/wsvn/nagios/nagios/divers/ajaxify_nagios_cgi/sample2/">http://www.barbich.net/websvn/wsvn/nagios/nagios/divers/ajaxify_nagios_cgi/sample2/</A></P>
<P> </P>
<P>Please this are only simple tests, they need imporvment and may not work in 
your case. Also, before trying this out please make backups.</P>
<P>Seb.B</P></DIV></BODY></HTML>