本文整理汇总了Java中org.graylog2.plugin.configuration.fields.BooleanField类的典型用法代码示例。如果您正苦于以下问题:Java BooleanField类的具体用法?Java BooleanField怎么用?Java BooleanField使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
BooleanField类属于org.graylog2.plugin.configuration.fields包,在下文中一共展示了BooleanField类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的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;
}
示例2: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的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;
}
示例3: createSlackMessageOutputConfigurationRequest
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
public static ConfigurationRequest createSlackMessageOutputConfigurationRequest() {
final ConfigurationRequest configurationRequest = createSlackAlarmCallbackConfigurationRequest();
configurationRequest.addField(new BooleanField(
SlackConfiguration.CK_SHORT_MODE, "Short mode", false,
"Enable short mode? This strips down the Slack message to the bare minimum to take less space in the chat room. " +
"Not used in alarm callback but only in the message output module.")
);
return configurationRequest;
}
示例4: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest configurationRequest = new ConfigurationRequest();
configurationRequest.addField(new TextField(
CK_API_TOKEN, "Room Token", "", "HipChat room token",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_ROOM, "Room", "", "ID or name of HipChat room",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new DropdownField(
CK_COLOR, "Color", "yellow", VALID_COLORS,
"Background color for message", ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new BooleanField(
CK_NOTIFY, "Notify", true, "Whether this message should trigger a user notification."));
configurationRequest.addField(new TextField(
CK_API_URL, "HipChat API URL", "https://api.hipchat.com",
"Specify different API URL for self hosted HipChat", ConfigurationField.Optional.OPTIONAL));
configurationRequest.addField(new TextField(
CK_GRAYLOG_BASE_URL, "Graylog Base URL", "",
"Graylog base URL for linking to the stream (e.g. https://your.graylogserver.com).", ConfigurationField.Optional.OPTIONAL));
configurationRequest.addField(new TextField(
CK_MESSAGE_TEMPLATE, "Message Template", "",
"Custom message template (same as email templates).", ConfigurationField.Optional.OPTIONAL, TextField.Attribute.TEXTAREA));
return configurationRequest;
}
示例5: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
ConfigurationRequest configurationRequest = new ConfigurationRequest();
Map<String, String> formats = ImmutableMap.of("csv", "CSV", "tsv", "TSV", "pipe", "Pipe", "space", "Space");
configurationRequest.addField(new DropdownField(
"fileformat", "File Format", "csv", formats,
"The file format that should be used to write messages to disk.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField("filepath", "File Path", DEFAULTPATH,
"File path to write messages to. Available substitution variables are $HOST, $NODE, $EPOCH, $PID, $THREAD, $ROTATE, $PADDED.", ConfigurationField.Optional.NOT_OPTIONAL));
configurationRequest.addField(new TextField("fields", "Fields", DEFAULTFIELDS, "Comma separated fields to export.", ConfigurationField.Optional.NOT_OPTIONAL, TextField.Attribute.TEXTAREA));
Map<String, String> endlines = ImmutableMap.of("newline", "Newline", "crlf", "CRLF");
configurationRequest.addField(new DropdownField(
"endline", "End of Line", "newline", endlines,
"The special characters used by systems to represent end of line.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
Map<String, String> compresslist = ImmutableMap.of("none", "None", "gzip", "GZIP", "gzip_fast", "GZIP Fastest", "gzip_max", "GZIP Max Compression");
configurationRequest.addField(new DropdownField(
"compress", "Compression Options", "none", compresslist,
"Optionally compress the file in realtime.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
Map<String, String> strategies = ImmutableMap.of("interval", "Interval", "count", "Count");
configurationRequest.addField(new DropdownField(
"strategy", "Rotation Strategy", "interval", strategies,
"How the output filename will change to prevent unlimited growth.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new NumberField("rotateinterval", "Rotate Counter", DEFAULTROTATEINT, "Seconds or line count until file rotation, depending on selected strategy. Disable by setting to zero.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));
configurationRequest.addField(new TextField("filedone", "Append Extension", DEFAULTDONE, "Append file with extension when rotating.", ConfigurationField.Optional.OPTIONAL));
configurationRequest.addField(new NumberField("buffersize", "Buffer Size", DEFAULTBUFFER, "Write buffer in bytes. Must be greater than zero, multiple of 1024 recommended.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));
configurationRequest.addField(new NumberField("flushinterval", "Flush Interval", DEFAULTINTERVAL, "Seconds to flush write buffer. Disable by setting to zero.", ConfigurationField.Optional.NOT_OPTIONAL, NumberField.Attribute.ONLY_POSITIVE));
configurationRequest.addField(new BooleanField("debug", "Debug", false, "Enable debugging to troubleshoot file writes."));
return configurationRequest;
}
开发者ID:rswestmoreland,项目名称:graylog-delimited-file-output-plugin,代码行数:47,代码来源:DelimitedFileOutput.java
示例6: RedisClientConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
RedisClientConfiguration(Iterable<ConfigurationField> fields) {
addFields(
ImmutableList.<ConfigurationField>builder()
.addAll(fields)
.add(new TextField(CK_REDIS_URI,
"Redis URI",
"redis://localhost",
"URI of the Redis server: redis://[[email protected]]host[:port][/databaseNumber]",
ConfigurationField.Optional.NOT_OPTIONAL))
.add(new NumberField(CK_TIMEOUT,
"Timeout (s)",
60,
"Timeout for the Redis client in seconds",
ConfigurationField.Optional.NOT_OPTIONAL))
.add(new NumberField(CK_THREADS_IO,
"I/O threads",
Math.max(DefaultClientResources.MIN_IO_THREADS, DefaultClientResources.DEFAULT_IO_THREADS),
"Number of I/O threads",
ConfigurationField.Optional.OPTIONAL,
NumberField.Attribute.ONLY_POSITIVE))
.add(new NumberField(CK_THREADS_COMPUTATION,
"Computation threads",
Math.max(DefaultClientResources.MIN_COMPUTATION_THREADS, DefaultClientResources.DEFAULT_COMPUTATION_THREADS),
"Number of computation threads",
ConfigurationField.Optional.OPTIONAL,
NumberField.Attribute.ONLY_POSITIVE))
.add(new NumberField(CK_REQUEST_QUEUE_SIZE,
"Request queue size",
ClientOptions.DEFAULT_REQUEST_QUEUE_SIZE,
"Request queue size per connection",
ConfigurationField.Optional.OPTIONAL,
NumberField.Attribute.ONLY_POSITIVE))
.add(new BooleanField(CK_AUTO_RECONNECT,
"Automatic reconnect",
ClientOptions.DEFAULT_AUTO_RECONNECT,
"Try to reconnect and re-issue any queued commands if connection was involuntarily closed"))
.add(new BooleanField(CK_PING_BEFORE_ACTIVATE_CONNECTION,
"Ping before use",
ClientOptions.DEFAULT_PING_BEFORE_ACTIVATE_CONNECTION,
"Enable initial PING barrier before any connection is usable"))
.build()
);
}
示例7: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest configurationRequest = new ConfigurationRequest();
configurationRequest.addField(new TextField(
CK_URL,
"URL of metrics endpoint",
"graphite://localhost:2003",
"URL of your Graphite/Ganglia/StatsD instance",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_PREFIX,
"Prefix for metric names",
"org.graylog",
"Metric name will be 'prefix + field name'.",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_FIELDS,
"Message fields to submit to the metrics store",
"response_time,db_time,view_time",
"A comma separated list of message field names that should be transmitted as gauge values." +
"Types like counter, meter, histogram can be set like: cache_hit:counter",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new NumberField(
CK_RUN_RATE,
"Submission frequency (seconds)",
30,
"The period (in seconds) at which Graylog will submit metrics to the endpoint. " +
"Keep this number high to not flood the metrics store.",
ConfigurationField.Optional.NOT_OPTIONAL,
NumberField.Attribute.ONLY_POSITIVE)
);
configurationRequest.addField(new TextField(
CK_INCLUDE_FIELD_VALUE,
"Append the value of the given field to the end of the metric name.",
"",
"Metric name will be 'prefix + field name + value of another field'.",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new BooleanField(
CK_INCLUDE_SOURCE,
"Include message source in metric name",
false,
"Metric name will be 'prefix + source + field name'.")
);
configurationRequest.addField(new BooleanField(
CK_INCLUDE_TYPE,
"Include field type in metric name",
false,
"Metric name will be 'prefix + field name + type'.")
);
return configurationRequest;
}
示例8: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration()
{
final ConfigurationRequest configurationRequest = new ConfigurationRequest();
configurationRequest.addField(new TextField
(
DF_SCRIPT_ENGINE
,
"Script Engine"
,
"javascript"
,
"Specify the name of the script engine to use."
,
ConfigurationField.Optional.NOT_OPTIONAL
)
);
configurationRequest.addField(new TextField
(
DF_SCRIPT_PATH_AND_NAME
,
"Script Path"
,
"/opt/graylog2/plugin/bizDfchMessageOutputScript.js"
,
"Specify the full path and name of the script to execute."
,
ConfigurationField.Optional.NOT_OPTIONAL
)
);
configurationRequest.addField(new BooleanField
(
DF_DISPLAY_SCRIPT_OUTPUT
,
"Show script output"
,
false
,
"Show the script output on the console."
)
);
configurationRequest.addField(new BooleanField
(
DF_SCRIPT_CACHE_CONTENTS
,
"Cache script contents"
,
true
,
"Cache the contents of the script upon plugin initialisation."
)
);
return configurationRequest;
}
示例9: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration()
{
final ConfigurationRequest configurationRequest = new ConfigurationRequest();
configurationRequest.addField(new TextField(
CONFIG_AUTH_TOKEN, "Clickatell AuthToken", "",
"AuthenticationToken for the Clickatell REST API",
ConfigurationField.Optional.NOT_OPTIONAL,
TextField.Attribute.IS_PASSWORD)
);
configurationRequest.addField(new TextField(
CONFIG_RECIPIENTS, "Recipients of short message", "",
"Comma separated list of number in international format, eg 27999112345. No '00', ' ', '+' or '-', just numbers",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new BooleanField(
CONFIG_RESULT_DESCRIPTION, "Include result description in short message", true,
"Set to true to include result description in short message, or set to false to omit result description.")
);
configurationRequest.addField(new TextField(
CONFIG_FIELDS, "Fields to send in short message", "",
"Comma separated list of fields to send as message text, eg <message>, <id>, <timestamp>, <source>, <stream> or user defined fields. Built-in fields have to be surrounded by '<>'",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new BooleanField(
CONFIG_INCLUDE_FIELD_NAMES, "Include field names in short message", true,
"Set to true to include field names in short message, or set to false to omit field names and only send field contents.")
);
configurationRequest.addField(new NumberField(
CONFIG_MAX_LENGTH, "MaxLength", 0,
"Maximum length of short message",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new NumberField(
CONFIG_MAX_CREDITS, "MaxCredits", 0,
"Maximum credits to spend on a short message",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new NumberField(
CONFIG_MAX_PARTS, "MaxParts", 0,
"Maximum number of parts a short message can consist of",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new TextField(
CONFIG_STATIC_TEXT, "Static text that prepends the short message", "",
"You can optionally define a phrase that will be sent with every short message.",
ConfigurationField.Optional.OPTIONAL)
);
return configurationRequest;
}
示例10: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest cr = new ConfigurationRequest();
cr.addField(new TextField(CK_RECIPIENT,
"Recipient",
"[email protected]",
"Recipient of Jabber messages",
ConfigurationField.Optional.NOT_OPTIONAL));
cr.addField(new TextField(CK_HOSTNAME,
"Hostname",
"localhost",
"Hostname of Jabber server",
ConfigurationField.Optional.NOT_OPTIONAL));
cr.addField(new NumberField(CK_PORT,
"Port",
5222,
"Port of Jabber server",
ConfigurationField.Optional.NOT_OPTIONAL));
cr.addField(new BooleanField(CK_REQUIRE_SECURITY,
"Require SSL/TLS?",
false,
"Force encryption for the server connection?"));
cr.addField(new BooleanField(CK_ACCEPT_SELFSIGNED,
"Accept self-signed certificates?",
false,
"Do not enforce full validation of the certificate chain"));
cr.addField(new TextField(CK_USERNAME,
"Username",
"jabberuser",
"Username to connect with",
ConfigurationField.Optional.NOT_OPTIONAL));
cr.addField(new TextField(CK_PASSWORD,
"Password",
"",
"Password to connect with",
ConfigurationField.Optional.NOT_OPTIONAL,
TextField.Attribute.IS_PASSWORD));
cr.addField(new TextField(CK_SERVICE_NAME,
"Service Name",
"",
"The service name of the server (hostname used if not present)",
ConfigurationField.Optional.OPTIONAL));
return cr;
}
示例11: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest configurationRequest = new ConfigurationRequest();
configurationRequest.addField(new TextField(
CK_RUNDECK_URL,
"Rundeck URL",
"",
"URL to your Rundeck installation",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_API_TOKEN,
"API Token",
"",
"Rundeck API authentication token",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_JOB_ID,
"Job ID",
"",
"ID of the Rundeck job to trigger in case of an alert",
ConfigurationField.Optional.NOT_OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_AS_USER,
"As User",
"",
"Username who ran the job. Requires 'runAs' permission",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_FILTER_INCLUDE,
"Include Node filter",
"",
"Run job on these nodes. Format is 'filter:value&filter:value'. Filter can be" +
" 'name', 'hostname', 'tags' or 'os-[name,family,arch,version]'",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_FILTER_EXCLUDE,
"Exclude Node filter",
"",
"Exclude these nodes from job execution. Format is 'filter:value&filter:value'. Filter can be" +
" 'name', 'hostname', 'tags' or 'os-[name,family,arch,version]'",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new BooleanField(
CK_FILTER_EXCLUDE_PRECEDENCE, "Exclude precedence", true,
"Whether exclusion filters take precedence")
);
configurationRequest.addField(new TextField(
CK_ARGS, "Job arguments", "",
"Argument string to pass to the job, of the form: 'key:value&key:value'",
ConfigurationField.Optional.OPTIONAL)
);
configurationRequest.addField(new TextField(
CK_FIELD_ARGS, "Field arguments", "",
"Comma separated list of message fields which should append as a argument to the job.",
ConfigurationField.Optional.OPTIONAL)
);
return configurationRequest;
}
示例12: getRequestedConfiguration
import org.graylog2.plugin.configuration.fields.BooleanField; //导入依赖的package包/类
@Override
public ConfigurationRequest getRequestedConfiguration() {
final ConfigurationRequest request = super.getRequestedConfiguration();
request.addField(
new TextField(
CK_MONGO_HOST,
"MongoDB hostname",
"localhost",
"The hostname or IP address of the MongoDB instance to connect to. You can also supply comma separated hosts when using a replica set.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
request.addField(
new NumberField(
CK_MONGO_PORT,
"MongoDB port",
27017,
"Port of the MongoDB instance to connect to.",
ConfigurationField.Optional.NOT_OPTIONAL,
NumberField.Attribute.IS_PORT_NUMBER
)
);
request.addField(
new TextField(
CK_MONGO_DB,
"MongoDB database",
"",
"The name of the profiled MongoDB database.",
ConfigurationField.Optional.NOT_OPTIONAL)
);
request.addField(
new BooleanField(
CK_MONGO_USE_AUTH,
"Use authentication?",
false,
"Use MongoDB authentication?"
)
);
request.addField(
new TextField(
CK_MONGO_USER,
"MongoDB user",
"",
"MongoDB username. Only used if authentication is enabled.",
ConfigurationField.Optional.OPTIONAL)
);
request.addField(
new TextField(
CK_MONGO_PW,
"MongoDB password",
"",
"MongoDB password. Only used if authentication is enabled. Note that this is stored unencrypted",
ConfigurationField.Optional.OPTIONAL,
TextField.Attribute.IS_PASSWORD
)
);
return request;
}