cactid and snmp timeout

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

Moderators: Developers, Moderators

Post Reply
Jeppe
Posts: 47
Joined: Sun Feb 09, 2003 4:48 am
Contact:

cactid and snmp timeout

Post by Jeppe »

Hi,

I have a problem with cactid and far-away machines on slow lines. The poller seems to be a bit too quick to think a timeout has occurred and then ignores the machine totally. From the shell, snmpget and snmpwalk work fine though, albeit a bit slow.

*** SNMP Error: (x.x.x.x@.1.3.6.1.4.1.2021.11.51.0) Unsuccessuful (2).
SNMP timeout detected, ignoring host 'x.x.x.x'

Is there a way to set the timeout value? Couldn't find one with a simple grep.

Thanks,

J
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I do not set the timeout anywhere in my code, even though there might be a way through the SNMP API. Anyone know how this is done? I might also add a "Never skip this host" checkbox if I can't find another way around the issue.

I will try and find out how to set the SNMP timeout value though.

-Ian
Jeppe
Posts: 47
Joined: Sun Feb 09, 2003 4:48 am
Contact:

Post by Jeppe »

From a quick google, the session struct should have 'timeout' and 'retry' fields that you can fill out if you want. Normally they are -1 which is whatever default net-snmp seems fit, I guess.

Code: Select all

struct snmp_session {
    /*
     * Protocol-version independent fields
     */
    long            version;
    int             retries;        /* Number of retries before timeout. */
    long            timeout;        /* Number of uS until first timeout, then exponential backoff */
J
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Thanks for looking this up, I will be sure to add a configuration option for this.

-Ian
Jeppe
Posts: 47
Joined: Sun Feb 09, 2003 4:48 am
Contact:

Post by Jeppe »

If anyone happens to be having trouble with this *now*, it was easy to fix.
I just added session.timeout = 2000000; to snmp.c next to where the other session definitions were. Works fine now, and the 2 sec timeout is enough for even the slowest machines.

J
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

I am working on adding an "SNMP timeout" field to Cacti at the moment. I might be missing something, but when I set the timeout to '2000000', it actually takes 12 seconds to timeout a single query. Is there something that I am missing here?

Edit: I think I figured it out. Actual timeout = (retries * timeout).

-Ian
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest