[SNMP4J] configure Agent with properties

Frank Fock fock at agentpp.com
Tue Apr 22 18:26:55 CEST 2008


Hello Guenter,

Shortly said, the properties file can be used to
configure the initial value of your object to
a value other than the hard coded 0 (in your case
below).

Best regards,
Frank

Guenter Wildmann wrote:
> Hello Frank!
> 
> Thank your for your immediate answer.
> To be honest: I still do not really understand what the properties file
> does exactly.
> I added the lines
> 
> EnumeratedScalar sensor1 = new EnumeratedScalar(new OID("1.3.6.1.4.1.123.0"),MOAccessImpl.ACCESS_READ_WRITE,new Integer32(0));
> try
> {
>    server.register(sensor1, null);
> } catch (DuplicateRegistrationException e)
> 
> to SampleAgent and then the MO is accessible via SNMP request, without
> changing the properties file in any kind.
> So it works for me, thank you.
> 
> Ciao, Guenter
> 
> 
> On Mon, 21 Apr 2008, Frank Fock wrote:
> 
>> Hello Guenter,
>>
>> The SampleAgentConfig.properties file is used to
>> configure the content of the agent's managed objects,
>> but not to configure what those objects are.
>>
>> To add a managed object (table or scalar) to an
>> agent you will have to register a MOScalar or
>> DefaultMOTable instance as shown in TestAgent or
>> AgentConfigManager.
>>
>> If you only want to provide static data, you can
>> use a simplified approach through the StaticMOGroup
>> as shown by the SnapshotAgent example which reads
>> object and object data information from a SNMP4J
>> or MIB Explorer snaphost file. This approach can
>> be used to provide an ad-hoc agent - a so called
>> simulation agent.
>>
>> Hope this helps.
>>
>> Best regards,
>> Frank
>>
>> Guenter Wildmann wrote:
>>> Hello!
>>>
>>> I am trying to publish integer values via snmp. They should appear on an
>>> enterprise oid.
>>> How do I write the properties-file correctly to have them available in
>>> the
>>> agents mib?
>>> I changed the SampleAgentConfig.properties to have the sysObjectID point
>>> to my enterprise OID
>>> snmp4j.agent.cfg.oid.1.3.6.1.2.1.1.2.0={o}1.3.6.1.4.1.123
>>>
>>> and added the line
>>> snmp4j.agent.cfg.oid.1.3.6.1.4.1.123.0={i}10
>>>
>>> But this does not work. Every hint welcome.
>>>
>>> Ciao, Guenter
>>>
>>> _______________________________________________
>>> SNMP4J mailing list
>>> SNMP4J at agentpp.org
>>> http://lists.agentpp.org/mailman/listinfo/snmp4j
>> --
>> AGENT++
>> http://www.agentpp.com
>> http://www.mibexplorer.com
>> http://www.mibdesigner.com
>>
>>
> _______________________________________________
> SNMP4J mailing list
> SNMP4J at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/snmp4j

-- 
AGENT++
http://www.agentpp.com
http://www.mibexplorer.com
http://www.mibdesigner.com



More information about the SNMP4J mailing list