Hello,

I want to extend snmp with one command. I added one line to
/etc/snmp/snmpd.configuration
============================================================================
root@officelaptop:~# tail /etc/snmp/snmpd.conf
#
# rouser: a SNMPv3 read-only access username
#    arguments: username [noauth|auth|priv [OID | -V VIEW [CONTEXT]]]
rouser authPrivUser authpriv -V systemonly

# include a all *.conf files in a directory

rocommunity  public
extend my_own_cmd /usr/bin/echo Hello Lokesh
includeDir /etc/snmp/snmpd.conf.d
root@officelaptop:~#
============================================================================
After that, I did
 sudo systemctl restart snmpd

snmpd started and is active

If I try to execute the command my_own_cmd, I'm seeing the following error.

============================================================================
root@officelaptop:~# sudo snmpwalk -v2c -c public localhost
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line."my_own_cmd"
NET-SNMP-EXTEND-MIB::nsExtendOutput1Line.my_own_cmd: Unknown Object
Identifier (Index out of range: my_own_cmd (nsExtendToken))
============================================================================

Can someone help me understand how to fix the issue ?


Thanks & Regards
--
Lokesh Chakka.
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to