-
Notifications
You must be signed in to change notification settings - Fork 813
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
[elastic] improve hostname resolution #2696
Conversation
be21655
to
80d3fdd
Compare
LGTM! I'm not familiar with Amazon Elasticsearch, do you know if they set the node For reference the node name can be changed in ES' configuration with the |
What do you mean by "sensible" ? Indeed, from what I have seen, the default name is also a random Marvel character name. |
By "sensible" I meant "that reflects the hostname or something close/similar" Basically the check will use that name as the It's not a blocker to merge this PR, but if by default the name is still the random Marvel character, I think we should advise users of Amazon Elasticsearch to set the |
80d3fdd
to
467a1f1
Compare
Following our discussion earlier, I made the change and will likely have to update the tests too (will see what Travis reports). @olivielpeau can you take a last 👀 on it please ? |
Changes look good! To make the tests pass we should probably set an explicit |
b22fee8
to
7b8b64d
Compare
When the `cluster_stats` parameter is enabled in the user configuration, the Datadog Agent's Elasticsearch check attempts to resolve and attach with the corresponding metrics, the hostname of the different nodes. On Amazon Elasticsearch v1.5.2, the node objects returned by the `_cluster/nodes/stats?all=true` endpoint does not return this information. Instead the following keys are available: ``` root@xxxx:~# at node_stats.json| jq '.nodes[] | select(.name == "${hostname}") | keys [ "breakers", "fs", "indices", "jvm", "name", "os", "process", "thread_pool", "timestamp" ] ``` `name` is a unique piece of identity. It generally match the hostname. Use it an additional tag with the namespace `node_name`.
7b8b64d
to
7ba4a36
Compare
When the `cluster_stats` parameter is enabled in the user configuration, the Datadog Agent's Elasticsearch check attempts to resolve and attach with the corresponding metrics, the hostname of the different nodes. On Amazon Elasticsearch v1.5.2, the node objects returned by the `_cluster/nodes/stats?all=true` endpoint does not return this information. Instead the following keys are available: ``` root@xxxx:~# at node_stats.json| jq '.nodes[] | select(.name == "${hostname}") | keys [ "breakers", "fs", "indices", "jvm", "name", "os", "process", "thread_pool", "timestamp" ] ``` `name` is a unique piece of identity. It generally match the hostname. Use it an additional tag with the namespace `node_name`.
* master: (119 commits) [core] remove noisy logs (#2715) run multiple instances of pylint (#2716) [packaging] Release 5.8.5 (#2712) [changelog][5.8.5] Add notes on packaging changes (#2710) [changelog] Update 5.8.5 with python upgrade be more specific when logging ssh errors (#2708) [marathon] allow base_url with path (#2620) [changelog] Update 5.8.5 add issue and pr templates [sdk] minor tweaks - sdk env detection, check location (#2694) [http_check] log exceptions 🔊 use 0.0.0.0 as server address when non_local_traffic is passed (#2691) [elastic] tag stats metric with the node name 🏷 (#2696) [openstack] moving proxy logic to AgentCheck, for maintainability. Fixing typos. [changelog] 5.8.5 draft [tests] lower flakiness of test_no_parallelism (#2690) [core] don't use docker hostname if it's a EC2 one (#2661) [haproxy] Fix `KeyError` when an unknown status is found (#2681) [changelog] Fix md links [jenkins] Deprecate check (#2688) ...
When the
cluster_stats
parameter is enabled in the user configuration,the Datadog Agent's Elasticsearch check attempts to resolve and
attach with the corresponding metrics, the hostname of the different
nodes.
On Amazon Elasticsearch v1.5.2, the node objects
returned by the
_cluster/nodes/stats?all=true
endpoint returns thefollowing keys:
where
name
contains the hostname.