views:

96

answers:

2

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??.

+2  A: 

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
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
@Divya mohan Singh, What do you mean, "violate the rules of the protocol"?
lostriebo
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
@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
@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
@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
A: 

@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
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
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