I'm trying to send a snmp trap with these command line :
snmptrap -v 1 -c public host '1.2.3.4.5.6' '192.193.194.195' 6 99 '55' 1.11.12.13.14.15 s "teststring"
or
snmptrap -v 2c -c public host "" UCD-NOTIFICATION-TEST-MIB::demoNotif \
SNMPv2-MIB::sysLocation.0 s "Just here"
But I get this error message :
getaddrinfo: host Name or service not known
getaddrinfo("host", NULL, ...): Name or service not known
snmptrap:
zsh: exit 1 snmptrap -v 1 -c public host '1.2.3.4.5.6' '192.193.194.195' 6 99 '55' s
What's wrong ? It seems I don't get something..
My final aim is just to send a trap on localhost on a specific port in a shell script..
EDIT : I have a new error :
read_config_store open failure on /var/lib/snmp/snmpapp.conf
How can I fix that ? I can't modify any files on the computer. I just can write some lines in a shell script to send a trap..