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

[receiver/bigip] Add Big-IP Metrics Receiver #9893

Merged
merged 1 commit into from
May 13, 2022

Conversation

StefanKurek
Copy link
Contributor

Description:
Add Big-IP Metrics receiver. Adds a client, factory, config, and scraper to accomplish this.

Link to tracking Issue:
#9680

Testing:
Added config, client, factory, and scraper unit tests to validate new code.

An integration test has been added as well which spins up a mock HTTP server which plays back real responses form a Big-IP environment. A script has been included to help future developers record the necessary responses from their own Big-IP environments to work with the mock REST Server.

Documentation:
Added doc explaining use of receiver.

Copy link
Contributor

@BinaryFissionGames BinaryFissionGames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also needs an entry in the CODEOWNERS file, as well

receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Show resolved Hide resolved
receiver/bigipreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/testdata/config.yaml Outdated Show resolved Hide resolved
receiver/bigipreceiver/testdata/config.yaml Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/config_test.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/integration_test.go Outdated Show resolved Hide resolved
@StefanKurek StefanKurek force-pushed the bigip_receiver branch 3 times, most recently from c95b61f to 71f521b Compare May 10, 2022 18:49
receiver/bigipreceiver/client.go Show resolved Hide resolved
receiver/bigipreceiver/client.go Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/scraper.go Show resolved Hide resolved
receiver/bigipreceiver/scraper.go Outdated Show resolved Hide resolved
@StefanKurek StefanKurek marked this pull request as ready for review May 11, 2022 17:25
@StefanKurek StefanKurek requested review from a team and dashpole May 11, 2022 17:25
@StefanKurek StefanKurek requested a review from dehaansa May 11, 2022 17:28
.github/CODEOWNERS Outdated Show resolved Hide resolved
receiver/bigipreceiver/client.go Outdated Show resolved Hide resolved
@StefanKurek StefanKurek force-pushed the bigip_receiver branch 5 times, most recently from d1532f5 to 373da2a Compare May 12, 2022 14:54
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks very good. A few things though

Comment on lines 129 to 143
bigip.pool.member.count:
description: Total number of pool members.
unit: "{members}"
sum:
monotonic: false
aggregation: cumulative
value_type: int
enabled: true
bigip.pool.active_member.count:
description: Number of active pool members.
unit: "{members}"
sum:
monotonic: false
aggregation: cumulative
value_type: int
enabled: true
bigip.pool.available_member.count:
description: Number of available pool members.
unit: "{members}"
sum:
monotonic: false
aggregation: cumulative
value_type: int
enabled: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does "active + available = total"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djaglowski no, active is more about available + enabled i believe

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reasonable way to combine all this? I don't know exactly how they relate to each other, but it seems like bigip.pool.member.count could just have one or more attributes to differentiate the data points.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djaglowski so we had a discussion in slack, and it sounds like maybe these metrics don't belong lumped into one. they are definitely related, but they don't individually add together to make anything meaningful.
total = total amount of pools
available = available amount of pools (pools that appear to have valid configurations and "could" be used)
active = subset of available pools. the pools that are both available AND enabled.

so when you look at active pools and you look at available pools, you might be looking at the same pools (at least for some of them). let me know if you still think strongly that we should lump these together even if the different groups dont' add up to a total

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good example of exactly where aggregation plays a key role in metric design.

you might be looking at the same pools

Whenever there are data points that meaningfully overlap, we need to try to "name" the overlapping set. Then we can determine the right model.

From what you've told me, I understand that total = available (valid config) + unavailable (invalid config) and available = active (valid config & enabled) + inactive (valid config & disabled). So, at at face value, we have at least one way to represent the total as a sum of parts, with no overlap: total = active + inactive + unavailable.

However, this does not provide a way to represent "available" as a distinct value, so we need to look at incorporating a second attribute that would allow us to aggregate all available pools. We can have two attributes:

  • config_state: [valid | invalid]: Whether or not the pool appears to have a valid config
  • enabled_state [enabled | disabled]: Whether or not the pool is enabled

In this representation we still have the three data points, active + inactive + unavailable:

  • active: valid & enabled
  • inactive: valid & disabled
  • unavailable: invalid & disabled

From the three data points aggregation provides meaningful totals:

  • Grouping by config_state leaves available vs unavailable.
  • Grouping by enabled_state leaves active vs inactive.
  • Grouping by both dimensions leaves the overall total.

Why do it this way? Because the data model is designed to model the correlation between related data points and to give users the ability to group the data along meaningful dimensions. With this representation, we are providing a lot more information than with three separate metrics that overlap each other. The relation between the data points is built into the model and the user effectively has five related data points to work with (active/inactive, available/unavailable, total)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djaglowski changed these metrics to be a single one with an active attribute ("active"/"inactive"). removed available count as it doesn't seem to be as useful

receiver/bigipreceiver/scraper.go Outdated Show resolved Hide resolved
receiver/bigipreceiver/scraper.go Show resolved Hide resolved
@djaglowski
Copy link
Member

Also, note the failing check needs addressing: Generated code is out of date, please run "make generate" and commit the changes in this PR.

@StefanKurek StefanKurek force-pushed the bigip_receiver branch 4 times, most recently from 0ce1d0c to 1be1cad Compare May 13, 2022 17:09
go.mod Outdated Show resolved Hide resolved
receiver/bigipreceiver/go.mod Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @StefanKurek. Looks good

@djaglowski djaglowski merged commit 4ae3dc9 into open-telemetry:main May 13, 2022
kentquirk pushed a commit to McSick/opentelemetry-collector-contrib that referenced this pull request Jun 14, 2022
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.

6 participants