Help with check_snmp needed

Hi,
i need some help/explanation why:

./check_snmp -H myhost.com -U myuser -o 1.3.6.1.2.1.1.4.0 -P 3 -L authPriv -A secret -X secret -a SHA -x AES

works

and when i transfer this to a service:

object Service “Contact” {
import “generic-service”
host_name = “myhost.com
check_command = “snmp”
vars.snmp_version = “3”
vars.snmpv3_oid = “1.3.6.1.2.1.1.4.0”
vars.snmpv3_user = “myuser”
vars.snmpv3_auth_key = “secret”
vars.snmpv3_priv_key = “secret”
vars.snmpv3_auth_alg = “SHA”
vars.snmpv3_priv_alg = “AES”
vars.snmpv3_seclevel = “authPriv”
}

it don’t.
No error with icinga configuration, but Plugin Output says:

No OIDs specified

I tried with and without trailing .0
in icinga-web the custom variables are shown.

Any ideas?
Thanks

Morning,
so, i did some additional investigation. I switched on the debuglog and did a grep on check_snmp.

[2024-02-01 12:16:57 +0100] notice/Process: PID 17125 (‘/usr/local/libexec/nagios/check_snmp’ ‘-C’ ‘public’ ‘-H’ ‘myip’ ‘-P’ ‘3’ ‘-t’ ‘10’) terminated with exit code 3

When i execute this with copy/paste i gives exactly the error from above No OIDs specified.

check_snmp is split into two commands in the ITL, snmp and snmpv3 and you probably want to use the second one :slight_smile:

check_command = “snmpv3”

You’re my hero!
Thanks a lot, haven’t noticed that.