use of org.graylog2.plugin.inputs.MessageInput in project graylog2-server by Graylog2.
the class MessageInputBindings method configure.
@Override
protected void configure() {
install(new TransportsModule());
install(new CodecsModule());
final MapBinder<String, MessageInput.Factory<? extends MessageInput>> inputMapBinder = inputsMapBinder();
// new style inputs, using transports and codecs
installInput(inputMapBinder, RawTCPInput.class, RawTCPInput.Factory.class);
installInput(inputMapBinder, RawUDPInput.class, RawUDPInput.Factory.class);
installInput(inputMapBinder, RawAMQPInput.class, RawAMQPInput.Factory.class);
installInput(inputMapBinder, RawKafkaInput.class, RawKafkaInput.Factory.class);
installInput(inputMapBinder, SyslogTCPInput.class, SyslogTCPInput.Factory.class);
installInput(inputMapBinder, SyslogUDPInput.class, SyslogUDPInput.Factory.class);
installInput(inputMapBinder, SyslogAMQPInput.class, SyslogAMQPInput.Factory.class);
installInput(inputMapBinder, SyslogKafkaInput.class, SyslogKafkaInput.Factory.class);
installInput(inputMapBinder, FakeHttpMessageInput.class, FakeHttpMessageInput.Factory.class);
installInput(inputMapBinder, GELFTCPInput.class, GELFTCPInput.Factory.class);
installInput(inputMapBinder, GELFHttpInput.class, GELFHttpInput.Factory.class);
installInput(inputMapBinder, GELFUDPInput.class, GELFUDPInput.Factory.class);
installInput(inputMapBinder, GELFAMQPInput.class, GELFAMQPInput.Factory.class);
installInput(inputMapBinder, GELFKafkaInput.class, GELFKafkaInput.Factory.class);
installInput(inputMapBinder, JsonPathInput.class, JsonPathInput.Factory.class);
install(new BeatsInputPluginModule());
}
use of org.graylog2.plugin.inputs.MessageInput in project graylog2-server by Graylog2.
the class InputLauncher method handleLaunchException.
protected void handleLaunchException(Throwable e, IOState<MessageInput> inputState) {
final MessageInput input = inputState.getStoppable();
StringBuilder msg = new StringBuilder("The [" + input.getClass().getCanonicalName() + "] input with ID <" + input.getId() + "> misfired. Reason: ");
String causeMsg = ExceptionUtils.getRootCauseMessage(e);
msg.append(causeMsg);
LOG.error(msg.toString(), e);
// Clean up.
// cleanInput(input);
inputState.setState(IOState.Type.FAILED, causeMsg);
}
use of org.graylog2.plugin.inputs.MessageInput in project graylog2-server by Graylog2.
the class InputLauncher method launchAllPersisted.
public void launchAllPersisted() {
for (MessageInput input : persistedInputs) {
if (leaderStatusInhibitsLaunch(input)) {
LOG.info("Not launching 'onlyOnePerCluster' input [{}/{}/{}] because this node is not the leader.", input.getName(), input.getTitle(), input.getId());
continue;
}
if (shouldStartAutomatically(input)) {
LOG.info("Launching input [{}/{}/{}] - desired state is {}", input.getName(), input.getTitle(), input.getId(), input.getDesiredState());
input.initialize();
launch(input);
} else {
LOG.info("Not auto-starting input [{}/{}/{}] - desired state is {}", input.getName(), input.getTitle(), input.getId(), input.getDesiredState());
}
}
}
use of org.graylog2.plugin.inputs.MessageInput in project graylog2-server by Graylog2.
the class MessageInputFactory method create.
public MessageInput create(InputCreateRequest lr, String user, String nodeId) throws NoSuchInputTypeException {
final MessageInput input = create(lr.type(), new Configuration(lr.configuration()));
input.setTitle(lr.title());
input.setGlobal(lr.global());
input.setCreatorUserId(user);
input.setCreatedAt(Tools.nowUTC());
if (!lr.global())
input.setNodeId(nodeId);
return input;
}
Aggregations