Closed mzac closed 2 years ago
Hello,
what are the custom vars for?
Best, A/K
@Al2Klimov We use vars in our dependencies so we are able to delete old ones as we update our Icinga instance every 2 hours and we have multiple CMDB sources to poll.
When we insert the dependency, the vars contain the CMDB source, the device type and the time it we added. When the script re-runs it updates this information and then deletes any dependencies that don't match the new timestamp.
This is an example from one of our Perl scripts on how we delete old entries:
# --------------------------------------------------------------------------------
# Delete old dependencies
my %json_delete_data_dependency = (
'filter' => "match(\"". $icinga_device_type ."\",dependency.vars.device_type) && match(\"". $database_source ."\",dependency.vars.database_source) && !match(\"". $datestring ."\",dependency.vars.database_run)",
);
my $delete_data_dependency = encode_json(\%json_delete_data_dependency);
$delete_client->POST("$icinga_rest_base_url/dependencies\?cascade=1", $delete_data_dependency);
Describe the bug
Icingadb daemon is crashing on start
To Reproduce
Apply custom vars to dependencies is what I'm guessing is crashing it
Expected behavior
It should not crash and should accept custom vars in dependencies
Your Environment
Include as many relevant details about the environment you experienced the problem in
Additional context
An example of a decency we add via the API: