Menu

#69 --with-posix-statedefs breaks plugins

open
nobody
None
5
2001-03-26
2001-03-26
Anonymous
No

If you compile with --with-posix-statedefs, many
plugins no longer
work. Prominent candidates are check_ping and
check_disk

Both do at some point a result=max(result, new_result)
with
result == UNKNOWN and NEW_RESULT considered numerically
bigger than UNKNOWN. This is fine without
--posix-statedefs
as UNKNOWN == -2. But now, UNKNOWN == 3 and the max()
of 3 and O (== OK) is 3. So the plugin returns UNKNOWN
and
not OK.

With --posix-statedefs:

% /usr/netsaint/plugins/check_disk 80 95 /dev/sda1
Unable to read output

/bin/df -Pk /dev/sda1
/dev/sda1 1035660 45784
937268 5% /

% echo $?
3

Without:

% /usr/netsaint/plugins/check_disk 80 95 /dev/sda1
DISK OK - [937268 kB (95%) free on /dev/sda1]
% echo $?
0

There are lots of places to fix all over the code.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB