[SNMP4J] Is it possible to create an OID in the agent (server) MIB from the manager (client)?
Frank Fock
fock at agentpp.com
Thu Oct 22 18:33:53 CEST 2015
Hi Réda,
If you have the MIB specification, the steps to do are (for a production
grade system):
1. Write or generate using AgenPro, the ManagedObject implementations
for the MIB specification.
2. Instrument the ManagedObjects (i.e., MOScalars and MOMutableTableRows).
3. Compile the agent and run it
4. Set variable binding you want to change.
5. The agent instrumentation code will be called and can then act upon
the new value.
As a consequence from the above, you will not be able to create totally
new MIB objects in an agent.
Means, MIB object instances for MIB object definitions, that the authors
of the agent did not implement.
However, the SNMP standard allows to define SNMP tables. Tables can
contain zero rows. To create
a new row, typically using the RowStatus column of that table, you
simple SET the RowStatus column
of the new row to createAndWait(5). You will have to define/find out a
valid row index (the row "name")
for the new row. That row index OID is then appended to the OID of the
column you SET.
With the above approach you are able to create "new" objects in an
agent, the agent did not had before.
However, the structure of those objectzs must be already known at
compile time to the agent.
All the above, is true for product grade agents.
If you want to simulate an agent and simply provide/put data in an agent
without implementing any
functionality based on that data, then you can also create totally new
object VBs at runtime.
The AgenPro built-in simulation agent does that by dynamically load new
MIB specifications.
You can use the SimMOFactory by implementing the AgentppSimulationMib in
your agent, for instance.
Hope this helps.
Best regards,
Frank
Am 22.10.2015 um 17:27 schrieb Réda BENKIRANE:
> I am using SNMP4J Framework and it implements and makes possible the standard SET, GET, GET-NEXT, etc. messages.For example, with a SET, I can update the value of the MIB OID "1.3.6.1.2.50.0". This works perfectly for me. I can do that using org.snmp4j.Snmp.set(PDU pdu, Target target)What I want to do now is to CREATE a custom MIB OID (as "1.3.6.1.2.100.0") FROM the client and assign a value to it and not simply update an existing MIB OID value.Is there any standard SNMP way to do that easily ?
> Réda BENKIRANE
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> https://oosnmp.net/mailman/listinfo/snmp4j
--
---
AGENT++
Maximilian-Kolbe-Str. 10
73257 Koengen, Germany
https://agentpp.com
Phone: +49 7024 8688230
Fax: +49 7024 8688231
More information about the SNMP4J
mailing list