GSwarm

How to Set Up the GSwarm Log Monitoring Sidecar: Step-by-Step Guide (2025)

A practical, up-to-date guide for Gensyn AI node operators to install, configure, and run the GSwarm Sidecar for log monitoring and forwarding.

SidecarLog MonitoringGensyn AI NodeGSwarmGuideDevOps

Happy July 4th! 🎆 If you're running a Gensyn AI node and want to keep your logs organized, secure, and visible from anywhere, this guide will walk you through setting up the GSwarm Sidecar. With just a few steps, you'll be able to monitor and forward your Gensyn AI node's logs to your gswarm dashboard to make troubleshooting and analytics a breeze.


1. Clone the GSwarm Sidecar Repository

First, let's get the sidecar code onto your machine. Open your terminal and run:

git clone https://github.com/Deep-Commit/gswarm-sidecar.git
cd gswarm-sidecar

2. Make Sure Go Is Installed

The GSwarm Sidecar is written in Go, so you'll need Go version 1.24 or newer.

Check your Go version:

go version

If you see a version number (like go version go1.24.0 darwin/arm64), you're good to go!
If not, download and install Go here.


3. Configure Log Monitoring

The sidecar uses a YAML config file to know which logs to watch and where to send them.

Open configs/config.yaml in your favorite editor. Here's a sample configuration:

log_monitoring:
  api_endpoint: "https://h9oy4hruxf.execute-api.us-east-1.amazonaws.com/prod/v1/ingest"
  batch_size: 10
  batch_flush_interval: 10
  initial_tail_lines: 100
  log_files:
    - "/user/logs/swarm_launcher.log"  # Main RL-Swarm log file could be in a couple locations depending on if you are using docker or not. 
    # - "/user/logs/other.log"  # Add more if needed
node_id: "my-node-123"
jwt_token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."  # <-- Replace with your actual JWT

What to update:

  • log_files: List the log files you want to monitor from your RL-Swarm node. The main log file is /user/logs/swarm_launcher.logs. Add more paths as needed.
  • node_id: Set a unique name for your Gensyn AI node (e.g., "my-node-123").
  • jwt_token: You'll get this from your dashboard (see next step).

4. Get Your JWT Token

To securely send logs, you'll need a JWT token from your dashboard:

  1. Visit your dashboard's settings page.
  2. Authenticate using your Ethereum wallet.
  3. Copy the JWT token provided.
  4. Paste it into the jwt_token field in your configs/config.yaml.

5. Run the GSwarm Sidecar

You're ready to start monitoring! You can run the GSwarm Sidecar directly or build a binary.

To run directly:

go run cmd/monitor/main.go

To build and run a binary:

go build -o sidecar cmd/monitor/main.go
./sidecar

6. Troubleshooting Tips

  • Log files missing? Double-check the paths in your config and make sure the files exist and are readable by the GSwarm Sidecar process.
  • JWT issues? Make sure your token is valid and hasn't expired.
  • No logs showing up? Check the sidecar's output for errors and verify your API endpoint.

7. Need Help?

If you get stuck, open an issue on GitHub or check the README for more details.


💬 Chat with the AI — Have questions? Get instant help from GSwarm Chat AI.

Enjoy your Independence Day and happy monitoring with GSwarm Sidecar and your Gensyn AI node! 🚀