Skip to content
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

[attribute] add TabularData support #128

Merged
merged 7 commits into from
Mar 3, 2017
Merged

[attribute] add TabularData support #128

merged 7 commits into from
Mar 3, 2017

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented Mar 1, 2017

Original discussion thread: #111
Credits to @brothhaar. Thanks a lot !!! 🙇

JMX TabularData support

Copied from #111, @brothhaar.

When a TabularData type is encountered, multiple metrics are generated with the same alias, but a unique tag per entry.
The tag is generated by concatenating each of the (possibly multiple) key values for each CompositeData entry in the TabularData JMX value
Also included limit and sort capability to allow sorting and limiting the number of metrics returned for a single configuration entry (since a TabularData value could have many records).
YAML config format:

- include:
  domain: <domain>
  bean:
    - <bean name>
  attribute:
    <TabularData attribute name>:
      metric_type: <type>
      alias: <alias>
      tags:
        <tag name>: $key
      limit: 20
      sort: desc

Additional changes

Allow tag substitution for any key of a TabularData object

Do not restrain tag substitution to the TabularType index. Instead, tag subtitution can be performed on any keys of a CompositeType.

For example:

Tabulardata.foo:
    metric_type: gauge
    alias: multiattr.foo
    tags:
      foo: $foo
      toto: $toto
    limit: 1
    sort: desc

instruments JMXFetch to collect a multiattr.foo metric tagged with foo and toto keys, where foo and toto are CompositeType keys.

Others

  • Modify tests to use sort and limit for TabularData
  • Rename JMXMultiAttribute to JMXTabularAttribute

@yannmh yannmh self-assigned this Mar 1, 2017
@yannmh yannmh added this to the 0.13.0 milestone Mar 1, 2017
@yannmh yannmh force-pushed the yann/tabular-review branch from 50cdd7f to c489406 Compare March 1, 2017 20:10
@brothhaar
Copy link

👍 Looks good @yannmh. Thanks for taking the time to pull this in!

@yannmh yannmh force-pushed the yann/tabular-review branch from c489406 to 8a0f84d Compare March 2, 2017 20:20
brothhaar and others added 7 commits March 3, 2017 09:30
@yannmh yannmh force-pushed the yann/tabular-review branch from 8a0f84d to b1c2121 Compare March 3, 2017 14:37
@yannmh yannmh merged commit 2f58003 into master Mar 3, 2017
@yannmh yannmh deleted the yann/tabular-review branch March 3, 2017 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants