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

feat: Add new Prometheus target and metadata API endpoints #295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RiviaAzusa
Copy link

Add four new methods to PrometheusConnect class:

  • get_scrape_pools(): Retrieve list of unique scrape pool names
  • get_targets(): Get active/dropped targets with optional state and pool filters
  • get_target_metadata(): Fetch metadata about metrics from specific targets
  • get_metric_metadata(): Get metadata about metrics with optional filtering

These additions provide better visibility into Prometheus targets and metric
metadata, enabling more detailed monitoring and configuration analysis.

Add four new methods to PrometheusConnect class:
- get_scrape_pools(): Retrieve list of unique scrape pool names
- get_targets(): Get active/dropped targets with optional state and pool filters
- get_target_metadata(): Fetch metadata about metrics from specific targets
- get_metric_metadata(): Get metadata about metrics with optional filtering

These additions provide better visibility into Prometheus targets and metric
metadata, enabling more detailed monitoring and configuration analysis.
@RiviaAzusa
Copy link
Author

anybody here? QAQ

@4n4nd
Copy link
Owner

4n4nd commented Apr 7, 2025

@RiviaAzusa this looks great but could you please add tests for these new functions?

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