diff options
author | Stelios Fragkakis <52996999+stelfrag@users.noreply.github.com> | 2020-07-28 15:04:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-28 15:04:39 +0300 |
commit | eda12f579f97b123ef9b890b01528223a89a70aa (patch) | |
tree | 49fe4fd2adbf7fac9ef0f0e959d767ec4daa7849 /collectors/plugins.d | |
parent | 3d4314bc4ded8ce68385665754fb3b2134906422 (diff) |
Implemented multihost database (#9556)
* Hard code a node for non-legacy multidb test
Skip dbengine initialization for new incoming children
Add code to switch to multidb ctx when accessing the dbengine
* When a non-legacy streaming connection is detected, use the multidb metadata log context
* Clear the superblock memory to avoid random data written in the metadata log
* Activate the host detection during compaction
Activate the host detection during metadata log chart updates
Keep the host in the user object during replay of the HOST command
* Add defaults for health / rrdpush on HOST metadata replay
Check for legacy status on host creation by checking is_archived and if not conclusive, call is_legacy_child()
Use defaults from the stream.conf
* Count hosts only if not archived
When host switches from archived to active update rrd_hosts_available
Remove archived hosts from charts and info
* Change parameter from "multidb disk space" to "dbengine multihost disk space"
Remove unused variables
Fix compilation error when dbengine is disabled
Fix condition for machine_guid directory creation under cache_dir
* Enable multidb disk space file creation.
* Stop deleting dimensions when rotating archived metrics if the dimension is active in a different database engine.
* Fix old bug in the code that confused obsolete hosts with orphan hosts.
* Do not delete multi-host DB host files.
* Discard dbengine state when a legacy memory mode instantiates to avoid inconsistencies.
* Identify metadata that collide with non-dbengine memory mode hosts and ignore them.
* Handle non-dbengine localhost with dbengine archived charts in localhost and streaming.
* Ignore archived hosts in streaming.
* Add documentation before merging to master.
Co-authored-by: Markos Fountoulakis <markos.fountoulakis.senior@gmail.com>
Diffstat (limited to 'collectors/plugins.d')
-rw-r--r-- | collectors/plugins.d/pluginsd_parser.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index c05ddd17d7..2b759869c1 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -274,6 +274,10 @@ PARSER_RC pluginsd_end(char **words, void *user, PLUGINSD_ACTION *plugins_actio PARSER_RC pluginsd_chart(char **words, void *user, PLUGINSD_ACTION *plugins_action) { RRDHOST *host = ((PARSER_USER_OBJECT *) user)->host; + if (unlikely(!host)) { + debug(D_PLUGINSD, "Ignoring chart belonging to missing or ignored host."); + return PARSER_RC_OK; + } char *type = words[1]; char *name = words[2]; @@ -371,6 +375,10 @@ PARSER_RC pluginsd_dimension(char **words, void *user, PLUGINSD_ACTION *plugins RRDSET *st = ((PARSER_USER_OBJECT *) user)->st; RRDHOST *host = ((PARSER_USER_OBJECT *) user)->host; + if (unlikely(!host)) { + debug(D_PLUGINSD, "Ignoring dimension belonging to missing or ignored host."); + return PARSER_RC_OK; + } if (unlikely(!id)) { error( |