[Xymon] Plan for XYMON and SNMP

Bruce Ferrell bferrell at baywinds.org
Sat Jun 22 06:38:34 CEST 2019


As a follow on...

using tcpdump and snmpget against the data in the dump shows the counters ARE being retrieved, just not registering.

snmpget -v 2c -c community666name 127.0.0.1 .1.3.6.1.2.1.31.1.1.1.3.4 -Oa

IF-MIB::ifInBroadcastPkts.4 = Counter32: 0

tcpdump was run while hand running xymoln-snmpcollect



On 6/21/19 9:24 PM, Bruce Ferrell wrote:
> OK, I have bug on this now... I have had off an on for a while now
>
> I have one host in my network NOT being monitored by devmon and I'm trying to use the built in snmp of xymon
>
> snmphosts.cfg:
>
> [hostname.org]
>   version=2
>   community=community666name
>   ip=127.0.0.1
>   systemmib
>   ifmib=(*)
>
> snmpmibs.cfg is the file from 4.2.28
>
> [ifmib]
>         keyidx (IF-MIB::ifDescr)
>         keyidx [IF-MIB::ifPhysAddress]
>         keyidx <IF-MIB::ifName>
>         validx {IP-MIB::ipAdEntIfIndex}
>         ifDescr = IF-MIB::ifDescr
>         ifType = IF-MIB::ifType
>         ifMtu = IF-MIB::ifMtu
>         ifSpeed = IF-MIB::ifSpeed
>         ifPhysAddress = IF-MIB::ifPhysAddress
>         ifAdminStatus = IF-MIB::ifAdminStatus
>         ifOperStatus = IF-MIB::ifOperStatus
>         ifLastChange = IF-MIB::ifLastChange
>         ifInOctets = IF-MIB::ifInOctets                                 /rrd:COUNTER
>         ifInUcastPkts = IF-MIB::ifInUcastPkts                           /rrd:COUNTER
>         ifInNUcastPkts = IF-MIB::ifInNUcastPkts                         /rrd:COUNTER
>         ifInDiscards = IF-MIB::ifInDiscards                             /rrd:COUNTER
>         ifInErrors = IF-MIB::ifInErrors                                 /rrd:COUNTER
>         ifInUnknownProtos = IF-MIB::ifInUnknownProtos                   /rrd:COUNTER
>         ifOutOctets = IF-MIB::ifOutOctets                               /rrd:COUNTER
>         ifOutUcastPkts = IF-MIB::ifOutUcastPkts                         /rrd:COUNTER
>         ifOutNUcastPkts = IF-MIB::ifOutNUcastPkts                       /rrd:COUNTER
>         ifOutDiscards = IF-MIB::ifOutDiscards                           /rrd:COUNTER
>         ifOutErrors = IF-MIB::ifOutErrors                               /rrd:COUNTER
>         ifOutQLen = IF-MIB::ifOutQLen                                   /rrd:GAUGE
>
> Run by hand as follows:
>
>  ./server/bin/xymon-snmpcollect --debug
>
> 26951 2019-06-21 21:12:36.952110 Opening file /home/xymon/server/etc/snmphosts.cfg
> 26951 2019-06-21 21:12:36.953150 Got key-oid '.1.3.6.1.2.1.2.2.1.2.1' = '"lo"'
> 26951 2019-06-21 21:12:36.953381 Got key-oid '.1.3.6.1.2.1.2.2.1.2.2' = '"em1"'
> 26951 2019-06-21 21:12:36.953629 Got key-oid '.1.3.6.1.2.1.2.2.1.2.3' = '"em2"'
> 26951 2019-06-21 21:12:36.953844 Got key-oid '.1.3.6.1.2.1.2.2.1.2.4' = '"em3"'
> 26951 2019-06-21 21:12:36.954081 Got key-oid '.1.3.6.1.2.1.2.2.1.2.5' = '"em4"'
> 26951 2019-06-21 21:12:36.954303 Got key-oid '.1.3.6.1.2.1.2.2.1.2.6' = '"br0"'
> 26951 2019-06-21 21:12:36.954519 Got key-oid '.1.3.6.1.2.1.2.2.1.2.7' = '"docker0"'
> 26951 2019-06-21 21:12:36.954737 Finished host hostname.org
> 26951 2019-06-21 21:12:36.966129 No more oids left
> 26951 2019-06-21 21:12:36.966137 Finished host hostname.org
> 26951 2019-06-21 21:12:36.966258 Transport setup is:
> 26951 2019-06-21 21:12:36.966269 xymondportnumber = 1984
> 26951 2019-06-21 21:12:36.966274 xymonproxyhost = NONE
> 26951 2019-06-21 21:12:36.966278 xymonproxyport = 0
> 26951 2019-06-21 21:12:36.966282 Recipient listed as 'XYMON_HOST'
> 26951 2019-06-21 21:12:36.966287 Standard protocol on port 1984
> 26951 2019-06-21 21:12:36.966292 Will connect to address XYMON_HOST port 1984
> 26951 2019-06-21 21:12:36.966463 Connect status is 0
> 26951 2019-06-21 21:12:36.966551 Sent 7650 bytes
> 26951 2019-06-21 21:12:36.966588 Closing connection
>
> I get the interface names, but no counters and as a result no RRD entries,and of course, no charting.
>
> What I want it to do is collect the stats for all of the interfaces and then chart them.  I'm suspecting the ifmib definition isn't right if not that, the maybe I need to do 
> something different with snmphosts.cfg
>
> Thoughts?
>
>
>
> On 5/17/19 2:04 PM, Jeremy Laidman wrote:
>> For me, yes.
>>
>>
>> On Fri, 17 May 2019, 17:59 Japheth Cleaver, <cleaver at terabithia.org <mailto:cleaver at terabithia.org>> wrote:
>>
>>      Other than documentation (obviously), would that be the primary feature
>>      set that helps makes this a reasonable thing to integrate in officially?
>>
>>      -jc
>>
>>      On 5/16/2019 11:08 PM, Bruce Ferrell wrote:
>>      > I just figured out there has to be a task... At first I wondered how
>>      > xymonnet launched xymon-snmpcollector, then I started running it by
>>      > hand and running tcpdump to see what was being polled
>>      >
>>      > What it looks like what we don't get is mib variable manipulation ala
>>      > devmon... calculated load percentages etc.
>>      >
>>      > Still I think a move in the right direction and it directly supports
>>      > snmp v3
>>      >
>>      >
>>      >
>>      >
>>      > On 5/16/19 10:45 PM, Jeremy Laidman wrote:
>>      >> Not sure what that will give you. The OIDs are extracted from the
>>      >> file snmpmibs.conf, and I expect you'll have to populate that with
>>      >> anything you want to monitor.
>>      >>
>>      >> One thing I forgot to mention is that you need to create a task to
>>      >> run the xymon-snmpcollect program every 5 minutes. I created a
>>      >> tasks.d/xymon-snmpcollect.cfg file containing the following:
>>      >>
>>      >> [snmpcollect]
>>      >>         ENVFILE $XYMONHOME/etc/xymonserver.cfg
>>      >>         CMD $XYMONHOME/ext/xymon-snmpcollect --debug
>>      >>         LOGFILE $XYMONSERVERLOGS/xymon-snmpcollect.log
>>      >>         INTERVAL 5m
>>      >>
>>      >> Obviously the --debug flag can be removed.
>>      >>
>>      >> On Fri, 17 May 2019 at 15:26, Bruce Ferrell <bferrell at baywinds.org <mailto:bferrell at baywinds.org>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>> wrote:
>>      >>
>>      >>     Just thinking aloud... Since the build uses net-snmp, it should
>>      >> use the same mibs net-snmp uses... So xymon will know about my
>>      >> SmartUPS and poweredge.
>>      >>
>>      >>     I'm gonna have to study the code some more
>>      >>
>>      >>
>>      >>
>>      >>       On 5/16/19 10:08 PM, Jeremy Laidman wrote:
>>      >>     > Right you are. DOSNMP is set to "yes" as a result of SNMP being
>>      >> set to 1 (and the Net-SNMP tools being found).
>>      >>     >
>>      >>     >
>>      >>     > On Fri, 17 May 2019 at 14:42, Bruce Ferrell
>>      >> <bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>> wrote:
>>      >>     >
>>      >>     >     On 5/16/19 9:10 PM, Jeremy Laidman wrote:
>>      >>     >     > On Fri, 17 May 2019 at 13:36, Bruce Ferrell
>>      >> <bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>
>>      >>     <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>>> wrote:
>>      >>     >     >
>>      >>     >     >     Yes, I did Jeremy.  My apologies.
>>      >>     >     >
>>      >>     >     >
>>      >>     >     > No problem.
>>      >>     >     >
>>      >>     >     >     I did figure out I have to export SNMP=1 then
>>      >> configure and rebuild
>>      >>     >     >
>>      >>     >     >
>>      >>     >     > Ah, I didn't know that. Or I forgot that.
>>      >>     >     >
>>      >>     >     > Just looking at the code now - are you sure this isn't
>>      >> "DOSNMP=1"?
>>      >>     >
>>      >>     >
>>      >>     >     The Makefile tests for if  $SNMP=1... At least in 4.3.28
>>      >>     >
>>      >>     >
>>      >>     >     >     What is the tag in the hosts file (if any)?
>>      >>     >     >
>>      >>     >     >
>>      >>     >     > Nothing. The hostnames are found by xymon-snmpcollect in
>>      >> the snmphosts.cfg. You still need the hosts to be in hosts.cfg, but
>>      >> not tags are required.
>>      >>     >
>>      >>     >     > Jeremy
>>      >>     >
>>      >>     >     Thanks again!
>>      >>     >
>>      >>     >
>>      >>     >     >     On 5/16/19 6:41 PM, Jeremy Laidman wrote:
>>      >>     >     >     > If you meant to say, "Hey Jeremy" then the answer
>>      >> is, that it's all stuff for Xymon.
>>      >>     >     >     >
>>      >>     >     >     > On Fri, 17 May 2019 at 11:15, Bruce Ferrell
>>      >> <bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>
>>      >>     <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>>
>>      >>     >     <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>
>>      >>     <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>
>>      >> <mailto:bferrell at baywinds.org <mailto:bferrell at baywinds.org>>>>>> wrote:
>>      >>     >     >     >
>>      >>     >     >     >     Hey Josh, I saw that before.  Is that stuff
>>      >> that devmon looks at or stuff for xymon.
>>      >>     >     >     >
>>      >>     >     >     >     I'm not at all clear
>>      >>     >     >     >
>>      >>     >     >     >     Thanks in advance
>>      >>     >     >     >
>>      >>     >     >     >     On 5/16/19 6:00 PM, Jeremy Laidman wrote:
>>      >>     >     >     >>     Xymon already has code for SNMP that works,
>>      >> but isn't documented. I have it working for me, but it required a
>>      >> fair bit or digging to find the right
>>      >>     >     configuration. I've
>>      >>     >     >     >>     posted on this previously; might help:
>>      >> https://lists.xymon.com/archive/2019-March/046191.html
>>      >>     >     >     >>
>>      >>     >     >     >>     J
>>      >>     >     >     >>
>>      >>     >     >     >>     On Thu, 16 May 2019 at 19:26, Bruno Manzoni
>>      >> <bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >>     <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >>     >  <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >>     <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>
>>      >>     >     >  <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>>>> wrote:
>>      >>     >     >     >>
>>      >>     >     >     >>         Thanks you Josh,
>>      >>     >     >     >>
>>      >>     >     >     >>         Yes I know about devmon (I put my own
>>      >> devmon version which is a try to be a consolidate version)
>>      >>     >     >     >>
>>      >>     >     >     >>         In fact, I just would like to know if
>>      >> there was another SNMP development (but it seems not as you say it
>>      >> will be merged) inside Xymon . (I am thinking
>>      >>     a way to
>>      >>     >     >     integrate
>>      >>     >     >     >>         SNMP v3, but it do not uses the current
>>      >> SNMP_session perl lib as it is not supported within this lib)?
>>      >>     >     >     >>
>>      >>     >     >     >>         Regards
>>      >>     >     >     >>
>>      >>     >     >     >>         Bruno Manzoni
>>      >>     >     >     >>         (Bonomani)
>>      >>     >     >     >>
>>      >>     >     >     >>
>>      >>     >     >     >>         Le 14.05.2019 à 15:20, Josh Luthman a écrit :
>>      >>     >     >     >>>         You can just use Devmon these days.
>>      >>     >     >     >>>
>>      >>     >     >     >>>         I've seen nothing to suggest the projects
>>      >> will be merged.
>>      >>     >     >     >>>
>>      >>     >     >     >>>         Josh Luthman
>>      >>     >     >     >>>         Office: 937-552-2340
>>      >>     >     >     >>>         Direct: 937-552-2343
>>      >>     >     >     >>>         1100 Wayne St
>>      >>     >     >     >>>         Suite 1337
>>      >>     >     >     >>>         Troy, OH 45373
>>      >>     >     >     >>>
>>      >>     >     >     >>>
>>      >>     >     >     >>>         On Fri, May 10, 2019 at 12:33 PM Bruno
>>      >> Manzoni <bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >>     <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >>     >  <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >>     <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>
>>      >>     >     >  <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>
>>      >> <mailto:bruno.manzoni at ubi-network.ch <mailto:bruno.manzoni at ubi-network.ch>>>>>> wrote:
>>      >>     >     >     >>>
>>      >>     >     >     >>>  Hello,
>>      >>     >     >     >>>
>>      >>     >     >     >>>             Is there any plan to have SNMP
>>      >> include with a new version of xymon? If
>>      >>     >     >     >>>  yes, what is the current state?
>>      >>     >
>>      >>
>>      >
>>      > _______________________________________________
>>      > Xymon mailing list
>>      > Xymon at xymon.com <mailto:Xymon at xymon.com>
>>      > http://lists.xymon.com/mailman/listinfo/xymon
>>
>>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
>



More information about the Xymon mailing list