Deploy MCP Server
Monitoring & Observability Basic Auth

Prometheus REST API

Pull-based monitoring system with powerful query language

Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability. It collects and stores metrics as time series data, providing a powerful query language (PromQL) for analysis and visualization. Developers use Prometheus to monitor infrastructure, applications, and services with dimensional data modeling and built-in alerting.

Base URL http://localhost:9090/api/v1

API Endpoints

MethodEndpointDescription
GET/queryEvaluates an instant query at a single point in time
GET/query_rangeEvaluates an expression query over a range of time
GET/seriesReturns the list of time series that match a certain label set
GET/labelsReturns a list of label names
GET/label//valuesReturns a list of label values for a provided label name
GET/targetsReturns an overview of the current state of the Prometheus target discovery
GET/rulesReturns a list of alerting and recording rules
GET/alertsReturns a list of all active alerts
GET/alertmanagersReturns an overview of the current state of the Prometheus alertmanager discovery
GET/status/configReturns the current Prometheus configuration
GET/status/flagsReturns the flag values that Prometheus was configured with
GET/status/runtimeinfoReturns runtime information about the Prometheus server
GET/metadataReturns metadata about metrics currently scraped from targets
POST/admin/tsdb/snapshotCreates a snapshot of all current data into a subdirectory
POST/admin/tsdb/delete_seriesDeletes data for a selection of series in a time range

Code Examples

curl -G 'http://localhost:9090/api/v1/query' \
  --data-urlencode 'query=up' \
  --data-urlencode 'time=2024-01-15T10:30:00.000Z' \
  -u 'admin:password'

Connect Prometheus to AI

Deploy a Prometheus MCP server on IOX Cloud and connect it to Claude, ChatGPT, Cursor, or any AI client. Your AI assistant gets direct access to Prometheus through these tools:

query_prometheus_metrics Execute PromQL queries to retrieve current metric values and analyze system health
get_metric_history Query time-series data over a range to analyze trends and patterns in metrics
list_active_alerts Retrieve all currently firing alerts with their labels and annotations
discover_targets Get the current status of all monitored targets and their health state
analyze_metric_cardinality Examine metric labels and cardinality to optimize monitoring performance

Deploy in 60 seconds

Describe what you need, AI generates the code, and IOX deploys it globally.

Deploy Prometheus MCP Server →

Related APIs