当前位置: 首页>>代码示例>>Java>>正文


Java ConfigurationRequest类代码示例

本文整理汇总了Java中org.graylog2.plugin.configuration.ConfigurationRequest的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationRequest类的具体用法?Java ConfigurationRequest怎么用?Java ConfigurationRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ConfigurationRequest类属于org.graylog2.plugin.configuration包,在下文中一共展示了ConfigurationRequest类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();
    configurationRequest.addField(new TextField(CK_OUTPUT_FOLDER,
            "Output folder in which the output file will be written.",
            "/tmp/", "Output folder in which the output file will be written.",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new TextField(CK_OUTPUT_FILE,
            "File's name in which the output will be written",
            "file_output",
            "File's name in which the output will be written",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addField(new NumberField(CK_FLUSH_TIME,
            "Flush period time in seconds.",
            15,
            "Flush time period/interval",
            ConfigurationField.Optional.NOT_OPTIONAL)
    );

    return configurationRequest;
}
 
开发者ID:scampuza,项目名称:graylog-plugin-file-output,代码行数:24,代码来源:FileOutput.java

示例2: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields(
            new TextField("query", "Query", "", "Query that should be checked", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("time", "Time Range", 5, "Evaluate the condition for all messages received in the given number of minutes", ConfigurationField.Optional.NOT_OPTIONAL),
            new DropdownField(
                    "threshold_type",
                    "Threshold Type",
                    ThresholdType.MORE.toString(),
                    Arrays.stream(ThresholdType.values()).collect(Collectors.toMap(Enum::toString, ThresholdType::getDescription)),
                    "Select condition to trigger alert: when there are more or less messages than the threshold",
                    ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("threshold", "Threshold", 0.0, "Value which triggers an alert if crossed", ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());
    return configurationRequest;
}
 
开发者ID:alcampos,项目名称:graylog-plugin-alert-conditional-count,代码行数:18,代码来源:ConditionalCountAlertCondition.java

示例3: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final RedisClientConfiguration r = new RedisClientConfiguration(super.getRequestedConfiguration());
    r.addField(new TextField(
            CK_CHANNELS,
            "Channels",
            "",
            "Comma-separated list of channels to subscribe to",
            ConfigurationField.Optional.OPTIONAL));
    r.addField(new TextField(
            CK_PATTERNS,
            "Channel patterns",
            "",
            "Comma-separated list of channel patterns to subscribe to",
            ConfigurationField.Optional.OPTIONAL));

    return r;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-redis,代码行数:19,代码来源:RedisTransport.java

示例4: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest requestedConfiguration = super.getRequestedConfiguration();
    requestedConfiguration.addField(new BooleanField(
            CK_INCLUDE_SOURCE,
            "Include source information",
            true,
            "Whether to include source information (package, class, line number)."));
    requestedConfiguration.addField(new BooleanField(
            CK_INCLUDE_THREAD_CONTEXT,
            "Include thread context",
            true,
            "Whether to include the contents of the thread context."));
    requestedConfiguration.addField(new BooleanField(
            CK_INCLUDE_STACK_TRACE,
            "Include stack traces",
            true,
            "Whether to include stack traces."));
    requestedConfiguration.addField(new BooleanField(
            CK_INCLUDE_EXCEPTION_CAUSE,
            "Include exception causes",
            true,
            "Whether to include information about the exception cause."));

    return requestedConfiguration;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-internal-logs,代码行数:27,代码来源:SerializedLogEventCodec.java

示例5: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();

    configurationRequest.addField(new TextField(
                    CK_SPLUNK_HOST, "Splunk Host", "",
                    "Hostname or IP address of a Splunk instance",
                    ConfigurationField.Optional.NOT_OPTIONAL)
    );

    configurationRequest.addField(new NumberField(
                    CK_SPLUNK_PORT, "Splunk Port", 12999,
                    "Port of a Splunk instance",
                    ConfigurationField.Optional.OPTIONAL)
    );

    final Map<String, String> protocols = ImmutableMap.of("TCP", "TCP");
    configurationRequest.addField(new DropdownField(
                    CK_SPLUNK_PROTOCOL, "Splunk Protocol", "TCP", protocols,
                    "Protocol that should be used to send messages to Splunk",
                    ConfigurationField.Optional.OPTIONAL)
    );

    return configurationRequest;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-splunk,代码行数:26,代码来源:SplunkOutput.java

示例6: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields(
            new TextField("query", "Query", "", "Query that should be checked", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("backtime", "Back Time", 0, "Number of minutes to go back to the past to check the value", ConfigurationField.Optional.NOT_OPTIONAL),
            new NumberField("staytime", "Stay Time", 1, "Number of minutes of the time to stay in the past", ConfigurationField.Optional.NOT_OPTIONAL)
    );
    configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());
    return configurationRequest;
}
 
开发者ID:alcampos,项目名称:graylog-plugin-alert-condition-delorean,代码行数:11,代码来源:DeloreanAlertCondition.java

示例7: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final RedisClientConfiguration r = new RedisClientConfiguration(super.getRequestedConfiguration());
    r.addField(new TextField(CK_CHANNEL,
            "Channel",
            "",
            "Name of the channel to publish messages to",
            ConfigurationField.Optional.NOT_OPTIONAL));
    return r;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-redis,代码行数:11,代码来源:GELFRedisOutput.java

示例8: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest cr = super.getRequestedConfiguration();
    if (cr.containsField(NettyTransport.CK_PORT)) {
        cr.getField(NettyTransport.CK_PORT).setDefaultValue(5044);
    }
    return cr;
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-beats,代码行数:9,代码来源:BeatsTransport.java

示例9: getRequestedConfigurationOverridesDefaultPort

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Test
public void getRequestedConfigurationOverridesDefaultPort() throws Exception {
    final BeatsTransport.Config config = new BeatsTransport.Config();
    final ConfigurationRequest requestedConfiguration = config.getRequestedConfiguration();

    assertThat(requestedConfiguration.containsField(NettyTransport.CK_PORT)).isTrue();
    assertThat(requestedConfiguration.getField(NettyTransport.CK_PORT).getDefaultValue()).isEqualTo(5044);
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-beats,代码行数:9,代码来源:BeatsTransportConfigTest.java

示例10: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final Map<String, String> pipelineOptions = this.pipelineService.loadAll().stream()
            .sorted((o1, o2) -> o1.title().compareTo(o2.title()))
            .collect(Collectors.toMap(PipelineDao::id, PipelineDao::title));
    return new ConfigurationRequest() {{
        addField(new DropdownField(CONFIG_FIELD_PIPELINE,
                "Pipeline",
                "",
                pipelineOptions,
                "Which pipeline to use for message decoration",
                ConfigurationField.Optional.NOT_OPTIONAL));
    }};
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-pipeline-processor,代码行数:15,代码来源:PipelineProcessorMessageDecorator.java

示例11: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    ConfigurationRequest cr = new ConfigurationRequest();

    cr.addField(new TextField(
            CK_TIMEZONE,
            "Timezone",
            DateTimeZone.getDefault().getID(),
            "Timezone of the timestamps in CEF messages. Set this to the local timezone if in doubt. Format example: \"+01:00\" or \"America/Chicago\"",
            ConfigurationField.Optional.NOT_OPTIONAL
    ));
    cr.addField(new TextField(
            CK_LOCALE,
            "Locale",
            "",
            "Locale to use for parsing the timestamps of CEF messages. Set this to english if in doubt. Format example: \"en\" or \"en_US\"",
            ConfigurationField.Optional.OPTIONAL
    ));
    cr.addField(new BooleanField(
            CK_USE_FULL_NAMES,
            "Use full field names",
            false,
            "Use full field names in CEF messages (as defined in the CEF specification)"
    ));

    return cr;
}
 
开发者ID:Graylog2,项目名称:graylog-plugin-cef,代码行数:28,代码来源:CEFCodec.java

示例12: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = new ConfigurationRequest();
    final SortedMap<String, String> levels = ImmutableSortedMap
            .<String, String>orderedBy((o1, o2) -> Level.getLevel(o1).compareTo(Level.getLevel(o2)))
            .put(Level.OFF.name(), Level.OFF.name())
            .put(Level.FATAL.name(), Level.FATAL.name())
            .put(Level.ERROR.name(), Level.ERROR.name())
            .put(Level.WARN.name(), Level.WARN.name())
            .put(Level.INFO.name(), Level.INFO.name())
            .put(Level.DEBUG.name(), Level.DEBUG.name())
            .put(Level.TRACE.name(), Level.TRACE.name())
            .put(Level.ALL.name(), Level.ALL.name())
            .build();

    configurationRequest.addField(
            new DropdownField(
                    CK_LEVEL_THRESHOLD,
                    "Level threshold",
                    Level.INFO.name(),
                    levels,
                    "Defines the minimum log level for internal log messages which should be logged.",
                    ConfigurationField.Optional.NOT_OPTIONAL)
    );

    return configurationRequest;
}
 
开发者ID:graylog-labs,项目名称:graylog-plugin-internal-logs,代码行数:28,代码来源:SerializedLogEventTransport.java

示例13: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields();
    configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());

    return configurationRequest;
}
 
开发者ID:cvtienhoven,项目名称:graylog-plugin-aggregates,代码行数:8,代码来源:AggregatesAlertCondition.java

示例14: overrideDefaultValues

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public void overrideDefaultValues(@Nonnull ConfigurationRequest cr)
{
  if (cr.containsField(NettyTransport.CK_PORT))
  {
    cr.getField(NettyTransport.CK_PORT).setDefaultValue(DEFAULT_SFLOW_PORT);
  }
}
 
开发者ID:tom-saunders,项目名称:graylog-plugin-sflow-input,代码行数:9,代码来源:SFlowCodec.java

示例15: getRequestedConfiguration

import org.graylog2.plugin.configuration.ConfigurationRequest; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
    final ConfigurationRequest cr = new ConfigurationRequest();
    cr.addField(new TextField(CK_KEYSTORE_PATH,
            "Keystore Path",
            "",
            "Absolute path of JKS keystore"));
    cr.addField(new TextField(CK_KEYSTORE_PASSWORD,
            "Keystore Password",
            "",
            "-deststorepass argument in keytool",
            ConfigurationField.Optional.NOT_OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    cr.addField(new TextField(CK_KEY_PASSWORD,
            "Key Password",
            "",
            "-destkeypass argument in keytool",
            ConfigurationField.Optional.NOT_OPTIONAL,
            TextField.Attribute.IS_PASSWORD));
    cr.addField(new TextField(CK_BIND_IP,
            "Bind IP Address",
            "0.0.0.0",
            "Local IP Address to bind",
            ConfigurationField.Optional.NOT_OPTIONAL));
    cr.addField(new NumberField(CK_BIND_PORT,
            "Port",
            5043,
            "Local port to listen for events",
            ConfigurationField.Optional.NOT_OPTIONAL,
            NumberField.Attribute.IS_PORT_NUMBER));
    return cr;
}
 
开发者ID:sivasamyk,项目名称:graylog2-input-lumberjack,代码行数:33,代码来源:LumberjackTransport.java


注:本文中的org.graylog2.plugin.configuration.ConfigurationRequest类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。