npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rabbittwatch/vps-agent

v1.0.7

Published

Robust log and metrics collector for Rabbittize VPS monitoring

Readme

@rabbittwatch/vps-agent

The official, lightweight, and robust log and metrics collector agent for RabbittWatch.

This package is designed to be installed globally on a Virtual Private Server (VPS). It automatically collects system health metrics (CPU, memory, disk, network), Docker container logs, PM2 process logs, and web server logs (Nginx/Apache), streaming them securely to your RabbittWatch observability dashboard.

Features

  • System Metrics: Automatically gathers CPU usage, Memory utilization, Disk space, and Network traffic.
  • Docker Container Logs: Auto-discovers active Docker containers and streams their console logs.
  • PM2 logs: Intercepts and logs output from applications managed by PM2.
  • Web Server Logs: Automatically tails Nginx (error/access) and Apache web server log files.
  • Local Buffer Resilience: Buffers metrics/logs locally in a .rabbitt-buffer.json file if the network is disconnected, flushing it once connection is restored.
  • Dynamic Settings Sync: Polls your RabbittWatch dashboard settings every 10 minutes to auto-sync configurations (e.g., active log sources, intervals).
  • Built-in CLI Diagnostics: Fast diagnostic commands like rabbitt-agent logs to inspect agent streaming health instantly.

Installation

Install the package globally via npm:

sudo npm install -g @rabbittwatch/vps-agent

Setup & Configuration

Configure the agent by defining system environment variables or creating a .env file in your agent's working directory.

Configuration Options

| Variable | Description | Default | Required | |----------|-------------|---------|----------| | AGENT_ID | Your unique Agent ID from the RabbittWatch dashboard. | - | Yes | | INGEST_KEY | Your project's secure Ingest Key. | - | Yes | | API_BASE_URL | The API endpoint of the RabbittWatch dashboard service. | http://localhost:4000 | No | | COLLECTION_INTERVAL | Interval in seconds between metrics collection cycles. | 300 | No | | ENABLED_SOURCES | Comma-separated log sources to tail (system, docker, pm2, nginx, apache). | system,docker,pm2,nginx,apache | No |

Running the Agent

You can start the agent directly:

rabbitt-agent

Production Deployment (Recommended)

To ensure the agent starts on system boot, restarts automatically on failures, and runs cleanly in the background, deploy it as a Systemd Service.

1. Create Systemd Service File

Create a new configuration file at /etc/systemd/system/rabbitt-agent.service:

[Unit]
Description=RabbittWatch VPS Agent
After=network.target

[Service]
Type=simple
User=root
Environment=PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Environment=AGENT_ID=your-agent-id
Environment=INGEST_KEY=your-ingest-key
Environment=API_BASE_URL=https://your-rabbittwatch-domain.com
Environment=ENABLED_SOURCES=system,docker,pm2,nginx,apache
ExecStart=/usr/bin/node /usr/lib/node_modules/@rabbittwatch/vps-agent/dist/index.js
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

[!NOTE] Ensure the paths to node and the agent script match your system's global paths (check using which node and readlink -f $(which rabbitt-agent)).

2. Enable & Start Service

Reload systemd, enable the service, and start the agent:

sudo systemctl daemon-reload
sudo systemctl enable rabbitt-agent
sudo systemctl start rabbitt-agent

3. Check Live Logs

Run the easy-to-remember log CLI command to monitor live agent activity:

rabbitt-agent logs

Troubleshooting

  • Check Service Status: Use standard system tools (systemctl status rabbitt-agent).
  • Web Server Permissions: Ensure the user running the agent (e.g. root) has appropriate read permissions to access files in /var/log/nginx/ and /var/log/apache2/.
  • Docker Access: Ensure the user is in the docker group or the process runs as root to access container stdout/stderr.
  • Local Buffer Diagnostics: Check if .rabbitt-buffer.json exists in the agent's running path. If present, it indicates network connectivity issues prevent logs from uploading.

License

MIT