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

add new object metric and fix e2e test #1035

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Conversation

LiboYu2
Copy link
Collaborator

@LiboYu2 LiboYu2 commented Jan 15, 2025

1 add vertica_sessions_active_count object metric
2 fix e2e test prometheus-sanity

resource: namespace
service:
resource: service
seriesQuery: vertica_sessions_running_counter{namespace!="", service!= "", type="active", initiator="user"}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
seriesQuery: vertica_sessions_running_counter{namespace!="", service!= "", type="active", initiator="user"}
seriesQuery: vertica_sessions_running_counter{namespace!="", service!= "", type="active"}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There are a lot of sessions which are initiated by the system. Those numbers are pretty large. We have to exclude those from calculating this metric.

@@ -33,7 +33,18 @@ rules:
pod:
resource: pod
metricsQuery: 'avg_over_time(vertica_process_memory_usage_percent[60m])'
# # Number of active sessions. Type: guage
# Total number of active sessions. Type: guage
- metricsQuery: sum(vertica_sessions_running_counter{namespace!="", service!= "", type="active", initiator="user"}) by (namespace, service)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- metricsQuery: sum(vertica_sessions_running_counter{namespace!="", service!= "", type="active", initiator="user"}) by (namespace, service)
- metricsQuery: sum(vertica_sessions_running_counter{type="active"}) by (namespace, service)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same comment as above.

@@ -15,7 +15,8 @@ apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
- script: |
NAMESPACE=$(kubectl get pod v-prometheus-pri1-0 -o=jsonpath='{.metadata.namespace}')
echo "sleep 120 seconds before starting to verify metrics"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We don't need this sleep.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It took me a lot of time to debug the failure. The metric is not available right away after the adapter is installed. We have to wait some time. We need it.

@roypaulin
Copy link
Collaborator

Please share the verticaautoscaler you used to test this. Put it in the prometheus folder.

@roypaulin
Copy link
Collaborator

@LiboYu2 You did not address my comments.

@LiboYu2
Copy link
Collaborator Author

LiboYu2 commented Jan 16, 2025

Please share the verticaautoscaler you used to test this. Put it in the prometheus folder.

I added it to config/samples/v1beta1_verticaautoscaler_custom_metrics.yaml

@LiboYu2 LiboYu2 merged commit a7e65be into main Jan 17, 2025
41 checks passed
@LiboYu2 LiboYu2 deleted the add_session_object_metric branch January 17, 2025 20:17
@roypaulin
Copy link
Collaborator

@LiboYu2 Please wait until all the tests pass before merging, even if the PR is approved.

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