@cryptotaxi247 / netdata-1 / commits / 28dceff98

log all host configuration when a host is created

Costa Tsaousis (ktsaou) committed Feb 25, 2017 at 00:55 UTC 28dceff98d42a960d611ec02d78b0a4e28950ec6
1 file changed +15 -2
src/rrdhost.c
+15 -2
@@ -150,7 +150,7 @@ RRDHOST *rrdhost_create(const char *hostname,
150 }
151
152 snprintfz(filename, FILENAME_MAX, "%s/health/health-log.db", host->varlib_dir);
153 - host->health_log_filename = strdupz(config_get(CONFIG_SECTION_HEALTH, "health db file", filename));
153 + host->health_log_filename = strdupz(filename);
154
155 snprintfz(filename, FILENAME_MAX, "%s/alarm-notify.sh", netdata_configured_plugins_dir);
156 host->health_default_exec = strdupz(config_get(CONFIG_SECTION_HEALTH, "script to execute on alarm", filename));
@@ -192,16 +192,29 @@ RRDHOST *rrdhost_create(const char *hostname,
192
193 rrd_unlock();
194
195 - info("Host '%s' with guid '%s' initialized, update every: %d, memory mode: %s, streaming: %s, health: %s, cache_dir: '%s', varlib_dir: '%s', health_log: '%s'"
195 + info("Host '%s' with guid '%s' initialized"
196 + ", update every: %d"
197 + ", memory mode: %s"
198 + ", history entries: %d"
199 + ", streaming: %s"
200 + ", health: %s"
201 + ", cache_dir: '%s'"
202 + ", varlib_dir: '%s'"
203 + ", health_log: '%s'"
204 + ", alarms default handler: '%s'"
205 + ", alarms default recipient: '%s'"
206 , host->hostname
207 , host->machine_guid
208 , host->rrd_update_every
209 , rrd_memory_mode_name(host->rrd_memory_mode)
210 + , host->rrd_history_entries
211 , host->rrdpush_enabled?"enabled: ":"disabled"
212 , host->health_enabled?"enabled":"disabled"
213 , host->cache_dir
214 , host->varlib_dir
215 , host->health_log_filename
216 + , host->health_default_exec
217 + , host->health_default_recipient
218 );
219 return host;
220 }