The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Cacti[11002]: POLLER: WARNING: Poller[0] Host[1] SNMP Time was not numeric
Author: Dan 
Date:   16-02-08 23:56

Shortly after upgrading Cacti, I started seeing this problem:

Cacti[11002]: POLLER: WARNING: Poller[0] Host[1] SNMP Time was not numeric

I could not figure it out.

The debug log contained items such as this:

02/16/2008 09:25:01 PM - CMDPHP: Poller[0] DEBUG: SQL Assoc: "select poller_reindex.data_query_id, poller_reindex.action, poller_reindex.op, poller_reindex.assert_value, poller_reindex.arg1 from poller_reindex where poller_reindex.host_id=1"

02/16/2008 09:25:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "update host set status = '3', status_event_count = '0', status_fail_date = '2008-02-13 15:15:02', status_rec_date = '2008-02-16 20:25:01', status_last_error = 'Host did not respond to SNMP', min_time = '0.00000', max_time = '3.43000', cur_time = '0', avg_time = '0.00023999816359324', total_polls = '131616', failed_polls = '926', availability = '99.296438123025' where hostname = '127.0.0.1'"

02/16/2008 09:25:01 PM - CMDPHP: Poller[0] Host[1] SNMP: Device does not require SNMP
02/16/2008 09:25:01 PM - POLLER: Poller[0] WARNING: Poller[0] Host[1] SNMP Time was not numeric
02/16/2008 09:25:01 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)"

02/16/2008 09:25:01 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "UPDATE poller_item SET rrd_next_step = rrd_next_step - 300 WHERE (host_id >= 0 AND host_id <= 3)"


My clue was Host[1]...

I clicked on Devices in the left hand column. I found the host with id = 1, and clicked ont it. That's when I saw:

Localhost (127.0.0.1)
SNMP Information
SNMP not in use

Hmm, OK. Let's try fixing that. Well, I thought snmpd was running. It wasn't. port-mgmt/snmpd was installed, but not running. and used this in /usr/local/etc/snmpd.conf:

###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.

# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string

syslocation NYI

# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string

syscontact dan@langille.org

# sysservices: The proper value for the sysServices object.
# arguments: sysservices_number

sysservices 76



###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.

# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]

rocommunity public localhost












###########################################################################
# SECTION: Agent Operating Mode
#
# This section defines how the agent will operate when it
# is running.

# agentaddress: The IP address and port number that the agent will listen on.
# By default the agent listens to any and all traffic from any
# interface on the default SNMP port (161). This allows you to
# specify which address, interface, transport type and port(s) that you
# want the agent to listen on. Multiple definitions of this token
# are concatenated together (using ':'s).
# arguments: [transport:]port[@interface/address],...

agentaddress 127.0.0.1







Then I started snmpd and enabled it in /etc/rc.conf:

snmpd_enable="YES"
snmpd_conffile="/usr/local/etc/snmpd.conf"

Ensure all is well by observing /var/log/snmpd.log

Test that all is well through:

$ snmpwalk -v1 -c public 127.0.0.1 | head
SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD supernews.unixathome.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
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.8
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (4727) 0:00:47.27
SNMPv2-MIB::sysContact.0 = STRING: dan@example.org
SNMPv2-MIB::sysName.0 = STRING: supernews.unixathome.org
SNMPv2-MIB::sysLocation.0 = STRING: NYI
SNMPv2-MIB::sysServices.0 = INTEGER: 76
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB

I didn't need an entry in /etc/hosts.allow, but perhaps you will:

snmpd : localhost : allow

Then back on the cacti page, I set SNMP Community to public.

Going back into the same cacti page then showed:

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: 21936 (0 days, 0 hours, 3 minutes)
Hostname: supernews.example.org
Location: NYI
Contact: dan@example.org

Then the log messages stopped.

--
Webmaster

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Cacti[11002]: POLLER: WARNING: Poller[0] Host[1] SNMP Time was not numeric   new
Dan 16-02-08 23:56 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org