Added more logs to monitoring.js

This commit is contained in:
Jesús Ángel González 2018-03-19 15:11:36 +01:00
parent cd8d7e0aaa
commit 2804e440e1
2 changed files with 8 additions and 1 deletions

View File

@ -38,6 +38,10 @@ All notable changes to the Wazuh app project will be documented in this file.
- There's a new route, `/get-list`, to fetch the index pattern list.
- We've removed and changes several functions for a proper management of index-patterns.
- We've improved the compatibility with user-created index-patterns, known to have unpredictable IDs.
- **Improvements to monitoring module** ([#322](https://github.com/wazuh/wazuh-kibana-app/pull/322)):
- We don't need the monitoring template insertion step anymore.
- Minor refactor to the whole module.
- Regenerate the index pattern if it's missing.
- Now the app healthcheck system only checks if the API and app **have the same `major.minor` version** ([#311](https://github.com/wazuh/wazuh-kibana-app/pull/311)):
- Previously, the API and app had to be on the same `major.minor.patch` version.
- Adjusted space between title and value in some cards showing Manager or Agent configurations ([#315](https://github.com/wazuh/wazuh-kibana-app/pull/315)).

View File

@ -345,14 +345,17 @@ module.exports = (server, options) => {
const checkTemplate = async () => {
try {
log('monitoring.js checkTemplate', 'Updating wazuh-monitoring template...', 'info');
server.log([blueWazuh, 'monitoring', 'info'], "Updating wazuh-monitoring template...");
const monitoringTemplate = require('./integration-files/monitoring-template');
const data = await elasticRequest.callWithInternalUser('indices.putTemplate', {
name : 'wazuh-agent',
body : monitoringTemplate
});
console.log(data);
return;
} catch(error){
log('monitoring.js checkTemplate', 'Something went wrong updating wazuh-monitoring template...' + error.message || error);
server.log([blueWazuh, 'monitoring', 'info'], "Something went wrong updating wazuh-monitoring template..." + error.message || error);
return Promise.reject(error);
}
}