in reply to Re: Formatting snmpget output and OIDs
in thread Formatting snmpget output and OIDs

Thanks Darren, But I probably didn't explain myself correctly, I'll try and explain again:
I don't "have" the SNMPv2-SMI::enterprises.54321.1.2.1 = INTEGER: 2082 string.
This is what is sent as an answer to whom ever sent the querry.
It is sent by the netsnmpand, the only thing I do is send the appropriate value. e.g
$request->setValue($fieldtype, $sumValue);
where $fieldtype is ASN_INTEGER and $sumValue is the value I get from a file.
the $request is set(as shown above), and used by the handler that is registered to the agent.
I hope it is clear now (tried my best ... :-) ) Thanks again
  • Comment on Re^2: Formatting snmpget output and OIDs

Replies are listed 'Best First'.
Re^3: Formatting snmpget output and OIDs
by McDarren (Abbot) on Apr 05, 2006 at 11:58 UTC
    Okay, well I obviously didn't get it the first time - but I'm afraid that I still don't.

    Those modules you are using - are they home-grown?

    I can't find any of them on CPAN, and setValue is not a function that's available via Net::SNMP.

    Perhaps you can show some code that demonstrates your problem a bit clearer?

    Sorry I can't be of more help.

Re^3: Formatting snmpget output and OIDs
by jasonk (Parson) on Apr 05, 2006 at 13:06 UTC

    If I understand the question correctly you are working on an SNMP server in perl (apparently using NetSNMP::agent, although it would help if you specified that) and you want to change the output format that someone who runs 'snmpget' on your servers sees? Do I understand that correctly?

    If so, the answer is "you can't", the server can only return the values, you would have to change the client to control how they are displayed at that end.


    We're not surrounded, we're in a target-rich environment!
      Thanks to both of you Jason, you are almost correct, I want to change the output format that someone who runs 'snmpWALK' on my servers sees, and I understud that it IS possible since the 'walk' does work with names, no ??