Available as of Camel 2.3
The Nagios component allows you to send passive checks to Nagios.
Maven users will need to add the following dependency to their
pom.xml for this component:
Camel provides two abilities with the Nagios component. You can send passive check messages by sending a message to its endpoint.
Camel also provides a EventNotifer which allows you to send notifications to Nagios.
This is the address of the Nagios host where checks should be send.
The port number of the host.
Password to be authenticated when sending checks to Nagios.
Connection timeout in millis.
Sending timeout in millis.
To use an already configured
com.googlecode.jsendnsca.core.NagiosSettings object. Then any of the other options are not in use, if using this.
Whether or not to use synchronous when sending a passive check. Setting it to
false will allow Camel to continue routing the message and the passive check message will be send asynchronously.
Camel 2.9: To specify an encryption method. Possible values:
This is the address of the Nagios host where checks should be send. This header will override any existing hostname configured on the endpoint.
This is the severity level. You can use values
CRITICAL, WARNING, OK. Camel will by default use
The servie name. Will default use the CamelContext name.
Sending message examples
You can send a message to Nagios where the message payload contains the message. By default it will be
OK level and use the CamelContext name as the service name. You can overrule these values using headers as shown above.
For example we send the
Hello Nagios message to Nagios as follows:
To send a
CRITICAL message you can send the headers such as:
The Nagios component also provides an EventNotifer which you can use to send events to Nagios. For example we can enable this from Java as follows:
In Spring XML its just a matter of defining a Spring bean with the type
EventNotifier and Camel will pick it up as documented here: Advanced configuration of CamelContext using Spring.