is there a maximum length for performance data?

Frank J. Gómez frank at crop-circle.net
Mon May 12 21:42:04 CEST 2008


Hello,

I'm using Nagios 2.10 and the ndo2db add-on in a Gentoo environment, and I'm
running into problems with the check_disk command, which I'm executing via
NRPE.  I suspect I may actually be hitting a limitation of the ndo2db
add-on, though...

In the Nagios config file for server1, I have:
define service{
        host_name               server2,server1,server3
        service_description     disk usage
        check_command           check_nrpe!check_disk
        use                     serviceTemplate
}

In the NRPE config file on server2, I have:
command[check_disk]=/usr/nagios/libexec/check_disk -w 40% -c 20%

In the database, the nagios_servicechecks table shows truncated perfdata for
checks on server2.

The "output" field is intact:
DISK CRITICAL - free space: / 3806 MB (16% inode=93%): /dev 1005 MB (100%
inode=98%): /home 85167 MB (77% inode=99%): /usr/portage 85167 MB (77%
inode=99%): /dev/shm 1005 MB (100% inode=100%):

However, the "perfdata" field is truncated:
/=19666MB;14082;18776;93;23471 /dev=0MB;602;803;97;1004
/home=25220MB;66232;88309;98;110387
/usr/portage=25220MB;66232;88309;98;110387 /

The database is set up to allow 255 characters for the "perfdata" field --
the above, truncated value is only 136 characters long.

When I run the following command from server1's CLI, I get what I expect,
without truncation:

CLI:
/usr/nagios/libexec/check_nrpe -H dev -c check_disk

Result:
DISK CRITICAL - free space: / 3804 MB (16% inode=93%); /dev 1005 MB (100%
inode=98%); /home 85167 MB (77% inode=99%); /usr/portage 85167 MB (77%
inode=99%); /dev/shm 1005 MB (100% inode=100%);|
/=19667MB;14082;18776;93;23471 /dev=0MB;602;803;97;1004
/home=25220MB;66232;88309;98;110387
/usr/portage=25220MB;66232;88309;98;110387 /dev/shm=0MB;602;803;99;1004

The CLI result is 357 characters long.  If you truncate it where the
truncation occurs in the database, you end up with a string exactly 330
characters long.  I wonder if that is some sort of magic number for the
ndo2db add-on.  I suspect that there isn't any such limitation in the
check_disk or check_nrpe commands themselves, since the full output is
displayed when called from the command line.

I hope I didn't supply so much detail that nobody bothers to read this!  Has
anyone experienced something similar?
-Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20080512/f5ef05cd/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list