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

Make Info Metrics more easy to query #3781

Open
rooftopcellist opened this issue Apr 29, 2019 · 2 comments
Open

Make Info Metrics more easy to query #3781

rooftopcellist opened this issue Apr 29, 2019 · 2 comments
Labels

Comments

@rooftopcellist
Copy link
Member

rooftopcellist commented Apr 29, 2019

ISSUE TYPE
  • Bug Report
SUMMARY

Currently awx_system_info and awx_instance_info metrics are returned as labels with values, which makes it difficult to query just the value of one key. As a result, you can't query individual key's for their values in prometheus, for example: awx_system_info{anisble_version}. This has already been fixed for licenses.

We should make the rest of these individual metrics so that they can be individually queried. i.e.: "I am a customer who likes to see my Ansible version and tower version in Dashboard for Tower in Grafana"

ENVIRONMENT
  • AWX version: 4.0.0
@rooftopcellist
Copy link
Member Author

I was able to change the info data to be individual line items, but am still unable to query just the value (given that the value is a str).

awx_install_uuid_info{install_uuid="da81b934-a688-4088-8dc1-2d676f175db7"} 1.0
# HELP awx_automation_insights_info Automation Insights enabled for this Tower
# TYPE awx_automation_insights_info gauge
awx_automation_insights_info{automation_insights="False"} 1.0
# HELP awx_tower_base_url_info Base URL for Tower
# TYPE awx_tower_base_url_info gauge
awx_tower_base_url_info{tower_url_base="https://towerhost"} 1.0
# HELP awx_tower_version_info Tower Version
# TYPE awx_tower_version_info gauge
awx_tower_version_info{tower_version="4.0.0-428-gaaeb2d6fb"} 1.0
# HELP awx_ansible_version_info System Ansible version
# TYPE awx_ansible_version_info gauge
awx_ansible_version_info{ansible_version="2.7.10"} 1.0
# HELP awx_license_type_info Type of Tower license applied
# TYPE awx_license_type_info gauge
awx_license_type_info{license_type="open"} 1.0
# HELP awx_license_expiry Time before Tower license expires
# TYPE awx_license_expiry gauge
awx_license_expiry 0.0
# HELP awx_license_instance_total Total number of managed hosts provided by your license
# TYPE awx_license_instance_total gauge
awx_license_instance_total 0.0
# HELP awx_license_instance_free Number of remaining managed hosts provided by your license
# TYPE awx_license_instance_free gauge
awx_license_instance_free 0.0
# HELP awx_pendo_tracking_info Analytics Tracking via Pendo enabled
# TYPE awx_pendo_tracking_info gauge
awx_pendo_tracking_info{pendo_tracking="off"} 1.0
# HELP awx_external_logging_info External Logging enabled
# TYPE awx_external_logging_info gauge
awx_external_logging_info{external_logging="False"} 1.0
# HELP awx_external_log_type_info External log aggregator types set
# TYPE awx_external_log_type_info gauge
awx_external_log_type_info{external_log_type="None"} 1.0

@rooftopcellist
Copy link
Member Author

rooftopcellist commented May 1, 2019

It looks like we could use UNTYPED data type (https://prometheus.io/docs/instrumenting/writing_exporters/#types)

But prometheus_client doesn't seem to support this, and futhermore, when I hardcode it into the metrics endpoint, I can't query it:

# HELP awx_version_info System Ansible version
# TYPE awx_version_info untyped
awx_version_info "9.7.10"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants