[hobbit] acknowledgment for a yellow alert doesn't seem to work

Henrik Stoerner henrik at hswn.dk
Thu Apr 7 18:05:26 CEST 2005


On Thu, Apr 07, 2005 at 10:09:09AM -0400, Tom Georgoulias wrote:
> 
> Do the cookies have a lifespan or a one-time use policy?

Yes, they are only valid for 30 minutes after they've been generated.


Could you try the attached patch ? If causes hobbitd to log if it
receives an ack-message that is discarded because the cookie was not
valid.

Also, if you want to check what the current cookie value is, you can
run

   bb 127.0.0.1 "hobbitdboard host=HOSTNAME test=TESTNAME fields=hostname,testname,cookie"

It will respond with

      HOSTNAME|TESTNAME|1029348

The cookie is the third ('|'-separated) field.


Regards,
Henrik
-------------- next part --------------
--- hobbitd/hobbitd.c	2005/04/03 15:44:07	1.136
+++ hobbitd/hobbitd.c	2005/04/07 15:58:19
@@ -2014,6 +2014,12 @@
 					}
 				}
 			}
+			else {
+				errprintf("Cookie %d not found, dropping ack\n", cookie);
+			}
+		}
+		else {
+			errprintf("Bogus ack message from %s: '%s'\n", sender, msg->buf);
 		}
 
 		MEMUNDEFINE(durstr);


More information about the Xymon mailing list