Specifying Index Parameters Using the CLI
To specify the parameters for the writers rather than using the default values, you
can use the following syntax in the Indexing Configuration file, located at
$METRON_HOME/config/zookeeper/indexing
.
Create the Indexing Configuration file at
$METRON_HOME/config/zookeeper/indexing
.touch /$METRON_HOME/config/zookeeper/indexing/index.json
Populate the
$sensor_name.json
file with index configuration information for each of your sensors, using syntax similar to the following:{ "elasticsearch": { "index": "foo", "batchSize" : 100, "enabled" : true }, "hdfs": { "index": "foo", "batchSize": 1, "enabled" : true } }
This syntax specifies the following parameter values:
Elasticsearch writer or index
index name of "foo"
batch size of 100
enabled
HDFS writer or index
index name of "foo"
batch size of 1
enabled
Push the configuration to ZooKeeper:
/usr/metron/$METRON_VERSION/bin/zk_load_configs.sh --mode PUSH -i /usr/metron/$METRON_VERSION/config/zookeeper -z $ZOOKEEPER_HOST:2181