SNMP check via icinga timeout, but cli works fine

Hi,
i created some new snmp checks on a system via director. 3 of 4 works fine. But one always get a timeout. Only difference is the oid.
If i execute this check via cli its all fine. The timeout is allready increased, but no change.
Maybe someone have a tipp?
Thx.

Put the time command in front of your cli and see how long it takes and try to adjust the timeout of the command object.

I could do this of course.

But if the check takes about 1 sec on the cli and via icinga a 30 sec timeout is not enought there is something wrong.

Did you try to run it as icinga/nagios user via sudo?

Not till you mention it. But i have checked. Works also fine.

root@vmmon01:/usr/lib/nagios/plugins# time sudo -u nagios ./check_snmp -H 192.168.xxx.107 -C public -o 1.3.6.1.4.1.20632.2.2
SNMP OK - 1 | iso.3.6.1.4.1.20632.2.2=1

real    0m0,015s
user    0m0,000s
sys     0m0,004s

Does capturing it while running with ps show anything?

Yes it does. Also looks for my understanding.

root@vmmon01:/usr/lib/nagios/plugins# ps -ef | grep snmp
nagios   2431770 1994485  0 09:33 ?        00:00:00 /usr/lib/nagios/plugins/check_snmp -C public-H 192.168.xxx.107 -c 40 -l inQueueSize -o  1.3.6.1.4.1.20632.2.2 -t 30 -w 35
nagios   2431771 2431770  0 09:33 ?        00:00:00 /usr/bin/snmpget -Le -t 30 -r 5 -m ALL -v 1 -c      192.168.xxx.107:161 1.3.6.1.4.1.20632.2.2
root     2431787 2420932  0 09:33 pts/0    00:00:00 grep snmp

The only difference I can imagine are the env variables.

Can you run, via Icinga, a new check that only dumps the env into a file and then diff it with the output of the same check when run via sudo -su icinga/nagios?