GitOps with foureyesctl
import { Steps, Callout, Tabs } from ‘@astrojs/starlight/components’;
foureyesctl is the GitOps CLI. You declare tests, alert rules, and dashboards as
YAML and reconcile them against a live server. Resources are name-keyed (reconcile
matches on name, not id), so the same bundle applies cleanly across environments.
Install the CLI
Section titled “Install the CLI”foureyesctl ships as a pre-built binary. Install it with the one-line installer:
curl -fsSL https://foureyes.space/install.sh \ | sh -s -- --component cliThree commands
Section titled “Three commands”| Command | Does |
|---|---|
foureyesctl export | Dump the live server’s config as YAML. |
foureyesctl diff -f <file|dir> | Show how your declared YAML diverges from live state. |
foureyesctl apply -f <file|dir> | Reconcile declared YAML into the server. |
Global flags include --server, --ca-cert, --insecure (dev), and --token.
A typical workflow
Section titled “A typical workflow”-
Export the current state as a starting point:
Terminal window foureyesctl export > bundle.yaml -
Edit
bundle.yaml— add or change tests, alert rules, dashboards. -
Diff to preview the change:
Terminal window foureyesctl diff -f bundle.yaml -
Apply (dry-run first, then for real):
Terminal window foureyesctl apply -f bundle.yaml --prune --dry-runfoureyesctl apply -f bundle.yaml --prune
Example declaration
Section titled “Example declaration”# An HTTP test against an internal endpoint, alerting on two-of-three nodes.apiVersion: foureyes/v1kind: Testmetadata: name: api-healthspec: type: TEST_TYPE_HTTP target: https://api.internal/healthz interval: 30s assignedNodes: [pop-a, pop-b, pop-c]---apiVersion: foureyes/v1kind: AlertRulemetadata: name: api-downspec: test: api-health metric: success threshold: 1 # success must be >= 1 (i.e. failing when 0) operator: less_than consecutiveRounds: 3 nodeThreshold: 2 # fire when >= 2 of 3 nodes are violating