Introduction to SNMP monitoring [closed]
Asked Answered
R

6

9

I've been tasked with writing a monitoring program for my company's server software that integrates with zenoss via snmp.

To be brief, I can't get anything up off the ground. I think my first goal is to figure out the correct way to write an snmp agent (in any language to start, although it will eventually be in java). Are there any good test harnesses out there? I've used snmptest, which ships with zenoss, but it's not much good to me if I can't get a test agent off the ground. Anything that I know the zenoss manual has a lot of info, but it seems to presume a prior knowledge of standard systems monitoring practices and tools, and I can barely penetrate it.

Also, is it generally a good practice to use snmp to monitor software?

Regale answered 24/4, 2009 at 20:4 Comment(1)
hi brother, i read through every comments below and they are all rubbish. I, too, have the same requirements and had no idea where and what to start. I was given 1 week to understand the whole thing on my own. With the power of fear and panic, came understanding. I was fortunate to be a docker/python ubermaster and when i consulted hub.docker.com there I saw snmp simulations. I continue to marched on, next I saw PySNMP. Lastly, I saw net-snmp-5.7.3/ base source code from where u can recompile snmpd.c and extend it. Then this "ManageEngine Free Tools MibBrowser" helped me, as I am in Ubuntu.Checkrein
H
14

Short description of a typical SNMP agent:

  1. Set the agent up. This usually entails telling it what server to send alerts to.

  2. Run it.

  3. Send appropriate SNMP messages to the configured server when things happen.

  4. Reply to requests from the configured server.

All of the request/reply stuff is done using SNMP messages. If your company does not have a specially designed/assigned OID for the server software, you'll need to look into the standard MIB definitions to determine which OID(s) are appropriate.

MIB: Management Information Block. These come in standard and custom flavors. Standard ones are defined by a standards body (IETF?). Custom ones are created by vendors to support information unique to their product(s). MIBs are basically collections of OIDs.

OID: Object IDentifier - this is a dotted-notation number string that identifies the piece of hardware/software, and the bit of information you're looking for from it - for example, the number of TX collisions on an ethernet port might look something like: 1.5.82.316.8.4.3 (though that's not a valid OID, it's just a made-up example).

More detail available at Wikipedia. Download a free MIB browser to get an idea of what OIDs look like, and how detailed they can get. Check the RFCs for more detailed information. Look at something like perl's Net-SNMP - you may even be able to use the snmpd software that's included with it to do most of your work.

Heterochromatic answered 24/4, 2009 at 20:29 Comment(2)
I presume in 3) you're referring to traps ?Wideeyed
Yes, those would be SNMP traps.Heterochromatic
W
5

SNMP is certainly an acceptable way to monitor your network, devices and servers. Because it uses UDP it won't unduly stress the network via TCP retries and the like (SNMP clients are, or should be, architected to handle dropped packets etc.). Plus you'll have a huge array of client solutions to monitor your system and integrate against.

If you envisage a final solution in Java, see the Java/SNMP documentation and SNMP4J

SNMP.com (founded by Jeffrey Case, one of the SNMP architects) sells extensible SNMP agents. One of these may save you a world of grief.

Wideeyed answered 24/4, 2009 at 20:40 Comment(0)
P
3

nSoftware has an SNMP agent (not free). This might be easier than rolling your own.

Also check out William Stalling's book: SNMP.

Peggy answered 24/4, 2009 at 20:20 Comment(0)
M
1

Zenoss is quite complicated and comes with many pre-defined SNMP stuff. Do you really need to code your own SNMP agents?

Mahratta answered 24/4, 2009 at 20:9 Comment(1)
I don't exactly know whether I need to code my own snmp agents. I think I need to design my own snmp agents in that I should need to be able to define some traps to send regularly and some properties that can be requested. How manually I'll have to do that is a mystery to me.Regale
P
1

SNMP is a big topic, with lots of complexity if you go into all the details and all the historical versions of the protocol and related tools. I'd suggest picking up a copy of Essential SNMP by Mauro and Schmidt, which gives a very clear introduction to both the fundamental ideas behind SNMP as well as practical examples of how to get started with it and use it in parctice with a number of different tools.

Perot answered 14/5, 2009 at 14:4 Comment(0)
C
0

you can aim lower and try the Cacti (http://www.cacti.net/).

I too tried the Zenoss but gave up. The Cacti was up and running pretty fast. I just monitor use of bandwith of quite a few routers and many many ports in switches all over the country. But there are templates for monitoring all kind of things more related to a single server (temp, fan speed etc.)

BR. Anders

Cephalalgia answered 2/3, 2010 at 19:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.