Check Reference
Checks run during verify. They are target-side assertions and do not modify the source.
Checks an HTTP or HTTPS endpoint.
- type: http name: public-health data: url: http://127.0.0.1/health hostHeader: example.com timeoutSeconds: 10Fields:
url: requiredhttporhttpsURL.hostHeader: optional Host header.timeoutSeconds: optional 1-300 seconds. Defaults to 10.
Generated command:
curl --fail --silent --show-error --max-time <timeout> [--header "Host: <hostHeader>"] <url>Target capability:
curl
laravelDatabase
Section titled “laravelDatabase”Checks that a Laravel app container can open its configured database connection.
- type: laravelDatabase name: app-db data: container: customer-appGenerated command:
docker exec <container> php artisan tinker --execute=DB::connection()->getPdo(); echo 'hostshift-db-ok';Target capability:
docker-runtime
fileExists
Section titled “fileExists”Checks that a target file exists.
- type: fileExists name: nginx-site data: path: /etc/nginx/sites-available/customer.confGenerated command:
test -f <path>fileContains
Section titled “fileContains”Checks that a target file contains a literal string.
- type: fileContains name: ssh-keepalive data: path: /etc/ssh/sshd_config.d/99-hostshift.conf contains: ClientAliveInterval 120Generated command:
grep -Fq -- <contains> <path>The contains value must be a non-empty single-line literal.
mysqlScalar
Section titled “mysqlScalar”Runs a single read-only MySQL SELECT and compares the scalar result.
- type: mysqlScalar name: page-count data: database: customer_db query: SELECT COUNT(*) FROM pages expected: "42"Rules:
querymust be one single-lineSELECT.- semicolons and SQL mutation tokens are rejected.
expectedmust be a non-empty single-line string.
Generated command:
mysql --batch --skip-column-names --database=<database> --execute=<query>Target capability:
mysql-client
postgresScalar
Section titled “postgresScalar”Runs a single read-only PostgreSQL SELECT and compares the scalar result.
- type: postgresScalar name: metric-count data: database: customer_pg query: SELECT COUNT(*) FROM metrics expected: "2"Generated command:
runuser -u postgres -- psql --tuples-only --no-align --dbname=<database> --command=<query>Target capabilities:
postgresql-serverpostgresql-client
serviceActive
Section titled “serviceActive”Checks a systemd service is active.
- type: serviceActive name: nginx-service data: service: nginxGenerated command:
systemctl is-active --quiet <service>ufwRule
Section titled “ufwRule”Checks that a target UFW rule exists.
- type: ufwRule name: mysql-rule data: from: 172.17.0.0/16 port: 3306 proto: tcpGenerated command:
ufw show added | grep -Fq -- "ufw allow from <from> to any port <port> proto <proto>"nftRule
Section titled “nftRule”Checks that a target nftables chain contains a literal rule fragment.
- type: nftRule name: mysql-nft data: family: inet table: hostshift chain: input contains: tcp dport 3306 acceptRules:
familymust beinet,ip, orip6.tableandchainmust be safe identifiers.containsmust be a non-empty single-line literal.
nginxConfig
Section titled “nginxConfig”Validates Nginx configuration and reloads or restarts Nginx on the target.
- type: nginxConfig name: reload-nginxGenerated command:
nginx -t && (systemctl reload nginx || systemctl restart nginx)This check has service impact because it can reload the target service.