4

hii, i am working on SNMP from last few days,i have develope a small application(SNMP Agent) which

* Run on 161 port.
* Have a tree structured OID support.
* Respond to all Get,GetNext,Set Pdu Request types.
* Tested with some SNMP Managers(free available) by get and set the values of the OID's.

BUT,now question is when i tried it with Cacti it will not respond anything,but detect windows snmp service..it just respond to the requests of the SNMP Managers.

So,Is it mandatory to provide mib with SNMP Agent??.

Divya mohan Singh
  • 485
  • 2
  • 7
  • 18
  • While I've answered your question below, I'm not sure I've helped you find a solution to the problem you're seeing. What exactly happens when you try to query the agent from Cacti? Do you receive any result? Does Cacti provide an option to do an `snmpwalk` against a base OID (`snmpwalk` is helpful when dealing with tree-structured MIBs)? – lostriebo Apr 16 '10 at 15:11
  • Thanx for your answer..cacti is not detecting my snmp agent(showing SNMP Error)..i have tested the snmpwalk.exe manually with my snmp Agent.i have tried other commands of net-snmp(like snmpget.exe,snmpgetnext.exe etc.)..Now i just want to get detect my Agent by Cacti. – Divya mohan Singh Apr 17 '10 at 05:51
  • Have you been able to query any SNMP agent with Cacti? If not, it may be a configuration problem in Cacti and not a problem with your agent. – lostriebo Apr 17 '10 at 07:03
  • Ya..i have tried it with windows snmp service and then cacti is detecting the SNMP information..but if i tried with the other SNMP Agents like Provided with #Snmp library..it also not detected. – Divya mohan Singh Apr 17 '10 at 07:26

2 Answers2

4

No, MIBs aren't strictly required to be able to query a SNMP agent.

A MIB allows a SNMP client to interpret the information returned by the agent (i.e., by giving it a readable name rather than just the OID, correctly displaying data in the desired format, etc.). If you know the OID, a client should be able to query the agent without being provided a MIB.

lostriebo
  • 1,483
  • 1
  • 16
  • 25
  • Thanx,But if i will not use the MIB's according to the RFC's standard ..then ain't i voilate any rules of this protocol??..is it ok if i just process the request from the manager.?? – Divya mohan Singh Apr 17 '10 at 06:43
  • @Divya mohan Singh, What do you mean, "violate the rules of the protocol"? – lostriebo Apr 17 '10 at 07:02
  • i mean..Isn't it in set of rules provided in RFC's to process all standard OID's (like 1.3.6.1.2.1.1 is base OID for system).??..if i am not respond for some standard OID's then,is it fine?? – Divya mohan Singh Apr 17 '10 at 07:11
  • @Divya mohan Singh, Oh, okay. I can't answer this definitively but I believe it's okay if your agent only responds to specific OIDs. I just looked up the [RFC](http://www.faqs.org/rfcs/rfc2275.html) and it looks like it's only a `SHOULD` rather than a `MUST`. Unless Cacti requires it for some reason, I don't think that would be the issue. – lostriebo Apr 17 '10 at 07:17
  • @lostriebo : so it means its a complete SNMP Agent(SNMP service) which used to monitor the device..and cacti is the standard application used to monitor and graph the resource data collected from remote device(snmp enabled devices)..so,if this is my snmp service..it have to be detected by cacti to being monitored...now got my problem?? – Divya mohan Singh Apr 17 '10 at 07:38
  • @Divya mohan Singh, I think I understand your problem. Cacti isn't seeing your agent. Unfortunately, I have no experience with Cacti so I can only guess at what might be happening. If Cacti does need the agent to respond to default OIDs then the easiest option may be to use snmpd and have your agent connect through the [AgentX protocol](http://tools.ietf.org/html/rfc2741) and serve your data to snmpd. – lostriebo Apr 17 '10 at 08:08
0

@Divya mohan Singh, you would like Cacti to detect your agent then you should go after Cacti itself.

Once you know which OIDs are expected by Cacti, you can implement them in the agent and then everything should be ok.

If you have time you may implement as many SNMP objects within the agent as possible, but if Cacti only relies on a few of them, you may take the easy way to implement on the few it asks for.

Well, it may sound like that I am encouraging you to develop an SNMP agent that does not comply to the RFC words, but the truth is that many agents already break the rules, and yours will not be the last one. :)

Lex Li
  • 60,503
  • 9
  • 116
  • 147
  • cacti is looking for the base OID of the system info(i.e 1.3.6.1.2.1.1) and walk into this branch..i have implement it in my agent..and succesfully walk through this branch using net-snmp..but cacti will not query it for anything..jus show me error..how can it silently get the info in case of the windows snmp service..how it query the agent??..please help me out – Divya mohan Singh Apr 26 '10 at 05:39
  • Please utilize Network Monitor, or System.Net tracing to capture what messages are sent by cacti, and what OIDs it asks for. Besides, consulting Cacti support team for clarification is a more direct approach for a clear resolution. – Lex Li Apr 26 '10 at 06:03