SysTeam/Docs/Infrastructure as Code

Infrastructure as Code

SysTeam HealthChecks is built for DevOps and SRE teams. Manage your entire monitoring configuration as code using your preferred IaC and automation tools.

DevOps-Friendly by Design

Every resource in SysTeam HealthChecks — checks, projects, notification channels, escalation policies, on-call schedules, maintenance windows, SLOs — can be managed programmatically. No click-ops required.

TerraformOpenTofuAnsibleHelmREST APIPrometheus

Terraform / OpenTofu Provider

Our official Terraform provider lets you define monitoring resources declaratively in HCL. Fully compatible with OpenTofu — just replace terraform with tofu in all commands.

Supported Resources

ResourceDescription
systeam_checkMonitoring checks (HTTP, DNS, TCP, ICMP, etc.)
systeam_projectProjects for grouping checks
systeam_notification_channelNotification channels (Slack, email, Discord, etc.)
systeam_escalation_policyEscalation policies with multi-step rules
systeam_status_pagePublic status pages
systeam_maintenance_windowScheduled maintenance windows
systeam_oncall_scheduleOn-call rotation schedules
systeam_check_sloSLO targets per check

Data Sources

Data SourceDescription
systeam_organizationLook up organization by slug

Example

main.tf
terraform {
  required_providers {
    systeam = {
      source  = "systeam/monitoring"
      version = "~> 0.1"
    }
  }
}

provider "systeam" {
  api_url = "https://checks.systeam.pl/api"
  api_token = var.systeam_token
}

data "systeam_organization" "main" {
  slug = "my-org"
}

resource "systeam_project" "production" {
  name            = "Production"
  organization_id = data.systeam_organization.main.id
  description     = "Production services"
}

resource "systeam_check" "api_health" {
  name       = "API Health"
  type       = "uptime"
  project_id = systeam_project.production.id
  url        = "https://api.example.com/healthz"
  interval   = 60
  timeout    = 10
  geo_monitoring_enabled = true
}

resource "systeam_notification_channel" "slack" {
  name         = "Slack Alerts"
  channel_type = "slack"
  config = {
    webhook_url = var.slack_webhook
  }
}

resource "systeam_check_slo" "api_slo" {
  check_id          = systeam_check.api_health.id
  target_percentage = 99.9
  window_days       = 30
}

OpenTofu Compatible

This provider works with both Terraform and OpenTofu. OpenTofu is an open-source fork of Terraform maintained by the Linux Foundation. Just replace terraform with tofu in your commands.

Ansible Collection

The systeam.monitoring Ansible collection provides full CRUD modules with idempotency. No external Python dependencies — uses only urllib. Published to our internal Galaxy NG and automatically updated on every CI build.

Installation

Install from our internal Galaxy NG at galaxy.cygal.net:

Install from Galaxy NG
# One-time: configure the Galaxy server
cat >> ~/.ansible.cfg << 'EOF'
[galaxy]
server_list = systeam_galaxy, galaxy

[galaxy_server.systeam_galaxy]
url = https://galaxy.cygal.net/api/galaxy/
token = YOUR_GALAXY_TOKEN

[galaxy_server.galaxy]
url = https://galaxy.ansible.com/
EOF

# Install the collection
ansible-galaxy collection install systeam.monitoring

# Or install directly without config
ansible-galaxy collection install systeam.monitoring \
  --server https://galaxy.cygal.net/api/galaxy/ \
  --token YOUR_GALAXY_TOKEN

You can also add the collection to a requirements.yml file for reproducible environments:

requirements.yml
collections:
  - name: systeam.monitoring
    source: https://galaxy.cygal.net/api/galaxy/
    version: ">=0.1.0"
Install from requirements
ansible-galaxy collection install -r requirements.yml

Galaxy Token

To get your Galaxy NG API token, log in to galaxy.cygal.net and go to User → Token Management. The collection is automatically published on every successful CI build.

Modules

ModuleDescription
systeam.monitoring.projectManage projects
systeam.monitoring.checkManage monitoring checks
systeam.monitoring.notification_channelManage notification channels
systeam.monitoring.status_pageManage status pages
systeam.monitoring.maintenance_windowManage maintenance windows
systeam.monitoring.escalation_policyManage escalation policies
systeam.monitoring.oncall_scheduleManage on-call schedules
systeam.monitoring.check_sloManage SLO targets

Example Playbook

monitoring.yml
- hosts: localhost
  vars:
    api_url: "https://checks.systeam.pl/api"
    api_token: "{{ vault_systeam_token }}"

  tasks:
    - name: Ensure production project exists
      systeam.monitoring.project:
        api_url: "{{ api_url }}"
        api_token: "{{ api_token }}"
        name: Production
        organization_id: 1
        description: Production monitoring
        state: present
      register: prod_project

    - name: Create API health check
      systeam.monitoring.check:
        api_url: "{{ api_url }}"
        api_token: "{{ api_token }}"
        name: API Health
        type: uptime
        project_id: "{{ prod_project.project.id }}"
        url: https://api.example.com/healthz
        interval: 60
        state: present

    - name: Set up Slack notifications
      systeam.monitoring.notification_channel:
        api_url: "{{ api_url }}"
        api_token: "{{ api_token }}"
        name: Slack Alerts
        channel_type: slack
        config:
          webhook_url: "{{ slack_webhook }}"
        state: present

All modules support check_mode (dry run) and follow standard Ansible idempotency patterns. Set state: absent to remove resources.

Helm Chart

Deploy the entire SysTeam HealthChecks stack on Kubernetes using our Helm chart. Includes backend (FastAPI), frontend (Next.js), Redis, Celery workers, and geo monitoring agents.

Install via Helm
helm repo add systeam https://charts.systeam.pl
helm install healthchecks systeam/healthchecks \
  --namespace healthchecks \
  --create-namespace \
  --set backend.env.DATABASE_URL="postgresql://..." \
  --set backend.env.SECRET_KEY="your-secret" \
  --set redis.auth.password="redis-pass"

Key Values

ParameterDefaultDescription
backend.replicas1Backend pod replicas
frontend.replicas1Frontend pod replicas
redis.enabledtrueDeploy Redis in-cluster
backend.sse.maxConnectionsPerUser5Max SSE connections per user
customDomains.enabledfalseTraefik IngressRoute for custom status page domains

Tip

The Helm chart works with any Kubernetes distribution including EKS, GKE, AKS, k3s, and self-hosted clusters. TLS is handled via Traefik with Let's Encrypt auto-provisioning.

REST API

Everything in SysTeam HealthChecks is accessible via the REST API. Authenticate with a Personal Access Token and integrate with any tool that can make HTTP requests.

Example: Create a check via cURL
curl -X POST "https://checks.systeam.pl/api/checks" \
  -H "Authorization: Bearer pat_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "API Health",
    "type": "uptime",
    "project_id": 1,
    "url": "https://api.example.com/healthz",
    "interval": 60
  }'

The API enables integration with any automation tool, CI/CD pipeline, or custom script. Common use cases:

  • Create maintenance windows before deployments in CI/CD
  • Auto-provision checks when new services are deployed
  • Sync monitoring configuration from a Git repository
  • Build custom dashboards and reports

Prometheus & OpenTelemetry

Export check metrics in Prometheus or OTLP format for integration with your existing observability stack.

prometheus.yml
scrape_configs:
  - job_name: 'systeam-healthchecks'
    scheme: https
    metrics_path: '/api/metrics/YOUR_METRICS_KEY'
    static_configs:
      - targets: ['checks.systeam.pl']

For OpenTelemetry Collector, add ?format=otlp to the metrics URL. See the Integrations page to create a metrics key.

Other Automation Tools

Thanks to the REST API, SysTeam HealthChecks integrates with virtually any DevOps or configuration management tool. Here are some common options:

ToolIntegration Method
PulumiUse the REST API via Pulumi's HTTP provider or write a custom dynamic provider
Chef / Puppet / SaltStackCall the REST API from recipes/manifests/states using HTTP resources
Octopus DeployUse Run Script steps with cURL/PowerShell to call the API during deployments
GitHub Actions / GitLab CICall the API in pipeline steps (e.g. create maintenance windows before deploy)
ArgoCD / FluxUse Helm chart for GitOps deployments, API for check provisioning
CrossplaneUse the Terraform provider via Crossplane's Terraform integration

CI/CD Integration

A common pattern is to create a maintenance window via the API at the start of your deployment pipeline, and close it when the deployment is complete. This suppresses false-positive alerts during rolling updates.

Choosing a Tool

Use CaseRecommended Tool
Declarative infrastructure, state trackingTerraform / OpenTofu
Configuration management, procedural automationAnsible
Kubernetes deploymentHelm
CI/CD pipeline integrationREST API (cURL, Python, etc.)
Custom dashboards, reportingREST API + Prometheus metrics

Authentication

All IaC tools require a Personal Access Token (PAT) for authentication. Create one in your Profile settings. Never commit tokens to source control — use environment variables or secret management tools.