CI/CD Testing
Run your synthetic checks in your CI/CD pipeline and export metrics to your observability stack.
GitHub Action
CI/CD pipeline. Run your check on demand or in your workflows.
GitHub Action Marketplacename: Run OpenStatus Synthetics CI
on:
workflow_dispatch:
push:
branches: [main]
jobs:
synthetic_ci:
runs-on: ubuntu-latest
name: Run OpenStatus Synthetics CI
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run OpenStatus Synthetics CI
uses: openstatushq/openstatus-github-action@v1
with:
api_key: ${{ secrets.OPENSTATUS_API_KEY }}
name: Run OpenStatus Synthetics CI
on:
workflow_dispatch:
push:
branches: [main]
jobs:
synthetic_ci:
runs-on: ubuntu-latest
name: Run OpenStatus Synthetics CI
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run OpenStatus Synthetics CI
uses: openstatushq/openstatus-github-action@v1
with:
api_key: ${{ secrets.OPENSTATUS_API_KEY }}
Looking for an enterprise solution?
We offer custom solutions for large organizations.
API Monitoring
On Demand Checks. Run your check in your CI/CD pipeline or via the CLI.
Getting Startedtest("should fail if slow", async () => {
const data = await fetch("https://api.openstatus.dev/v1/monitor/:id/run", {
method: "POST",
headers: { "x-openstatus-key": process.env.OPENSTATUS_API_KEY },
});
const body = await data.json();
expect(body.status).toBe(200);
expect(body.latency).toBeLessThan(1000);
});
test("should fail if slow", async () => {
const data = await fetch("https://api.openstatus.dev/v1/monitor/:id/run", {
method: "POST",
headers: { "x-openstatus-key": process.env.OPENSTATUS_API_KEY },
});
const body = await data.json();
expect(body.status).toBe(200);
expect(body.latency).toBeLessThan(1000);
});
openstatus monitors trigger [id]
openstatus monitors trigger [id]
provider "openstatus" {
openstatus_api_token= "YOUR_API_TOKEN"
}
resource "openstatus_monitor" "my_monitor" {
url = "https://www.openstatus.dev"
regions= ["iad", "jnb"]
periodicity = "10m"
name = "test-monitor"
active = true
description = "This is a test monitor"
}
provider "openstatus" {
openstatus_api_token= "YOUR_API_TOKEN"
}
resource "openstatus_monitor" "my_monitor" {
url = "https://www.openstatus.dev"
regions= ["iad", "jnb"]
periodicity = "10m"
name = "test-monitor"
active = true
description = "This is a test monitor"
}
OpenTelemetry
Track every request. Visualize how requests flow through your system using OpenTelemetry tracing.
Documentation{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": { "stringValue": "openstatus-synthetic-check" }
},
{
"key": "service.version",
"value": { "stringValue": "0.1.0" }
}
]
},
"scopeMetrics": [
{
"scope": {
"name": "OpenStatus"
},
"metrics": [
{
"name": "openstatus.status",
"description": "Status of the check",
"unit": "1",
"sum": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 1
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE",
"isMonotonic": true
}
},
{
"name": "openstatus.http.request.duration",
"description": "Duration of the check",
"unit": "ms",
"gauge": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 431.12
}
]
}
},
{
"name": "openstatus.http.dns.duration",
"description": "Duration of the dns lookup",
"unit": "ms",
"gauge": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 56.45
}
]
}
}
]
}
]
}
]
}
{
"resourceMetrics": [
{
"resource": {
"attributes": [
{
"key": "service.name",
"value": { "stringValue": "openstatus-synthetic-check" }
},
{
"key": "service.version",
"value": { "stringValue": "0.1.0" }
}
]
},
"scopeMetrics": [
{
"scope": {
"name": "OpenStatus"
},
"metrics": [
{
"name": "openstatus.status",
"description": "Status of the check",
"unit": "1",
"sum": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 1
}
],
"aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE",
"isMonotonic": true
}
},
{
"name": "openstatus.http.request.duration",
"description": "Duration of the check",
"unit": "ms",
"gauge": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 431.12
}
]
}
},
{
"name": "openstatus.http.dns.duration",
"description": "Duration of the dns lookup",
"unit": "ms",
"gauge": {
"dataPoints": [
{
"attributes": [
{ "key": "openstatus.probes", "value": { "stringValue": "fra" } },
{ "key": "openstatus.target", "value": { "stringValue": "https://acme.com" } },
{ "key": "http.response.status_code", "value": { "intValue": 200 } }
],
"value": 56.45
}
]
}
}
]
}
]
}
]
}
Don't talk to Sales. Talk to Founders.
We are here to help you with any questions or concerns you may have.