0

I am new to SNMP and I can not find any clear article if we can add a data node in SNMP. And also how does SNMP collect data?

I want to monitor the following resources, which can be obtained from SAR report. So, please tell me how to add this under SNMP or at least how does SNMP collect data, so that I will try to figure out if I can add these:

  • RAM and SWAP Used (without buffer/cache) & Total
  • Load (1min, 5min, 15min)
  • Iowait
  • cpu idle
  • pagein/outs
  • Swap in/outs
  • I/O read blocks/bytes/sectors per second
  • I/O write blocks/bytes/sectors per second
  • I/O requests per second
  • Network Interface Speed

I can find a few in SNMP tree, but not all. Can I add any data node under SNMP is it possible?

We need this as a part of monitoring few 100s of servers in cacti.

  • Despite SNMP meaning Simple Network Management Protocol it is far from being simple. I suggest to get familiar with SNMP if you want to use it for serious purposes. – countermode Oct 6 '16 at 15:13
  • So is this possible? – GP92 Oct 6 '16 at 15:14
  • Quite possible... but there's a lot to it. – Thomas N Oct 6 '16 at 15:23
  • Can you suggest a good place where I can read all about it? Complexity is not an issue as long as the solution is possible. – GP92 Oct 6 '16 at 15:26
  • I have A very short time to implement this. So, I am looking for nice place to start – GP92 Oct 6 '16 at 15:27
2

The Net-SNMP package supplied with RedHat is actually a very flexible monitoring agent, which will get values for all of the metrics you listed by default out of the box. However, it's old: the SNMP protocol itself has been around for over two decades, with significant improvements made over that span. The learning curve for it is fairly steep, as well. Which is directly related to the 26+ years of development made on the protocol base. The Net-SNMP project was pretty much there for all of that (first as a Carnegie-Mellon implementation and then as "ucd-snmp" from the University of California at Davis, which led to the current "Net-SNMP" code fork), so there is a fair bit of information to get a handle on, but they have great documentation.

http://net-snmp.sourceforge.net/docs/man/

is the basic manual pages for the distribution. The Wiki has good "quick setup" guides and can be found at

http://net-snmp.sourceforge.net/wiki/

So I'd start there to get up and running quickly. But read on...

Net-SNMP collects it's data from the Linux kernel, using various sources ( the /proc filesystem and the lm-sensors packages to name a few). It can also be extended to report on just about anything you want, but that's going to take some significant investment of time and knowledge in order to do so.

In order to understand what is happening behind the scenes, the first concept you need to take a look at is the structure and availability of SNMP MIBs (Management Information Bases), which control what information you can query. I wouldn't spend a lot of time on it, but knowing which MIBs are available on your system and the structure of some of the most common MIB objects like TABLEs, STRINGs, INTs and INFORMs will allow you to select appropriate objects for your monitoring needs.

The second piece you need is an understanding of the Net-SNMP configuration file: snmpd.conf. This is a complex piece of of configuration, so read the man pages thoroughly to understand why things are set up the way they are in the defaults.

Also, from a default implementation, you will need to select the protocol version you'll be supporting/querying with. Please DON'T use version 1. Your choice, really, is between versions 2c and 3 for support of rudimentary security and 64-bit counter support.

Good Luck! Your adventure awaits!

  • Thanks Thomas, I have already done the basic configuration of snmp using the same wiki page and could also able to get data of resources which are there in snmp tree. So, I should read on how to add new data sources under snmp. I will go through all the manual pages for this then, as there seems to be no other proper articles about this on net. – GP92 Oct 6 '16 at 16:17
  • I found this video in youtube and it explained almost everything that I want to know :) youtube.com/watch?v=RD8hnhGCFcY only thing I have to check now is how to implement subagents. – GP92 Oct 6 '16 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.