-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
datadog_disable_untracked_checks: true should be the default behavior and is too slow #464
Comments
Have a look at ansible callback plugins. https://docs.ansible.com/ansible/latest/plugins/callback.html and https://docs.ansible.com/ansible/latest/collections/index_callback.html Basicall you put [defaults]
callbacks_enabled = ansible.posix.profile_roles,ansible.posix.profile_tasks to ansible.cfg and run again. It's great. But I would suggest to don't have it active all the time. It sometimes bugs up the logs pretty hefty :D |
On the other thing: I yesterday had the idea to generate the the configs first on localhost and the rsync (ansible.posix.synchronize) the whole "package" to the hosts. So:
I will try that in the next weeks. That should speed up things imensly. Additionally I thought about package it up in a tar/zip and keep it on the remotes to md5sum it? IDK
|
Hi 👋 thanks for opening the issue and sorry for taking so long to respond. Let me try to address your problems: Problem 1I see what you mean here. If a check was configured through Ansible and then you remove its configuration, the check should be disabled. I agree that this would be a reasonable expectation. I would be worried about making this change though, because people might be counting of this to work the way it is now and any change could result in unexpected data loss for existing users. I think this would be something to address in a new major version of the role, with the following note: The question is, what happens in this case to checks configured by other means when Here's what I think we could do:
Problem 2Right, so this is an optimization issue that looks like it should be addressable; I acknowledge that this might be an issue. I'll make sure to put this on our radar and we'll see what we can do about it. |
@bkabrda any update on problem 2? It's very painful :/ Or is there maybe a workaround? |
Problem 2 (the speed issue) was solved by #584. As for Problem 1 (enabling this by default), as mentioned, changing this behavior by default would be backwards incompatible, and would thus require care with the versioning and such. I'll create a backlog card to track this but it's unlikely it will be tackled short-term. |
Originally posted by @rockaut in #366 (comment)
This flag appears to be the only way to delete conf.d entries previously configured by merge/combining into datadog_checks.
Problem 1
Expected Result: Configs are removed when running the datadog playbook
Actual Result: Defaults for datadog_disable_untracked_checks is false and therefore config is not removed, just orphaned!
Problem 2
Expected result: Relatively fast iteration through all the directories and deletion of unused checks.
Actual result: several wall time minutes on an idle linux virtual machine with 4 cores, 8GiB RAM and an Amazon gp2 filesystem.
I have verified that the filesystem operations do not take very long on the same host. What's the most effective way to get timing information to add to this bug report from ansible?
The playbook was run over a vpn connection and there is some latency for ssh so the bulk of the time is because a new ssh connection is done for each checked file rather than say batching the operation on node or similar. By default without customization there are 173 checks as of this bug being filed. Each file scp takes at least 1 second, and in my case, usually closer to 3!
This is due to the use of loop in
ansible-datadog/tasks/_agent-linux-macos-shared.yml
Line 30 in bf03a08
There are multiple ways to address this including:
The text was updated successfully, but these errors were encountered: