-
Notifications
You must be signed in to change notification settings - Fork 70
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
Add option to generate alias from regexp match #94
Conversation
Thanks a lot for tackling the problem @alz. Out of curiosity, could you let us know which of your Java application is causing these alias conflicts ? I just want to make sure that we are not solving twice the same problem :). |
Hi @yannmh, we're monitoring one of our internal applications which exposes a very high number of metrics in in the form "metrics:type.#id#" with attributes such as "Count", etc. It's not feasible to add a config for each bean, and by selecting them with domain or bean regex matching it would group all attributes under the same alias and split the different beans into tags. It does sound similar to the Cassandra problem (except we're not using Cassandra) but gives more fine-grained control to how the alias is constructed. |
**Changes** * [BUGFIX] Report properly beans with ':' in the name. See [#90][], * [#91][], [#95][] (Thanks [@Bluestix][]) * [BUGFIX] Sanitize metric names and tags, i.e. remove illegal * characters. See [#89][] * [BUGFIX] Support `javax.management.Attribute` attribute types. See * [#92][] (Thanks [@nwillems][]) * [FEATURE] Add user tags to service checks. See [#96][] * [FEATURE] Allow group name substitutions in attribute/alias * parameters. See [#94][], [#97][] (Thanks [@alz][]) <!--- The following link definition list is generated by PimpMyChangelog ---> [#89]: DataDog/jmxfetch#89 [#90]: DataDog/jmxfetch#90 [#91]: DataDog/jmxfetch#91 [#92]: DataDog/jmxfetch#92 [#94]: DataDog/jmxfetch#94 [#95]: DataDog/jmxfetch#95 [#96]: DataDog/jmxfetch#96 [#97]: DataDog/jmxfetch#97 [@alz]: https://github.com/alz [@Bluestix]: https://github.com/bluestix [@nwillems]: https://github.com/nwillems
**Changes** * [BUGFIX] Report properly beans with ':' in the name. See [#90][], * [#91][], [#95][] (Thanks [@Bluestix][]) * [BUGFIX] Sanitize metric names and tags, i.e. remove illegal * characters. See [#89][] * [BUGFIX] Support `javax.management.Attribute` attribute types. See * [#92][] (Thanks [@nwillems][]) * [FEATURE] Add user tags to service checks. See [#96][] * [FEATURE] Allow group name substitutions in attribute/alias * parameters. See [#94][], [#97][] (Thanks [@alz][]) <!--- The following link definition list is generated by PimpMyChangelog ---> [#89]: DataDog/jmxfetch#89 [#90]: DataDog/jmxfetch#90 [#91]: DataDog/jmxfetch#91 [#92]: DataDog/jmxfetch#92 [#94]: DataDog/jmxfetch#94 [#95]: DataDog/jmxfetch#95 [#96]: DataDog/jmxfetch#96 [#97]: DataDog/jmxfetch#97 [@alz]: https://github.com/alz [@Bluestix]: https://github.com/bluestix [@nwillems]: https://github.com/nwillems
This patch allows dynamic creation of metric aliases based on a regex match against .. Example yaml with bean name "metrics:name=COUNTER1":
attribute:
Count:
metric_type: counter
alias_match: metrics:name=(.*)
alias: service.$1
Output alias becomes "services.counter1.count".
This greatly helps the creation of a generic config that splits hundreds (or thousands) of similarly named beans into different aliases, without the difficulty of grouping them under one alias and exceeding the maximum cardinality.