> In the snmptt.conf all traps are defined. Each trap-Event has its own > individual ID. > With the new incoming Event the EXEC Statement of the defined trap-Event will > be executed. In your exmaple this would be: > EXEC echo "[$@] PROCESS_SERVICE_CHECK_RESULT;$A;Coldstart;2;The snmp agent > has reinitialized." >> /var/run/icinga2/cmd/icinga2.cmd > > By calling the icinga2.cmd the data is given to icinga2 and a service is > called. The Service-Name must be identical to the one in the EXEC command. > But how is the syntax of these command? I guess in this example Coldstart is > the Service-Name? But what is the additional script doing exactly?
Mathias, You need to lookup the Icinga2 cmd pipe definition format to assert this, but that is correct. For this simple example, the external command is expecting to find a host, "$A" (http://snmptt.sourceforge.net/docs/snmptt.shtml#SNMPTT.CONF-FORMAT) with a service definition "Coldstart". If not, Icinga discards the command. See the next example for more detail on a different use case. jlc _______________________________________________ icinga-users mailing list [email protected] https://lists.icinga.org/mailman/listinfo/icinga-users
