Comments (12)
can we merge #151 it should be no-op for anyone who doesn't need it, would prefer not to manage my own fork
from ansible-datadog.
Actually, giving this more thought I agree with @jeffwidman, but a more important use case for us is "stacking" datadog checks. We use Ansible to configure our hosts & services, as well as Datadog. So, in each service role, we can include the Datadog role as a dependency and define the necessary checks there. For example, our HAProxy role will define checks for HAProxy, and on that same machine, we'll have a Docker role which defines other checks to be configured alongside HAProxy.
To summarize:
- Don't remove other checks automatically to allow for unmanaged checks & "stacking" checks across different roles/plays
- But, still would be nice to be able to explicitly remove checks with a
state: absent
or similar flag.
from ansible-datadog.
@olivielpeau yeah, that should do it!
from ansible-datadog.
Hi @bgerstle,
Thanks for your feedback! Indeed once a check config is not listed in datadog_checks
the role stops keeping track of the config file, so it doesn't delete it.
There are a few different things that could be done by the role to address the case you described:
- have a variable (named
datadog_disabled_checks
for instance) that would allow listing checks for which the role would make sure no configuration file is present in/etc/dd-agent/checks.d/
. This would still allow users to have check configs that are not managed by the role (as long as they're not listed in the variable, the role wouldn't touch them). - a simpler but less flexible approach would be to have a flag variable (named
datadog_disable_untracked_checks
for instance) that would make the role remove all the check configs in/etc/dd-agent/checks.d/
that are not tracked.
Any thoughts?
from ansible-datadog.
I'm into the idea of something like datadog_dsiable_untracked_checks
for hosts that aren't immutable.
from ansible-datadog.
@olivielpeau sorry for the (very) delayed response! Those options sound usable, but I'm curious what you think of either:
- Following the apparent Ansible pattern of using a
state
variable which allows users to specifystate: absent
- Removing all checks except those specified for the given host (including default checks like ntp & such)
from ansible-datadog.
I prefer the flexibility of being able to have checks that we manage outside of Ansible. For example, sometimes when I'm developing, I end up needing to sanity test checks in production and I don't want those checks removed if someone else unbeknownst to me runs the Ansible play.
from ansible-datadog.
@bgerstle Thanks for the details, so if I understand correctly with an example:
datadog_checks:
haproxy:
init_config:
[...]
instances:
[...]
docker:
state: absent
init_config:
[...]
instances:
[...]
You'd like these variables to enable the haproxy
check but explicitly disable the docker
check, correct?
from ansible-datadog.
I find it simpler to remove the checks automatically
Using additional_checksd
, unmanaged checks could be put somewhere else, right ?
from ansible-datadog.
I made a proposal with my PR. Some feedback will be greatly appreciated :)
from ansible-datadog.
This issue seems dead, but I can't find the feature yet. What's the current status?
from ansible-datadog.
Fixed by #151
from ansible-datadog.
Related Issues (20)
- Hard fail if api_key is not provided HOT 2
- Implement removal of the Agent via `state: present | absent` in the role HOT 1
- Was the "Agent on host, app in containers" possibility of injecting APM overlooked? HOT 2
- Datadog APM does not work with Ansible 2.9 HOT 2
- Install will not work if deb package was removed from apt prior HOT 1
- Can a oom_kill_enabled option be added to config options? HOT 2
- windows install broken due to recent changes (fix proposed) HOT 1
- Improve the version check on Windows and avoid slow idempotency. HOT 2
- Mode 600 will set incorrect permissions on files. HOT 3
- Datadog Agent Installation Fails on `arm64` (M1) Mac Without Rosetta HOT 1
- Role is pulling in 7.28 as the stable version HOT 2
- Add support for Amazon Linux 2023 HOT 2
- A shell and a home folder HOT 2
- Add proxy usage for Windows agent install HOT 3
- The generated integration configs don't honor the order set in the playbook HOT 2
- Error when installing the datadog agent - Exception calling \"CreateProcess\" with \"7\" argument(s): \"CreateProcessW() failed (%1 is not a valid Win32 application, Win32ErrorCode 193 - 0x000000C1)\" HOT 1
- 4.21+ role version fails Molecule idempotency check on Windows HOT 1
- Password leaks in logs for datadog_windows_ddagentuser_password HOT 3
- Role not compatible with Ansible versions higher than v6.7.0 HOT 1
- Unable to find package datadog-agent available for amazon linux 2023 for ansible galaxy installation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-datadog.