[hobbit] Feature Request for nkview

Henrik Stoerner henrik at hswn.dk
Thu Sep 7 00:01:56 CEST 2006


On Wed, Sep 06, 2006 at 05:23:40PM -0400, Epp, Matthew Contractor PEO EIS AKO wrote:

> - Not sure if this has already been addressed: How does nkview handle purple
> events from dead clients?

It doesn't but it is very simple to add. Just apply this patch.


Regards,
Henrik

-------------- next part --------------
--- hobbitd/webfiles/hobbitnk_footer	2006/04/16 21:45:19	1.5
+++ hobbitd/webfiles/hobbitnk_footer	2006/09/06 21:55:56
@@ -17,6 +17,7 @@
        </TD>
        <TD ALIGN=CENTER>
           <SELECT NAME="MINCOLOR">
+	    <OPTION VALUE="purple" &SELECT_MINCOLOR_PURPLE>Red+Yellow+Purple
 	    <OPTION VALUE="yellow" &SELECT_MINCOLOR_YELLOW>Red+Yellow
 	    <OPTION VALUE="red"    &SELECT_MINCOLOR_RED>Red only
 	  </SELECT>
--- web/hobbit-nkview.c	2006/05/25 14:55:41	1.18
+++ web/hobbit-nkview.c	2006/09/06 21:53:01
@@ -46,8 +46,10 @@
 	char *bol, *eol;
 	time_t now;
 	char msg[1024];
+	int i;
 
-	sprintf(msg, "hobbitdboard color=red,yellow acklevel=%d fields=hostname,testname,color,lastchange,logtime,validtime,acklist", nkacklevel);
+	sprintf(msg, "hobbitdboard acklevel=%d fields=hostname,testname,color,lastchange,logtime,validtime,acklist color=%s", nkacklevel,colorname(mincolor));
+	for (i=mincolor+1; (i < COL_COUNT); i++) sprintf(msg+strlen(msg), ",%s", colorname(i));
 
 	hobbitdresult = sendmessage(msg, NULL, NULL, &board, 1, BBTALK_TIMEOUT);
 	if (hobbitdresult != BB_OK) {


More information about the Xymon mailing list