flanksource/canary-checker

Kubernetes Native Health Check Platform

Go

347

3,530 commits

updated Oct 20, 2026

See the code

README

Kubernetes Native Health Check Platform


Canary Checker is a Kubernetes-native platform for monitoring health across applications and infrastructure using both passive and active (synthetic) mechanisms.

Features

  • Batteries Included - 30+ built-in active and passive check types
  • Kubernetes Native - Health checks, or canaries, are CRDs that reflect health via the status field, making them compatible with GitOps, Flux Health Checks, Argo, Helm, etc.
  • Secret Management - Leverage Kubernetes Secrets and ConfigMaps for authentication and connection details
  • Prometheus - Prometheus-compatible metrics are exposed at /metrics. A Grafana dashboard is also available.
  • Self-Contained Storage - Uses embedded Postgres by default and can be configured to use external Postgres.
  • JUnit Export (CI/CD) - Export health check results to JUnit format for integration into CI/CD pipelines
  • JUnit Import (k6/Newman/Puppeteer/etc.) - Use any container that creates JUnit test results
  • Scriptable - Go templates, JavaScript and CEL can be used to:
    • Evaluate whether a check is passing and severity to use when failing
    • Extract a user friendly error message
    • Transform and filter check responses into individual check results
    • Extract custom metrics
  • Multi-Modal - While designed as a Kubernetes operator, Canary Checker can also run as a CLI and as a standalone server.

Getting Started

  1. Install Canary Checker with Helm
helm repo add flanksource https://flanksource.github.io/charts
helm repo update

helm install \
  canary-checker \
  flanksource/canary-checker \
  -n canary-checker \
  --create-namespace \
  --wait
  1. Create a new check
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: http-check
spec:
  schedule: "@every 30s"
  http:
    - name: basic-check
      url: https://httpbin.flanksource.com/status/200
    - name: failing-check
      url: https://httpbin.flanksource.com/status/500

2a. Run the check locally (Optional)

wget  https://github.com/flanksource/canary-checker/releases/latest/download/canary-checker_linux_amd64 \
-O canary-checker &&  chmod +x canary-checker
./canary-checker run canary.yaml

asciicast

  1. Apply the check
kubectl apply -f canary.yaml
  1. Check the health status
kubectl get canary
NAME         SCHEDULE      STATUS   LAST CHECK   UPTIME 1H        LATENCY 1H   LAST TRANSITIONED
http-check   @every 30s    Passed   13s          18/18 (100.0%)   480ms        13s

See fixtures for more examples and docs for more comprehensive documentation.

Use Cases

Synthetic Testing

Run simple HTTP/DNS/ICMP probes or more advanced full test suites using JMeter, k6, Playwright, Postman/Newman, or any container that can emit JUnit XML.

# Run a container that executes a playwright test, and then collect the
# JUnit formatted test results from the /tmp folder
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: playwright-junit
spec:
  schedule: "@every 2m"
  junit:
    - testResults: "/tmp/"
      name: playwright-junit
      spec:
        containers:
          - name: playwright
            image: ghcr.io/flanksource/canary-playwright:latest

Infrastructure Testing

Verify that infrastructure is fully operational by checking Kubernetes resources, deploying temporary resources, and running nested checks against them.

# Deploy a temporary pod and service, wait for readiness, call the service, and then clean up.
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: kubernetes-resource-check
spec:
  schedule: "@every 5m"
  kubernetesResource:
    - name: service-accessibility
      namespace: default
      waitFor:
        expr: 'dyn(resources).all(r, k8s.isReady(r))'
        interval: 2s
        timeout: 2m
      resources:
        - apiVersion: v1
          kind: Pod
          metadata:
            name: httpbin-pod
            namespace: default
            labels:
              app: httpbin
          spec:
            containers:
              - name: httpbin
                image: kennethreitz/httpbin:latest
                ports:
                  - containerPort: 80
        - apiVersion: v1
          kind: Service
          metadata:
            name: httpbin
            namespace: default
          spec:
            selector:
              app: httpbin
            ports:
              - port: 80
                targetPort: 80
      checks:
        - http:
            - name: call-httpbin-service
              url: http://httpbin.default.svc/status/200
      checkRetries:
        delay: 2s
        interval: 3s
        timeout: 2m

Generic Check Retries

Retry transient failures for any check with retries. It can be set once at canary level or overridden per check.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: api-check
spec:
  schedule: "@every 1m"
  retries:
    maxRetries: 2
    interval: 5s
    timeout: 30s
  http:
    - name: api
      url: https://api.example.com/health
      retries:
        maxRetries: 3
        interval: 2s

Backup Checks / Batch File Monitoring

Check that batch file processes are functioning correctly by checking the age and size of files in local file systems, SFTP, SMB, S3 and GCS.

# Checks that a recent DB backup has been uploaded
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: folder-check
spec:
  schedule: "0 22 * * *"
  folder:
    - path: s3://database-backups/prod
      name: prod-backup
      maxAge: 1d
      minSize: 10gb

Alert Aggregation

Aggregate alerts and recommendations from Prometheus, AWS CloudWatch, Dynatrace, etc.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: alertmanager-check
spec:
  schedule: "*/5 * * * *"
  alertmanager:
    - url: alertmanager.monitoring.svc
      alerts:
        - .*
      ignore:
        - KubeScheduler.*
        - Watchdog
      transform:
        # for each alert, transform it into a new check
        javascript: |
          var out = _.map(results, function(r) {
            return {
              name: r.name,
              labels: r.labels,
              icon: 'alert',
              message: r.message,
              description: r.message,
            }
          })
          JSON.stringify(out);

Prometheus Exporter Replacement

Export custom metrics from the result of any check, making it possible to replace various other Prometheus exporters that collect metrics via HTTP, SQL, etc.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: exchange-rates
spec:
  schedule: "@every 1h"
  http:
    - name: exchange-rates
      url: https://api.frankfurter.app/latest?from=USD&to=GBP,EUR,ILS
      metrics:
        - name: exchange_rate
          type: gauge
          value: result.json.rates.GBP
          labels:
            - name: "from"
              value: "USD"
            - name: to
              value: GBP

Platform Ready

Canary Checker is ideal for building platforms. Developers can include health checks for their applications in whatever tooling they prefer, with secret management that uses native Kubernetes constructs.

apiVersion: v1
kind: Secret
metadata:
  name: basic-auth
stringData:
  user: john
  pass: doe
---
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: http-basic-auth-secret
spec:
  http:
    - name: http-basic-auth
      url: https://httpbin.flanksource.com/basic-auth/john/doe
      username:
        valueFrom:
          secretKeyRef:
            name: basic-auth
            key: user
      password:
        valueFrom:
          secretKeyRef:
            name: basic-auth
            key: pass

Dashboard

Canary Checker comes with a built-in dashboard by default.

There is also a Grafana dashboard, or build your own using the metrics exposed.

Getting Help

If you have any questions about Canary Checker:

Your feedback is always welcome!

Check Types

ProtocolStatusChecks
HTTP(s)GAResponse body, headers and duration
DNSGAResponse and duration
Ping/ICMPGADuration and packet loss
TCPGAPort is open and connectable
Data Sources
SQL (MySQL, Postgres, SQL Server)GAAbility to login, results, duration, health exposed via stored procedures
LDAPGAAbility to login, response time
Elasticsearch / OpenSearchGAAbility to login, response time, size of search results
MongoDBBetaAbility to login, results, duration
RedisGAAbility to login, results, duration
PrometheusGAAbility to login, query results and duration
Alerts / Events
Prometheus AlertmanagerGAPending and firing alerts
AWS CloudWatch AlarmsGAPending and firing alarms
Dynatrace ProblemsBetaProblems detected
PubSubBetaMessages received from a Pub/Sub subscription
WebhookGAPassive checks created or updated by HTTP POST requests
DevOps
Azure DevOpsBetaPipeline status and duration
Git / GitProtocolRemovedUse exec, junit or webhook checks instead
Integration Testing
ExecGARun scripts or commands
JMeterBetaRuns and checks the result of a JMeter test
JUnit / BYOBetaRun a pod that saves JUnit test results
K6BetaRuns k6 tests that export JUnit via a container
NewmanBetaRuns Newman / Postman tests that export JUnit via a container
PlaywrightBetaRuns Playwright tests that export JUnit via a container
File Systems / Batch
Local Disk / NFSGACheck folders for files that are too few/many, too old/new, too small/large
S3GACheck contents of AWS S3 buckets
GCSGACheck contents of Google Cloud Storage buckets
SFTPGACheck contents of folders over SFTP
SMB / CIFSGACheck contents of folders over SMB/CIFS
Config
AWS ConfigGAQuery AWS Config using SQL
AWS Config RuleGAAWS Config rules that are firing, custom AWS Config queries
Config DB / CatalogGACustom config queries for Mission Control Config DB
KubernetesGAKubernetes resources that are missing or in a non-ready state
Kubernetes ResourceGACreate temporary resources, run nested checks and clean up
Backups
GCP DatabasesGABackup freshness
ResticBetaBackup freshness and integrity
Infrastructure
S3 ProtocolGAAbility to read/write/list objects on an S3 compatible object store
Pod / NamespaceRemovedUse kubernetesResource or kubernetes checks instead
Docker / ContainerdRemovedUse kubernetesResource or exec checks instead
HelmRemovedUse kubernetesResource or exec checks instead

Contributing

See CONTRIBUTING.md

Thank you to all our contributors!

License

Canary Checker core (the code in this repository) is licensed under Apache 2.0 and accepts contributions via GitHub pull requests after signing a CLA.

The UI (Dashboard) is free to use with Canary Checker under a license exception of Flanksource UI

canary
continuous-testing
gitops
kubernetes
kubernetes-operator
mission-control
monitoring
prometheus
prometheus-exporter
synthethic-testing

flanksource/canary-checker

Kubernetes Native Health Check Platform

Go

347

3,530 commits

updated Oct 20, 2026

See the code

README

Kubernetes Native Health Check Platform


Canary Checker is a Kubernetes-native platform for monitoring health across applications and infrastructure using both passive and active (synthetic) mechanisms.

Features

  • Batteries Included - 30+ built-in active and passive check types
  • Kubernetes Native - Health checks, or canaries, are CRDs that reflect health via the status field, making them compatible with GitOps, Flux Health Checks, Argo, Helm, etc.
  • Secret Management - Leverage Kubernetes Secrets and ConfigMaps for authentication and connection details
  • Prometheus - Prometheus-compatible metrics are exposed at /metrics. A Grafana dashboard is also available.
  • Self-Contained Storage - Uses embedded Postgres by default and can be configured to use external Postgres.
  • JUnit Export (CI/CD) - Export health check results to JUnit format for integration into CI/CD pipelines
  • JUnit Import (k6/Newman/Puppeteer/etc.) - Use any container that creates JUnit test results
  • Scriptable - Go templates, JavaScript and CEL can be used to:
    • Evaluate whether a check is passing and severity to use when failing
    • Extract a user friendly error message
    • Transform and filter check responses into individual check results
    • Extract custom metrics
  • Multi-Modal - While designed as a Kubernetes operator, Canary Checker can also run as a CLI and as a standalone server.

Getting Started

  1. Install Canary Checker with Helm
helm repo add flanksource https://flanksource.github.io/charts
helm repo update

helm install \
  canary-checker \
  flanksource/canary-checker \
  -n canary-checker \
  --create-namespace \
  --wait
  1. Create a new check
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: http-check
spec:
  schedule: "@every 30s"
  http:
    - name: basic-check
      url: https://httpbin.flanksource.com/status/200
    - name: failing-check
      url: https://httpbin.flanksource.com/status/500

2a. Run the check locally (Optional)

wget  https://github.com/flanksource/canary-checker/releases/latest/download/canary-checker_linux_amd64 \
-O canary-checker &&  chmod +x canary-checker
./canary-checker run canary.yaml

asciicast

  1. Apply the check
kubectl apply -f canary.yaml
  1. Check the health status
kubectl get canary
NAME         SCHEDULE      STATUS   LAST CHECK   UPTIME 1H        LATENCY 1H   LAST TRANSITIONED
http-check   @every 30s    Passed   13s          18/18 (100.0%)   480ms        13s

See fixtures for more examples and docs for more comprehensive documentation.

Use Cases

Synthetic Testing

Run simple HTTP/DNS/ICMP probes or more advanced full test suites using JMeter, k6, Playwright, Postman/Newman, or any container that can emit JUnit XML.

# Run a container that executes a playwright test, and then collect the
# JUnit formatted test results from the /tmp folder
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: playwright-junit
spec:
  schedule: "@every 2m"
  junit:
    - testResults: "/tmp/"
      name: playwright-junit
      spec:
        containers:
          - name: playwright
            image: ghcr.io/flanksource/canary-playwright:latest

Infrastructure Testing

Verify that infrastructure is fully operational by checking Kubernetes resources, deploying temporary resources, and running nested checks against them.

# Deploy a temporary pod and service, wait for readiness, call the service, and then clean up.
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: kubernetes-resource-check
spec:
  schedule: "@every 5m"
  kubernetesResource:
    - name: service-accessibility
      namespace: default
      waitFor:
        expr: 'dyn(resources).all(r, k8s.isReady(r))'
        interval: 2s
        timeout: 2m
      resources:
        - apiVersion: v1
          kind: Pod
          metadata:
            name: httpbin-pod
            namespace: default
            labels:
              app: httpbin
          spec:
            containers:
              - name: httpbin
                image: kennethreitz/httpbin:latest
                ports:
                  - containerPort: 80
        - apiVersion: v1
          kind: Service
          metadata:
            name: httpbin
            namespace: default
          spec:
            selector:
              app: httpbin
            ports:
              - port: 80
                targetPort: 80
      checks:
        - http:
            - name: call-httpbin-service
              url: http://httpbin.default.svc/status/200
      checkRetries:
        delay: 2s
        interval: 3s
        timeout: 2m

Generic Check Retries

Retry transient failures for any check with retries. It can be set once at canary level or overridden per check.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: api-check
spec:
  schedule: "@every 1m"
  retries:
    maxRetries: 2
    interval: 5s
    timeout: 30s
  http:
    - name: api
      url: https://api.example.com/health
      retries:
        maxRetries: 3
        interval: 2s

Backup Checks / Batch File Monitoring

Check that batch file processes are functioning correctly by checking the age and size of files in local file systems, SFTP, SMB, S3 and GCS.

# Checks that a recent DB backup has been uploaded
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: folder-check
spec:
  schedule: "0 22 * * *"
  folder:
    - path: s3://database-backups/prod
      name: prod-backup
      maxAge: 1d
      minSize: 10gb

Alert Aggregation

Aggregate alerts and recommendations from Prometheus, AWS CloudWatch, Dynatrace, etc.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: alertmanager-check
spec:
  schedule: "*/5 * * * *"
  alertmanager:
    - url: alertmanager.monitoring.svc
      alerts:
        - .*
      ignore:
        - KubeScheduler.*
        - Watchdog
      transform:
        # for each alert, transform it into a new check
        javascript: |
          var out = _.map(results, function(r) {
            return {
              name: r.name,
              labels: r.labels,
              icon: 'alert',
              message: r.message,
              description: r.message,
            }
          })
          JSON.stringify(out);

Prometheus Exporter Replacement

Export custom metrics from the result of any check, making it possible to replace various other Prometheus exporters that collect metrics via HTTP, SQL, etc.

apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: exchange-rates
spec:
  schedule: "@every 1h"
  http:
    - name: exchange-rates
      url: https://api.frankfurter.app/latest?from=USD&to=GBP,EUR,ILS
      metrics:
        - name: exchange_rate
          type: gauge
          value: result.json.rates.GBP
          labels:
            - name: "from"
              value: "USD"
            - name: to
              value: GBP

Platform Ready

Canary Checker is ideal for building platforms. Developers can include health checks for their applications in whatever tooling they prefer, with secret management that uses native Kubernetes constructs.

apiVersion: v1
kind: Secret
metadata:
  name: basic-auth
stringData:
  user: john
  pass: doe
---
apiVersion: canaries.flanksource.com/v1
kind: Canary
metadata:
  name: http-basic-auth-secret
spec:
  http:
    - name: http-basic-auth
      url: https://httpbin.flanksource.com/basic-auth/john/doe
      username:
        valueFrom:
          secretKeyRef:
            name: basic-auth
            key: user
      password:
        valueFrom:
          secretKeyRef:
            name: basic-auth
            key: pass

Dashboard

Canary Checker comes with a built-in dashboard by default.

There is also a Grafana dashboard, or build your own using the metrics exposed.

Getting Help

If you have any questions about Canary Checker:

Your feedback is always welcome!

Check Types

ProtocolStatusChecks
HTTP(s)GAResponse body, headers and duration
DNSGAResponse and duration
Ping/ICMPGADuration and packet loss
TCPGAPort is open and connectable
Data Sources
SQL (MySQL, Postgres, SQL Server)GAAbility to login, results, duration, health exposed via stored procedures
LDAPGAAbility to login, response time
Elasticsearch / OpenSearchGAAbility to login, response time, size of search results
MongoDBBetaAbility to login, results, duration
RedisGAAbility to login, results, duration
PrometheusGAAbility to login, query results and duration
Alerts / Events
Prometheus AlertmanagerGAPending and firing alerts
AWS CloudWatch AlarmsGAPending and firing alarms
Dynatrace ProblemsBetaProblems detected
PubSubBetaMessages received from a Pub/Sub subscription
WebhookGAPassive checks created or updated by HTTP POST requests
DevOps
Azure DevOpsBetaPipeline status and duration
Git / GitProtocolRemovedUse exec, junit or webhook checks instead
Integration Testing
ExecGARun scripts or commands
JMeterBetaRuns and checks the result of a JMeter test
JUnit / BYOBetaRun a pod that saves JUnit test results
K6BetaRuns k6 tests that export JUnit via a container
NewmanBetaRuns Newman / Postman tests that export JUnit via a container
PlaywrightBetaRuns Playwright tests that export JUnit via a container
File Systems / Batch
Local Disk / NFSGACheck folders for files that are too few/many, too old/new, too small/large
S3GACheck contents of AWS S3 buckets
GCSGACheck contents of Google Cloud Storage buckets
SFTPGACheck contents of folders over SFTP
SMB / CIFSGACheck contents of folders over SMB/CIFS
Config
AWS ConfigGAQuery AWS Config using SQL
AWS Config RuleGAAWS Config rules that are firing, custom AWS Config queries
Config DB / CatalogGACustom config queries for Mission Control Config DB
KubernetesGAKubernetes resources that are missing or in a non-ready state
Kubernetes ResourceGACreate temporary resources, run nested checks and clean up
Backups
GCP DatabasesGABackup freshness
ResticBetaBackup freshness and integrity
Infrastructure
S3 ProtocolGAAbility to read/write/list objects on an S3 compatible object store
Pod / NamespaceRemovedUse kubernetesResource or kubernetes checks instead
Docker / ContainerdRemovedUse kubernetesResource or exec checks instead
HelmRemovedUse kubernetesResource or exec checks instead

Contributing

See CONTRIBUTING.md

Thank you to all our contributors!

License

Canary Checker core (the code in this repository) is licensed under Apache 2.0 and accepts contributions via GitHub pull requests after signing a CLA.

The UI (Dashboard) is free to use with Canary Checker under a license exception of Flanksource UI

canary
continuous-testing
gitops
kubernetes
kubernetes-operator
mission-control
monitoring
prometheus
prometheus-exporter
synthethic-testing

Project health

Overall

7.2/10

Maintained

10/10

Code review

0/10

Contributors

10/10
OpenSSF Scorecard

Latest release

v1.2.0 · Jul 7, 2026

Releases this year

2

Significant stargazers

Devin Buhl

920 followers · starred May 2025

Pierre Ozoux

209 followers · starred Aug 2024

Vadim Bauer

187 followers · starred Oct 2026

wuhuizuo

32 followers · starred Apr 2025