Skip to content

Commit

Permalink
Renamed configuration for monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesús Ángel committed Aug 24, 2018
1 parent 02dda7f commit 4308fb5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,11 @@
#
# ------------------------------ Advanced indices ------------------------------
#
# Configure .wazuh, .wazuh-version, wazuh-monitoring-3.x-* indices shards and replicas.
# Configure .wazuh and .wazuh-version indices shards and replicas.
#wazuh.shards : 1
#wazuh.replicas : 1
#wazuh-version.shards : 1
#wazuh-version.replicas: 1
#wazuh-monitoring.shards: 5
#wazuh-monitoring.replicas: 1
#
# --------------------------- Index pattern selector ---------------------------
#
Expand Down Expand Up @@ -90,3 +88,6 @@
# Default: 3600 (s)
#wazuh.monitoring.frequency: 3600
#
# Configure wazuh-monitoring-3.x-* indices shards and replicas.
#wazuh.monitoring.shards: 5
#wazuh.monitoring.replicas: 1
8 changes: 4 additions & 4 deletions server/monitoring.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ export default (server, options) => {
if(!ENABLED) return;
const configFile = getConfiguration();

const shards = configFile && typeof configFile["wazuh-monitoring.shards"] !== 'undefined' ?
configFile["wazuh-monitoring.shards"] : 5;
const shards = configFile && typeof configFile['wazuh.monitoring.shards'] !== 'undefined' ?
configFile['wazuh.monitoring.shards'] : 5;

const replicas = configFile && typeof configFile["wazuh-monitoring.replicas"] !== 'undefined' ?
configFile["wazuh-monitoring.replicas"] : 1;
const replicas = configFile && typeof configFile['wazuh.monitoring.replicas'] !== 'undefined' ?
configFile['wazuh.monitoring.replicas'] : 1;

const configuration = {
settings: {
Expand Down

0 comments on commit 4308fb5

Please sign in to comment.