pub async fn alertmanagers(host: &str) -> Result<Alertmanagers, Error>
Expand description

Query the current state of alertmanager discovery.

This is just a convenience function for one-off requests, see Client::alertmanagers.

use prometheus_http_query::alertmanagers;

#[tokio::main(flavor = "current_thread")]
async fn main() -> Result<(), anyhow::Error> {
    let response = alertmanagers("http://localhost:9090").await;

    assert!(response.is_ok());

    Ok(())
}