I'm using Ubuntu 16.04. I've changed snmpd.conf
for listening to unix socket instead of its default udp port 161, but snmpget
fails with Timeout error.
Before changing the config file this was working:
snmpget -v2c -c public localhost SNMPv2-MIB::sysUpTime.0
with an output like this:
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1453) 0:00:14.53
Then I changed agentAddress
in the config file like below:
agentAddress unix:/tmp/snmp/agent.sock
And restarted snmpd service. Now when I use snmpget
like this:
snmpget -v2c -c public unix:/tmp/snmp/agent.sock SNMPv2-MIB::sysUpTime.0
It errors:
Timeout: No Response from unix:/tmp/snmp/agent.sock.
In snmpd man page it said that listening address could be changed to unix socket but it seems not working.