Nagios Truncated return string

jeff vier jeff.vier at tradingtechnologies.com
Fri Jul 9 16:29:49 CEST 2004


On Thu, 2004-07-08 at 20:22 -0700, Al Smith wrote:
>         Using Nagios 1.2 with MySQL for data storage. I've written my
>         own check_snmp to get a value from a power strip that returns
>         Amps * 10, so a 0.8 amp reading is sent back by snmpget as 8.
>         In order to watch the actual amps, and history, I set Value =
>         Value / 10, and return the string
>         
>         OK: 0.8
>         
>         The problem is with the value stored in the MySQL database,
>         and displayed on the web page, is 0. So, when amp usage on the
>         unit is low, I get an alarm telling me it is zero!
>         
>         Has anyone else seen the trucated value like this? 

Sounds like you've set your column to INT (or SMALLINT, BIGINT, etc).

read http://dev.mysql.com/doc/mysql/en/Numeric_types.html carefully.



-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
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