238.5. 使用 NagiosEventNotifer
Nagios 组件还提供 EventNotifer,可用于向 Nagios 发送事件。例如,我们可以从 Java 启用它,如下所示:
NagiosEventNotifier notifier = new NagiosEventNotifier();
notifier.getConfiguration().setHost("localhost");
notifier.getConfiguration().setPort(5667);
notifier.getConfiguration().setPassword("password");
CamelContext context = ...
context.getManagementStrategy().addEventNotifier(notifier);
return context;
在 Spring XML 中,使用类型 EventNotifier 和 Camel 定义 Spring bean 只会选择它,如此文档: 使用 Spring 进行 CamelContext 的高级配置。