[Nagios-db-devel] postgresql/inserter.c: offset bugs in option parsing
Status: Beta
Brought to you by:
bench23
|
From: Peter B. <pb...@bi...> - 2005-08-04 11:17:43
|
Hi,
during working on bringing this NEB to work I found two bugs in the offset
calculation:
@@ -149,7 +149,7 @@
free(db);
return 0;
}
- if(!(val = pullValue(tok+8)))
+ if(!(val = pullValue(tok+9)))
{
/* well, this isn't going to fly. */
write_to_all_logs("nagios-db postgres inserter failed to
find valid wrapper vacation value in arguement string",NSLOG_INFO_MESSAGE);
@@ -169,7 +169,7 @@
free(db);
return 0;
}
- if(!(val = pullValue(tok+8)))
+ if(!(val = pullValue(tok+7)))
{
/* well, this isn't going to fly. */
write_to_all_logs("nagios-db postgres inserter failed to
find valid wrapper write limit in arguement string",NSLOG_INFO_MESSAGE);
This will solve:
[1123119267] nagios-db postgres inserter failed to find valid wrapper write
limit in arguement string
[1123119267] Event broker module '/usr/local/nagios/neb/inserter.o'
initialized successfully.
On:
host=localhost db=nagios timeout=10 vacation=0 writes=0 user=nagios
password=secret
BTW: is there no description what the values vacation and writes are mean?
BTW2: order of options are fixed, too, this can be sure improved in the
future.
Peter
--
Dr. Peter Bieringer http://www.bieringer.de/pb/
GPG/PGP Key 0x958F422D mailto: pb at bieringer dot de
Deep Space 6 Co-Founder and Core Member http://www.deepspace6.net/
|