Last active
November 14, 2018 14:14
-
-
Save tomyan/c0460e8bd77ca5b32728cd87b8ed79c8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ docker pull datadog/agent:latest | |
| latest: Pulling from datadog/agent | |
| Digest: sha256:c47fd9b4eda5fab58835c2dcf6dd6590b69972c9398a6eab84fef0858a6e2e2c | |
| Status: Image is up to date for datadog/agent:latest | |
| $ docker build -t dd . && docker run --rm --name tomtest -h tomtest -e DD_API_KEY=<key> dd | grep hello | |
| Sending build context to Docker daemon 4.096kB | |
| Step 1/3 : FROM datadog/agent:latest | |
| ---> aa7ad467af17 | |
| Step 2/3 : ADD hello.yaml /etc/datadog-agent/conf.d/hello.yaml | |
| ---> Using cache | |
| ---> 04e482b3c333 | |
| Step 3/3 : ADD hello.py /etc/datadog-agent/checks.d/hello.py | |
| ---> Using cache | |
| ---> 2e98ff9f87e5 | |
| Successfully built 2e98ff9f87e5 | |
| Successfully tagged dd:latest | |
| [ AGENT ] 2018-11-08 15:22:12 UTC | WARN | (file.go:180 in collectEntry) | /etc/datadog-agent/conf.d/hello.yaml is not a valid config file: Configuration file contains no valid instances |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM datadog/agent:latest | |
| ADD hello.yaml /etc/datadog-agent/conf.d/hello.yaml | |
| ADD hello.py /etc/datadog-agent/checks.d/hello.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __version__ = "1.0.0" | |
| from checks import AgentCheck | |
| class HelloCheck(AgentCheck): | |
| def check(self, instance): | |
| self.gauge('hello.world', 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| instances: [{}] | |
| init_config: | |
| instances: | |
| - min_collection_interval: 30 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment