Silverhawk APM — Infrastructure Setup

Learn how to connect your server or VM to Silverhawk APM using the silverhawk-infra agent to start collecting real-time CPU, memory, disk, and network metrics.

1. Prerequisites

Ensure your environment meets the requirements before proceeding.

  • Active Silverhawk APM account — Sign up here
  • SSH access to your server or VM
  • Node.js v16 or higher
  • Outbound HTTPS access to https://api.silverhawk.io

bash

node -v && npm -v

2. Create a New Infrastructure

Define your server in the Silverhawk APM dashboard.

  1. Log in to your dashboard → Infrastructures → Add New Infrastructure.
  2. Fill in the following details:
    FieldDescriptionExample
    NameIdentifier for your hostProduction Contabo Server
    DescriptionPurpose of this serverRuns main MERN backend
    TagsFor filtering & groupingproduction, backend, contabo
    EnvironmentChoose infra typeProduction
    Operating SystemSelect your host OSUbuntu 22.04 LTS

3. Install the Infra Agent

Install the Silverhawk Infra agent globally on your target server.

bash

ssh root@<your-server-ip> npm install -g silverhawk-infra silverhawk-infra --version

The agent will automatically create a background service for metric collection.

4. Verify Agent Connectivity

Use a heartbeat check to validate your API key and network connection.

bash

silverhawk-infra heartbeat --api-key <YOUR_API_KEY>

✅ If successful, you’ll see: Heartbeat OK

5. Start the Infra Agent

Start the Silverhawk Infra Agent to begin sending metrics.

bash

silverhawk-infra start --api-key <YOUR_API_KEY>

bash

silverhawk-infra status

Agent logs are available at /var/log/silverhawk-infra/agent.log.

6. Monitor Your Server

Once the agent is running, data appears automatically in the dashboard.

Navigate to your dashboard → Infrastructures → Select your server.

  • CPU Load (%)
  • Memory Usage (MB / %)
  • Disk Utilization
  • Network Throughput (In/Out)

Metrics can take up to 30 seconds to appear after the first data push.

7. Troubleshooting

Common setup issues and their resolutions.

IssuePossible CauseSolution
Invalid API KeyKey expired or typoRegenerate from Dashboard → Settings → API Keys
Connection TimeoutFirewall or proxy blocking 443Allowlist api.silverhawk.io
Metrics Not VisibleAgent stopped or host clock mismatchRestart agent, ensure NTP sync

Next Steps

Enhance your observability setup.

  • Set up alert rules for CPU, memory, and disk thresholds.
  • Install silverhawk-logs to centralize application logs.
  • Deploy Infra Agents across multiple servers for full coverage.

9. Next Steps

  • Enable alert policies for CPU/memory thresholds.
  • Integrate Silverhawk Logs for unified observability.
  • Deploy agents using Docker or Kubernetes DaemonSets.
  • Use the Silverhawk SDK to emit custom app metrics.

Need automation? Use our Terraform Provider to register infrastructures programmatically.

💬 Need Help?