Skipping old wazuh-monitoring pattern for refreshing fields and declaring missing id for reach api function

This commit is contained in:
Jesús Ángel González 2018-04-16 17:27:34 +02:00 committed by Jesús Ángel
parent 1ae0da99fe
commit 86287dc8ad

View File

@ -121,6 +121,7 @@ module.exports = (server, options) => {
}
for(const item of list){
if(item.title.includes('wazuh-monitoring-*') || item.id.includes('wazuh-monitoring-*')) continue;
log('[initialize][checkKnownFields]', `Refreshing known fields for "index-pattern:${item.title}"`,'info')
server.log([blueWazuh, 'initialize', 'info'], `Refreshing known fields for "index-pattern:${item.title}"`);
await wzWrapper.updateIndexPatternKnownFields('index-pattern:' + item.id);
@ -534,8 +535,9 @@ module.exports = (server, options) => {
const reachAPI = async config => {
try {
const id = config._id;
config = config._source;
config.id = id;
log('[initialize][reachAPI]', `Reaching ${config.manager}`,'info')
server.log([blueWazuh, 'reindex', 'info'], `Reaching ${config.manager}`);