Hortonworks Cybersecurity Platform
Also available as:
PDF
loading table of contents...

Specify Index Parameters by 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. Note that any properties managed by Apache Ambari must be modified within Ambari to persist.

  1. Create the Indexing Configuration file at $METRON_HOME/config/zookeeper/indexing:
    touch /$METRON_HOME/config/zookeeper/indexing/$sensor_name.json
  2. Populate the $sensor_name.json file with index configuration information for each of your sensors, using syntax similar to the following:
    {
       "solr": {
          "index": "foo",
          "batchSize" : 100,
          "enabled" : true 
        },
        "elasticsearch": {
          "index": "foo",
          "batchSize" : 100,
          "enabled" : true 
        },
       "hdfs": {
          "index": "foo",
          "batchSize": 1,
          "enabled" : true
        },
        "alert": {
          "type": "nested"
    }
    This syntax specifies the following parameter values:
    • Solr writer or index
      • index name of "foo"
      • batch size of 100
      • enabled
    • 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
    • alert
      You must set this field to:
      "type": "nested"
  3. 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