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
| Method | Endpoint | Description |
|---|---|---|
| GET | /query | Evaluates an instant query at a single point in time |
| GET | /query_range | Evaluates an expression query over a range of time |
| GET | /series | Returns the list of time series that match a certain label set |
| GET | /labels | Returns a list of label names |
| GET | /label/ | Returns a list of label values for a provided label name |
| GET | /targets | Returns an overview of the current state of the Prometheus target discovery |
| GET | /rules | Returns a list of alerting and recording rules |
| GET | /alerts | Returns a list of all active alerts |
| GET | /alertmanagers | Returns an overview of the current state of the Prometheus alertmanager discovery |
| GET | /status/config | Returns the current Prometheus configuration |
| GET | /status/flags | Returns the flag values that Prometheus was configured with |
| GET | /status/runtimeinfo | Returns runtime information about the Prometheus server |
| GET | /metadata | Returns metadata about metrics currently scraped from targets |
| POST | /admin/tsdb/snapshot | Creates a snapshot of all current data into a subdirectory |
| POST | /admin/tsdb/delete_series | Deletes 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 →