3

Recently I am stuck into a snmp problem. My client requirement is that I have to push cpu,hard disk and memory data to the Network management system periodically. I have already configured my snmpd.conf file to pull data through snmpwalk command but don't know how to push periodically to nms. Also need to know how to test that the data's are pushed properly or not. Anly help would be great

  • What interfaces does the NMS provide to you? This does not seem like a task normally delegated to the SNMP Agent. – Jolta Jun 17 '13 at 11:27
  • NMS only provide snmp interface to me. I have to check the status of harddisk or other hardware periodically and need to send the trap to the nms system. – Souvik Bhattacharya Jun 18 '13 at 08:02

1 Answers1

3

If the NMS provides any other interfaces than SNMP, for example, 3GPP XML files transferred over FTP, I would strongly recommend using that interface instead.

You have an SNMP Agent running already, and it will respond to get-requests, walk, etc. Normally, an enterprise-grade NMS would have no problem polling an SNMP Agent regularly to collect data such as what you describe. This is a common approach in what the telecom sector defines as Performance Management(PM) according to FCAPS. For a modest amount of counters, fetched at reasonably large intervals, this approach generally works well. Problems with polling time can sometimes occur with too-frequent polling of large amount of data.

From the SNMP Agent, you also have the option to send Trap messages, which are spontaneous asynchronous messages. Normally, traps are only used to notify an NMS about important events on the supervised equipment, such as equipment faults (Fault Management). However, there is technically nothing stopping you from designing a MIB which defines traps sent regularly, containing performance data. Some form of adaptation would probably be needed on the NMS, to receive PM data from SNMP traps, since this is not usually done. If the NMS is not able to do regular polling of counters, it seems unlikely that it would be flexible enough to do this.

If there is a large amount of counters, traps are unsuitable since the size of each message should ideally not exceed the MTU of the network (1500 bytes for Ethernet).

Jolta
  • 2,620
  • 1
  • 29
  • 42
  • Thanks for the suggetion. It really help ful. But could you tell me how to design the MIB file. Could you give me some example to start with – Souvik Bhattacharya Jun 18 '13 at 08:45
  • I can recommend the book "Understanding SNMP MIBs" by David T. Perkins. If there is no time/budget for buying literature, you could start down the narrow path - read RFC 2578, and section 3 of RFC 3512. It really is a subject too big for a Stackoverflow post. If you are able to read and understand the standard MIB modules (IF-MIB, etc) then you are halfway there. Make sure you have good tools. Some examples at http://trac.tools.ietf.org/area/ops/trac/wiki/mib-review-tools I've also used "Visual MIBuilder", a commercially available product. – Jolta Jun 18 '13 at 09:54
  • Oh great I will go thorough the RFC. But one thing, during the basic googling, I found that it's possible to send traps by configuring snmpd.conf file too. So, could you confirm. Secondly where I will find te existingh MIB file in net-snmp. – Souvik Bhattacharya Jun 18 '13 at 10:21
  • I don't remember off-hand how to configure net-snmp, but I could google it or look it up in the documentation. I guess it's quicker if you do that, though... – Jolta Jun 18 '13 at 10:59
  • Thans Jolta. Your suggetion will help me to get my answer – Souvik Bhattacharya Jun 18 '13 at 11:23
  • Hi Jolta, One more question. Is that possible to send traps without writing custom MIB? – Souvik Bhattacharya Jun 19 '13 at 08:24
  • Certainly, it is possible to do it. For example, using the net-snmp command line tool "snmptrap". I don't know if it's supported by the net-snmp snmpd. But I highly recommend writing a MIB module, because once you've done that, you not only have a design for your own reference, but also for the systems integrator on the NMS side, who needs to know which variables are sent in the trap and what their respecive types are. – Jolta Jun 19 '13 at 12:12
  • After gone through the tutorial, now MIB files are bit cleared to me. Now after creating a MIB file I have put it in to the MIB folder and add the same into snmp.conf. After that generte the c code with mib2c tool. Now my questing is where to put that generated c file and header file. – Souvik Bhattacharya Jun 23 '13 at 21:52