Quick start¶
1. Install¶
2. Get credentials¶
You need two things from your Prometheus APM tenant:
- an API key
- the matching RSA private key in PEM format
3. Set environment variables¶
You can also pass credentials straight to the client. Authentication covers every option.
4. Make a request¶
Using the client as a context manager closes its HTTP connections when you're done. Outside a
with block, call client.close() (or await client.aclose() for async).
What the client gives you¶
The client has one attribute per API area:
| Attribute | Sync class | Async class | Covers |
|---|---|---|---|
client.assets |
Assets |
AsyncAssets |
Asset hierarchy and details |
client.issues |
Issues |
AsyncIssues |
Issues, keywords, discussion entries |
client.models |
Models |
AsyncModels |
Model configuration, alert state, actions |
client.process_data |
ProcessData |
AsyncProcessData |
Servers, tags, time-series reads/writes |
Next, read Sync or async? to pick a client, or jump to the user guide for examples.