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

Tagged metrics API #3162

Merged
merged 6 commits into from
Sep 7, 2017
Merged

Tagged metrics API #3162

merged 6 commits into from
Sep 7, 2017

Conversation

chelseakomlo
Copy link
Contributor

@chelseakomlo chelseakomlo commented Sep 5, 2017

This PR:

  • Adds an HTTP endpoint to access tagged metrics,
  • Adds documentation for this HTTP endpoint
  • Moves tagged metrics from client configuration to telemetry configuration
  • Adds documentation for new telemetry config options

better api example, add telemetry documentation
@chelseakomlo chelseakomlo changed the title WIP: tagged metrics API Tagged metrics API Sep 6, 2017
@@ -98,6 +96,8 @@ telemetry {
collection_interval = "3s"
publish_allocation_metrics = true
publish_node_metrics = true
disable_tagged_metrics = true
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting

publish metrics that are backwards compatible with versions below 0.7, as
post version 0.7, Nomad emits tagged metrics.

- `disable_tagged_metrics` `(bool: false)` - Specifies if Nomad should not emit
Copy link
Contributor

Choose a reason for hiding this comment

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

I would document that new metrics will only be added to tagged metrics. Further that these options are used to transition monitoring to tagged metrics and will eventually be deprecated.

@@ -162,3 +170,6 @@ These `telemetry` parameters apply to
best use of this is to as a hint for which broker should be used based on
*where* this particular instance is running (e.g. a specific geographic location or
datacenter, dc:sfo).

Copy link
Contributor

Choose a reason for hiding this comment

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

Remove

@@ -0,0 +1,90 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant the values in the table

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, understood.

See e5410d1 , let me know if there is anything I can add/change with this.

client/client.go Outdated
@@ -166,8 +169,15 @@ var (
noServersErr = errors.New("no servers")
)

// ClientTelemetry is a subset of global telemetry configuration options that
// are relevant for the client
type ClientTelemetry struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this and just add the telemetry block into the client configuration. Then the agent can just assign it when creating the client config. In the future client configs should go in the client/config/config.go

move metrics to telemetry; copy to client config
<td>Total amount of CPU shares the scheduler has allocated to tasks</td>
<td>MHz</td>
<td>Gauge</td>
<td>Host ID</td>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make these match the actual name: "node_id", "datacenter"


assert.Equal(c.StatsCollectionInterval, telemetry.collectionInterval)
assert.Equal(c.PublishNodeMetrics, telemetry.PublishNodeMetrics)
assert.Equal(c.PublishAllocationMetrics, telemetry.PublishAllocationMetrics)
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@@ -58,6 +58,20 @@ The following options are available on all telemetry configurations.
- `publish_node_metrics` `(bool: false)` - Specifies if Nomad should publish
runtime metrics of nodes.

- `backwards_compatible_metrics` `(bool: false)` - Specifies if Nomad should
publish metrics that are backwards compatible with versions below 0.7, as
post version 0.7, Nomad emits tagged metrics. and all new metrics will
Copy link
Contributor

Choose a reason for hiding this comment

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

". and all new".

Should be "tagged metrics. All new metrics will only be added to tagged metrics... ".

@chelseakomlo chelseakomlo merged commit 845c0b6 into master Sep 7, 2017
@chelseakomlo chelseakomlo deleted the f-tagged-metrics-api branch September 7, 2017 22:03
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants