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

Metric zero #834

Merged
merged 2 commits into from
Jun 5, 2023
Merged

Metric zero #834

merged 2 commits into from
Jun 5, 2023

Conversation

bwagner5
Copy link
Contributor

@bwagner5 bwagner5 commented Jun 2, 2023

Issue #, if available:
#374

Description of changes:

  • zeros metrics when registered
> ec2-metadata-mock -d 100000 &
> go run cmd/node-termination-handler.go -enable-prometheus-server --dry-run --node-name test --metadata-url http://localhost:1338 -enable-scheduled-event-draining=false
> curl http://localhost:9092/metrics

# HELP actions_node_total Number of actions per node
# TYPE actions_node_total counter
actions_node_total{otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 0
# HELP events_error_total Number of errors in events processing
# TYPE events_error_total counter
events_error_total{otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 0
...
> ec2-metadata-mock &
> go run cmd/node-termination-handler.go -enable-prometheus-server --dry-run --node-name test --metadata-url http://localhost:1338 -enable-scheduled-event-draining=false
> curl http://localhost:9092/metrics

# HELP actions_node_total Number of actions per node
# TYPE actions_node_total counter
actions_node_total{otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 0
actions_node_total{node_action="cordon-and-drain",node_event_id="spot-itn-044b4639ef3811e75ffa8748538727f6ee75486fd7ac74e9ccd3a8185a8062b5",node_name="test",node_status="success",otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 1
actions_node_total{node_action="pre-drain",node_event_id="spot-itn-044b4639ef3811e75ffa8748538727f6ee75486fd7ac74e9ccd3a8185a8062b5",node_name="test",node_status="success",otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 1
# HELP events_error_total Number of errors in events processing
# TYPE events_error_total counter
events_error_total{otel_scope_name="aws.node.termination.handler",otel_scope_version=""} 0

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bwagner5 bwagner5 requested a review from a team as a code owner June 2, 2023 19:28
Copy link
Contributor

@pdk27 pdk27 left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@pdk27 pdk27 merged commit 0493b2e into aws:main Jun 5, 2023
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.

3 participants