Understanding ZooKeeper Configurations

ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services.

ZooKeeper configurations should be stored on disk in the following structure starting at $METRON_HOME/bin/zk_load_configs.sh:


The global config


The subdirectory containing the sensor enrichment configuration JSON (for example, snort.json or bro.json

By default, the sensors directory as deployed by the Ansible infrastructure is located at $METRON_HOME/config/zookeeper.

Although the configurations are stored on disk, they must be loaded into ZooKeeper to be used. You can use the utility program $METRON_HOME/bin/zk_load_config.sh to load configurations into ZooKeeper.


Force operation


Generate Help screen

-i,--input_dir <DIR>

The input directory containing the configuration files named, for example $source.json

-m,--mode <MODE>

The mode of operation: DUMP, PULL, PUSH

-o,--output_dir <DIR>

The output directory that stores the JSON configuration from ZooKeeper

-z,--zk_quorum <host:port,[host:port]*>

The ZooKeeper Quorum URL (zk1:port,zk2:port,...)

See the following list for examples of usage: Usage examples:

  • To dump the existing configs from ZooKeeper on the single-ode vagrant machine:

    $METRON_HOME/bin/zk_load_configs.sh -z node1:2181 -m DUMP

  • To push the configs into ZooKeeper on the single-ode vagrant machine:

    $METRON_HOME/bin/zk_load_configs.sh -z node1:2181 -m PUSH -i $METRON_HOME/config/zookeeper

  • To pull the configs from ZooKeeper to the single node vagrant machine disk:

    $METRON_HOME/bin/zk_load_configs.sh -z node1:2181 -m PULL -o $METRON_HOME/config/zookeeper -f