Renamed configuration for monitoring

This commit is contained in:
Jesús Ángel 2018-08-23 10:40:01 +02:00
parent 665fe90841
commit 27b6b78f8d
2 changed files with 8 additions and 7 deletions

View File

@ -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 ---------------------------
#
@ -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

View File

@ -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: {