Ok, solved. $r ->gets localhost for local machine but in nagios config I've defined this machine as 192.168.X.X Sorry for the inconvenience and thank you for the support provided :D
Hi everyone, I'm having a little problem getting snmptt to work well with Nagios: the variable substitution $r which is used to pass the host name. If I write the hostname instead of $r everything works properly. I'm quite new to linux and SNMP so I'd appreciate any hint that might help me solve it. I enclose traces working correctly and with error. Thanks in advance. Example, output ok and wrong OK: ==> /var/log/messages <== Mar 21 10:49:26 localhost nagios: EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;<myhostname>;TRAP;2;Device...