SNMP Time was not numeric

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

SNMP Time was not numeric

Post by dvl »

I recently upgraded cacti to 0.8.7b

Since then, I've been seeing messages such as: "Device does not require SNMP", "SNMP Time was not numeric", and "Host did not respond to SNMP".

The following is an extract from the log. Advice please. I'm not sure what they relate, and they seem contradictory.

Thanks.

02/16/2008 10:55:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '3', status_event_count = '0', status_fail_date = '2008-02-16 21:45:03', status_rec_date = '2008-02-16 22:45:03', status_last_error = 'Host did not respond to SNMP', min_time = '0.00000', max_time = '10.67000', cur_time = '0', avg_time = '0.0004199967864357', total_polls = '131634', failed_polls = '938', availability = '99.287418144248' where hostname = '127.0.0.1'"
02/16/2008 10:55:02 PM - CMDPHP: Poller[0] Host[1] NOTICE: HOST EVENT: Host Returned from DOWN State:
02/16/2008 10:55:02 PM - CMDPHP: Poller[0] Host[1] SNMP: Device does not require SNMP
02/16/2008 11:00:04 PM - POLLER: Poller[0] WARNING: Poller[0] Host[1] SNMP Time was not numeric
02/16/2008 10:55:02 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_step - 300 WHERE (rrd_next_step < 0 AND host_id >= 0 AND host_id <= 3)"
--
Dan Langille - http://www.langille.org/
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post availability options and snmp options used for that very host
Reinhard
dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

solved

Post by dvl »

--
Dan Langille - http://www.langille.org/
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Sorry, that was not the requested information. Please visit the host itself within cacti and post the parameters seen on the host edit screen
Reinhard
dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

sure....

Post by dvl »

The settings used when the problem appeared have been changed.

Current settings are:

description: localhost
hostname: 127.0.0.1
host template: linux local machine
notes: [empty]
disabled host: [not checked]
Downed Device Detection: snmp
ping timeout value: 400
ping retry count: 1
snmp version: Version 1
snmp community: public
snmp port: 161
SNMP timeout: 500
Maximum OID's Per Get Request: 10
--
Dan Langille - http://www.langille.org/
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Thanks. Now, please post the output at the upper left corner, just under the device's name. And an snmpwalk against this host using the mentioned parms would be fine
Reinhard
dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

Post by dvl »

Localhost (127.0.0.1)
SNMP Information
System: FreeBSD supernews.example.org 6.2-STABLE FreeBSD 6.2-STABLE #6: Fri Feb 9 15:54:22 PST 2007 dan@supernews.example.org:/usr/obj/usr/src/sys/OPTI amd64
Uptime: 32306022 (3 days, 17 hours, 44 minutes)
Hostname: supernews.example.org
Location: SUPERNEWS
Contact: dan@example.org

NOTE: in the above, several domain names have been changed to 'example'.
--
Dan Langille - http://www.langille.org/
dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

Post by dvl »

gandalf wrote:And an snmpwalk against this host using the mentioned parms would be fine
Reinhard
Is this what you need?

$ snmpwalk -v1 -c public localhost | head
SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD supernews.example.org 6.2-STABLE FreeBSD 6.2-STABLE #6: Fri Feb 9 15:54:22 PST 2007 dan@supernews.exampleorg:/usr/obj/usr/src/sys/OPTI amd64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.8
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (32326500) 3 days, 17:47:45.00
SNMPv2-MIB::sysContact.0 = STRING: dan@example.org
SNMPv2-MIB::sysName.0 = STRING: supernews.example.org
SNMPv2-MIB::sysLocation.0 = STRING: SUPERNEWS
SNMPv2-MIB::sysServices.0 = INTEGER: 76
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB

Again, domain names have been changed to 'example'.
--
Dan Langille - http://www.langille.org/
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

can you try to increase 'SNMP timeout' for that host in Cacti ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
dvl
Posts: 16
Joined: Wed Nov 15, 2006 8:07 pm
Location: Warrington, PA
Contact:

Post by dvl »

fmangeant wrote:Hi

can you try to increase 'SNMP timeout' for that host in Cacti ?
Sure can.

What else should I do?

Please note, as detailed in the URL at "Sun Feb 17, 2008 2:19 pm Post subject: solved", the problem no longer presents itself. The situation went away after making a few adjustments.

This questions sounds sarcastic, but in a effort to track down the original cause of the problem: which adjustments do you think I should undo to attempt to reproduce the issue?
--
Dan Langille - http://www.langille.org/
hosierd
Posts: 19
Joined: Wed Jun 09, 2004 10:55 am
Location: Rockville, Maryland

SNMP Time was not numeric

Post by hosierd »

gandalf wrote:Thanks. Now, please post the output at the upper left corner, just under the device's name. And an snmpwalk against this host using the mentioned parms would be fine
Reinhard
Gandalf:

Not sure if this is an issue you guys are still investigating but I'll add my own recent experience to the discussion.

I've been bringing up a new cacti server to replace the current production box.

The new server is a vm with 2 cpus and 1 gb of ram running:

SLES 9
RRDTool 1.2.27
Apache 2.2.8
NET-SNMP 5.4.1
PHP 5.2.5
MySQL 4.1.22
Cacti 0.8.7b

With everything built and the necessary workarounds in place to support the cacti url as an alias rather than subdirectory under htdocs, things have worked quite well. Only two outstanding issues:

1>. I'm unable to purge the cacti.log from within the system tools I always get the following error:

Error: Unable to clear log, no write permissions.

This is strange given that when I SU to the cactiuser on the server I can create, delete, edit, etc any file in the /log /rra directories. Not a big deal, just a curiosity.

2>. SNMP Time was not numeric messages at the start of each polling cycle. I was seeing the following error for each host target at the start of the polling cycle for the hosts that were currently configured for graphing:

03/29/2008 11:31:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[41] SNMP Time was not numeric
03/29/2008 11:31:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[42] SNMP Time was not numeric
03/29/2008 11:31:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[46] SNMP Time was not numeric
03/29/2008 11:31:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[44] SNMP Time was not numeric
03/29/2008 11:31:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[48] SNMP Time was not numeric
03/29/2008 11:31:02 PM - POLLER: Poller[0] WARNING: Poller[0] Host[52] SNMP Time was not numeric
03/29/2008 11:31:04 PM - POLLER: Poller[0] WARNING: Poller[0] Host[50] SNMP Time was not numeric
03/29/2008 11:31:07 PM - POLLER: Poller[0] WARNING: Poller[0] Host[43] SNMP Time was not numeric
03/29/2008 11:31:09 PM - POLLER: Poller[0] WARNING: Poller[0] Host[51] SNMP Time was not numeric
03/29/2008 11:31:12 PM - POLLER: Poller[0] WARNING: Poller[0] Host[47] SNMP Time was not numeric
03/29/2008 11:31:16 PM - POLLER: Poller[0] WARNING: Poller[0] Host[49] SNMP Time was not numeric
03/29/2008 11:31:18 PM - POLLER: Poller[0] WARNING: Poller[0] Host[45] SNMP Time was not numeric
03/29/2008 11:31:28 PM - SYSTEM STATS: Time:27.4646 Method:cmd.php Processes:8 Threads:N/A Hosts:13 HostsPerProcess:2 DataSources:1168 RRDsProcessed:584

The hosts/graphs in question are configured for 1 minute polling using 64-bit counters and snmpv 3 with an snmp timeout of 500 miliseconds.

Interestingly enough the error message appeared to be somewhat cosmetic. Despite the error message, the rrds and graphs were being updated every 60 seconds.

As I continued to populate the system with new devices and graphs for the switch ports for the devices, the messages continued but my graphs continued to work as expected with no gaps etc. Turning on debug never yielded any indication of an error etc.

The number of graph targets in this new system is significantly higher than in the old system and looked like it would take cmd.php more than 60 seconds to process all of the graphs. I went ahead and installed Spine 0.8.7a. Its working great.

Check out the difference in the polling times:

03/29/2008 11:39:25 PM - SYSTEM STATS: Time:24.5518 Method:cmd.php Processes:8 Threads:N/A Hosts:13 HostsPerProcess:2 DataSources:1168 RRDsProcessed:584

03/29/2008 11:40:03 PM - SYSTEM STATS: Time:2.2443 Method:spine Processes:8 Threads:6 Hosts:13 HostsPerProcess:2 DataSources:1168 RRDsProcessed:584

The most interesting and unexpected change was that the SNMP Time was not numeric messages have vanished. I'm not sure if this is to be expected but I thought I would share it with you if it helps identify the cause of the SNMP Time error for others.

Doug
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: SNMP Time was not numeric

Post by gandalf »

hosierd wrote:1>. I'm unable to purge the cacti.log from within the system tools I always get the following error:

Error: Unable to clear log, no write permissions.

This is strange given that when I SU to the cactiuser on the server I can create, delete, edit, etc any file in the /log /rra directories. Not a big deal, just a curiosity.
Write permission must be granted to the httpd's user as well to delete logs using the web screens
Reinhard
goliath84
Posts: 10
Joined: Fri Apr 25, 2008 2:51 am
Location: France

Post by goliath84 »

Hello,

I'm doing a training period in IT domain and my work is to supervise a network.I make the choice with Nagios + Cacti.
So I install cacti 0.8.7b and I have got the same problem :

04/30/2008 03:00:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[9] SNMP Time was not numeric.

Then I think I found a bug in the PHP code in the "ping.php" file (/var/www/cacti/lib/ping.php).I'm not a pro in PHP but I let developers confirm this bug.
Then, in the ping.php file, we have :

/* snmp test */
if (($avail_method == AVAIL_SNMP) || (($avail_method == AVAIL_SNMP_AND_PING) && ($ping_result == true))) {
if ($this->host["snmp_community"] != "") {
$snmp_result = $this->ping_snmp();
}else{
$snmp_result = true;
}

must be change in ...

/* snmp test */
if (($avail_method == AVAIL_SNMP) || (($avail_method == AVAIL_SNMP_AND_PING) && ($ping_result == true))) {
$snmp_result = $this->ping_snmp();
}

because if we put community to "" , the variable $ping->snmp_status stay to "down" and the variable is not update.
Then, that makes an error in cacti log (poller warning ...).
I test it and the error disappears!

Can developer confirm that bug ?
(Sorry if it's not a bug :wink: )
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

WHich SNMP version are you using and is your snmp community string empty?
Reinhard
goliath84
Posts: 10
Joined: Fri Apr 25, 2008 2:51 am
Location: France

Post by goliath84 »

I am using the version 3 of SNMP and I have got no snmp community.
You don't have to put a snmp community in the version 3, if I learn my lessons correctly.
Because you need to use the username only.
Furthermore, you can't put it because there is no "snmp community" field when you choose "Version3" in the SNMP Option.
Then that generate an error in the cacti log file which say "SNMP Time was not numeric" because ping->snmp_status is always on "down" (As I know,"down" is not numeric :wink: ).
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests