Fixed extra space in regex

This commit is contained in:
Jesús Ángel González Novez 2017-11-09 16:58:41 +01:00
parent aafe3ee01e
commit 5640fd92b5

View File

@ -15,7 +15,7 @@ module.exports = (server, options) => {
let agentsArray = [];
let index_pattern = "wazuh-monitoring-*";
let index_prefix = "wazuh-monitoring-";
let fDate = new Date().toISOString().replace(/T/, '-').replace(/\..+/, '').replace(/-/g, '.').replace(/: /g, '').slice(0, -7);
let fDate = new Date().toISOString().replace(/T/, '-').replace(/\..+/, '').replace(/-/g, '.').replace(/:/g, '').slice(0, -7);
let todayIndex = index_prefix + fDate;
let packageJSON = {};
@ -220,7 +220,7 @@ module.exports = (server, options) => {
// Save agent status into elasticsearch, create index and/or insert document
const saveStatus = () => {
fDate = new Date().toISOString().replace(/T/, '-').replace(/\..+/, '').replace(/-/g, '.').replace(/: /g, '').slice(0, -7);
fDate = new Date().toISOString().replace(/T/, '-').replace(/\..+/, '').replace(/-/g, '.').replace(/:/g, '').slice(0, -7);
todayIndex = index_prefix + fDate;
elasticRequest