Skip to main content

Checkly Agent Configuration

The Checkly Agent is a lightweight container that executes monitoring checks within your Private Location. This guide covers advanced configuration options, environment variables, security settings, and production deployment practices.

Environment Variables

Configure your Checkly Agent using these environment variables:

Essential Configuration

Network and Proxy Configuration

These proxy settings apply to agent management traffic to Checkly’s API. For check-specific proxy configuration, see the Proxy Setup guide.

Security and TLS Configuration

Production Deployment Examples

Docker with Resource Limits

Docker Compose

Systemd Service

Create /etc/systemd/system/checkly-agent.service:
Enable and start:

Local Development Setup

For local testing and development, use Docker Desktop to bridge to localhost services:
Use host.docker.internal instead of localhost to access services running on your host machine from within Docker containers.

Agent Lifecycle Management

Monitoring Agent Health

Check agent status and logs:
Healthy agent logs should show:

Agent Updates

Production Update Strategy: Use caution with automatic updates. Pin specific versions in production and test updates in staging first.

Manual Updates

Automated Updates with Watchtower

Rolling Updates for Multiple Agents

API Key Management

Key Rotation Process

Rotate API keys regularly for security: Create a new API key for your Private Location
  1. Add second key in the Checkly UI
  2. Deploy new agents with the new key
  3. Verify connectivity of new agents
  4. Remove old agents using the old key
  5. Delete old key from Checkly UI
Manage multiple API keys for secure rotation

Zero-Downtime Key Rotation

Finding API Keys in Running Containers

Agent Versions and Runtime Compatibility

Each agent version supports a specific Checkly runtime:
Version Pinning: Always pin specific agent versions in production. Use checkly/agent:6.0.3 instead of checkly/agent:latest to ensure consistent behavior.

Checking Runtime Compatibility

Troubleshooting

Agent Won’t Connect

Symptoms: Agent starts but doesn’t appear in Private Locations dashboard Solutions:
  1. Check API key: Verify the key is correct and hasn’t been deleted
  2. Verify network access: Ensure outbound HTTPS to agent.checklyhq.com
  3. Check proxy configuration: If using a proxy, verify settings

TLS Certificate Issues

Symptoms: SSL/TLS connection errors in logs Solutions:
  1. Add enterprise CA certificates:
  2. Temporarily bypass TLS verification (not recommended for production):

Resource and Performance Issues

Symptoms: Slow check execution, out of memory errors Solutions:
  1. Optimize job concurrency based on available memory:
  2. Monitor resource usage:
  3. Check for memory leaks:

Check Execution Issues

Symptoms: Checks fail only from private location Solutions:
  1. Test network connectivity:
  2. Check DNS resolution:
  3. Enable OS DNS resolver for internal services:

Best Practices

  • Pin specific agent versions in production
  • Rotate API keys regularly (quarterly)
  • Use secrets management for API keys
  • Enable TLS certificate validation
  • Monitor agent access logs
  • Deploy at least 2 agents per location
  • Use container restart policies
  • Implement health checks
  • Monitor agent connectivity
  • Plan for rolling updates
  • Right-size job concurrency for your workload
  • Monitor memory usage patterns
  • Use resource limits in production
  • Scale horizontally when needed
  • Profile check execution times
  • Centralize logging and monitoring
  • Automate agent deployment
  • Document configuration decisions
  • Test updates in staging first
  • Maintain update procedures