本文整理汇总了Java中org.graylog2.plugin.configuration.ConfigurationRequest.createWithFields方法的典型用法代码示例。如果您正苦于以下问题:Java ConfigurationRequest.createWithFields方法的具体用法?Java ConfigurationRequest.createWithFields怎么用?Java ConfigurationRequest.createWithFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.graylog2.plugin.configuration.ConfigurationRequest
的用法示例。
在下文中一共展示了ConfigurationRequest.createWithFields方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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
示例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("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
示例3: getRequestedConfiguration
import org.graylog2.plugin.configuration.ConfigurationRequest; //导入方法依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest configurationRequest = ConfigurationRequest.createWithFields();
configurationRequest.addFields(AbstractAlertCondition.getDefaultConfigurationFields());
return configurationRequest;
}