Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.
openapi: 3.2.0
info:
title: Keep Metrics API
description: Rest API powering https://platform.keephq.dev and friends 🏄♀️
version: 0.24.5
tags:
- name: Metrics
paths:
/metrics:
get:
tags:
- Metrics
summary: Get Metrics
description: 'This endpoint is used by Prometheus to scrape such metrics from the application:
- alerts_total {incident_name, incident_id} - The total number of alerts per incident.
- open_incidents_total - The total number of open incidents.
- workflows_executions_total {status} - The total number of workflow executions.
Please note that those metrics are per-tenant and are not designed to be used for the monitoring of the application itself.
Example prometheus configuration:
```
scrape_configs:
- job_name: "scrape_keep"
scrape_interval: 5m # It''s important to scrape not too often to avoid rate limiting.
static_configs:
- targets: ["https://api.keephq.dev"] # Or your own domain.
authorization:
type: Bearer
credentials: "{Your API Key}"
# Optional, you can add labels to exported incidents.
# Label values will be equal to the last incident''s alert payload value matching the label.
# Attention! Don''t add "flaky" labels which could change from alert to alert within the same incident.
# Good labels: [''labels.department'', ''labels.team''], bad labels: [''labels.severity'', ''labels.pod_id'']
# Check Keep -> Feed -> "extraPayload" column, it will help in writing labels.
params:
labels: [''labels.service'', ''labels.queue'']
# Will resuld as: "labels_service" and "labels_queue".
```'
operationId: get_metrics_metrics_get
parameters:
- required: false
schema:
items:
type: string
type: array
title: Labels
name: labels
in: query
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- API Key: []
- HTTPBasic: []
- OAuth2PasswordBearer: []
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
securitySchemes:
API_Key:
type: apiKey
in: header
name: X-API-KEY
HTTPBasic:
type: http
scheme: basic
OAuth2PasswordBearer:
type: oauth2
flows:
password:
scopes: {}
tokenUrl: token