Creating Global Configurations
To configure a global configuration file, create a file called
global.jsonat$METRON_HOME/config/zookeeper.Using the following format, populate the file with enrichment values that you want to apply to all sensors:
{ "es.clustername": "metron", "es.ip": "node1", "es.port": "9300", "es.date.format": "yyyy.MM.dd.HH", "fieldValidations" : [ { "input" : [ "ip_src_addr", "ip_dst_addr" ], "validation" : "IP", "config" : { "type" : "IPV4" } } ] }es.ipA single or collection of elastic search master nodes.
They might be specified using the
hostname:portsyntax. If a port is not specified, then a separate global propertyes.portis required:Example:
es.ip: [ “10.0.0.1:1234”, “10.0.0.2:1234”]Example:
es.ip: “10.0.0.1” (thus requiringes.portto be specified as well)Example:
es.ip: “10.0.0.1:1234” (thus not requiringes.portto be specified)
es.portThe port of the elastic search master node.
This is not strictly required if the port is specified in the
es.ip globalproperty as described above. It is expected that this be an integer or a string representation of an integer.Example:
es.port: “1234"Example:
es.port: 1234
es.clusternameThe elastic search cluster name to which you want to write.
Example:
es.clustername: “metron” (providing your ES cluster is configured to have metron be a valid cluster name)
es.date.formatThe format of the date that specifies how the information is parsed time-wise.
For example:
es.date.format: “yyyy.MM.dd.HH” (this would shard by hour creating, for example, a Bro shard of bro_2016.01.01.01, bro_2016.01.01.02, etc.)es.date.format: “yyyy.MM.dd” (this would shard by day, creating, for example, a Bro shard of bro_2016.01.01, bro_2016.01.02, etc.)
fieldValidationsA validation framework that enables you to construct validation rules that cross all sensors.
The
fieldValidationsenrichment value use validation plugins or assertions about fields or whole messagesinputAn array of input fields or a single field. If this is omitted, then the whole messages is passed to the validator.
configA String to Object map for validation configuration. This is optional if the validation function requires no configuration.
validationThe validation function to be used. This is one of the following:
STELLARExecute a Stellar Language statement. Expects the query string in the
conditionfield of the config.IPValidates that the input fields are an IP address. By default, if no configuration is set, it assumes IPV4, but you can specify the type by passing in type with either
IPV6orIPV4or by passing in a list [IPV4,IPV6] in which case the input is validated against both.DOMAINValidates that the fields are all domains.
EMAILValidates that the fields are all email addresses.
URLValidates that the fields are all URLs.
DATEValidates that the fields are a date. Expects
formatin the configuration.INTEGERValidates that the fields are an integer. String representation of an integer is allowed.
REGEX_MATCHValidates that the fields match a regex. Expects
patternin the configuration.NOT_EMPTYValidates that the fields exist and are not empty (after trimming.)

