snmpget does not work from a remote server but works when called from the local server itself

de flag

I'm trying to do a snmpget from remote but it only works from the serveur itself :

server $ ipAddress=$(ip -4 -o a show dev enp1s0f0 | awk -F ' *|/' '{print$4;exit}')
server $ snmpget -v3 -u svc_snmp_v3 -l authNoPriv -a SHA-512 -A $MDP_SNMP_V3 $ipAddress sysName.0
SNMPv2-MIB::sysName.0 = STRING: server
remote $ ipAddress=x.y.z.t # The IP address of my server
remote $ snmpget -v3 -u svc_snmp_v3 -l authNoPriv -a SHA-512 -A $MDP_SNMP_V3 $ipAddress sysName.0
sysName.0: Unknown Object Identifier (Sub-id not found: (top) -> sysName)
remote $ echo $?

What is wrong ?

waltinator avatar
it flag
Use `journalctl`, especially the `--since=` and `--until` options to look at the system logs (read `man journalctl`). In my AskUbuntu profile (click on my username) I have some `journalctl` hints, including a way to format dates for `--since=` and --until=`.
jtessier72 avatar
cn flag
please post contents of snmp.conf file, probably at /etc/snmp/snmp.conf
SebMa avatar
de flag
@jtessier72 Thanks. I used a solution from I commented the line `mibs :` in `/etc/snmp/snmp.conf` and installed the `snmp-mibs-downloader` package, now it works fine :)

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.