org.graylog2.bootstrap.commands.Radio Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graylog2 Show documentation
Show all versions of graylog2 Show documentation
Graylog Single Binary Bootstrapper
/**
* This file is part of Graylog.
*
* Graylog is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Graylog is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Graylog. If not, see .
*/
package org.graylog2.bootstrap.commands;
import com.google.common.util.concurrent.ServiceManager;
import com.google.inject.Injector;
import com.google.inject.Module;
import io.airlift.airline.Command;
import org.graylog2.bootstrap.Main;
import org.graylog2.bootstrap.ServerBootstrap;
import org.graylog2.plugin.ServerStatus;
import org.graylog2.radio.Configuration;
import org.graylog2.radio.bindings.PeriodicalBindings;
import org.graylog2.radio.bindings.RadioBindings;
import org.graylog2.radio.bindings.RadioInitializerBindings;
import org.graylog2.radio.cluster.Ping;
import org.graylog2.shared.bindings.ObjectMapperModule;
import org.graylog2.shared.system.activities.Activity;
import org.graylog2.shared.system.activities.ActivityWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import java.util.Set;
@Command(name = "radio", description = "Start the Graylog radio")
public class Radio extends ServerBootstrap implements Runnable {
private static final Logger LOG = LoggerFactory.getLogger(Radio.class);
private static final Configuration configuration = new Configuration();
static {
// If this is not done, the default from BaseConfiguration will enable journaling on radio,
// but the actual Journal implementation there is the NoopJournal. This lead to discarding all incoming messages.
// see https://github.com/Graylog2/graylog2-server/issues/927
configuration.setMessageJournalEnabled(false);
}
public Radio() {
super("radio", configuration);
}
@Override
protected List getCommandBindings() {
return Arrays.asList(new RadioBindings(configuration, capabilities()),
new RadioInitializerBindings(),
new PeriodicalBindings(),
new ObjectMapperModule());
}
@Override
protected List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy