Server Monitoring
Server monitoring requires installing a lightweight agent on your servers.
Monitor your servers in real-time with PixoMonitor's agent-based server monitoring. Track CPU, memory, disk, network, and processes, with advanced features like auto-discovery, log monitoring, and database performance tracking.
Overview
Server monitoring provides deep visibility into your infrastructure:
| Feature | Description |
|---|---|
| System Metrics | CPU, memory, disk, network, and process monitoring |
| Auto-Discovery | Automatically detect running services |
| Log Monitoring | Monitor log files for errors and patterns |
| Database Monitoring | Track PostgreSQL and MySQL performance |
| Advanced Alerting | Alert groups, correlation, and flap detection |
Getting Started
Creating a Server
Navigate to Servers
Go to Dashboard → Servers in the sidebar.
Add a new server
Click the Add New Server button in the top right.
Enter server details
Enter a descriptive name for your server (e.g., "production-web-1" or "staging-db").
Copy the install command
After creating the server, copy the provided install command. This includes your unique API key.
Installing the Agent
Run the provided install command on your server. The script will automatically download, install, and start the PixoMonitor agent.
Option 1: API key in URL parameter
curl -sSL "https://pixomonitor.com/install-agent.sh?key=YOUR_API_KEY" | sudo bashOption 2: API key as argument
curl -sSL https://pixomonitor.com/install-agent.sh | sudo bash -s YOUR_API_KEYThe install script supports Ubuntu, Debian, CentOS, RHEL, and Amazon Linux. It installs the agent as a systemd service that starts automatically on boot.
Verifying Installation
After installation, verify the agent is running:
sudo systemctl status pixomonitor-agentThe agent will begin sending metrics immediately. Return to PixoMonitor and your server should show as Online within 30 seconds.
If your server shows "Offline", check that the agent service is running and that outbound HTTPS (port 443) is allowed in your firewall.
Metrics Collected
Tier 1 — System Metrics
System metrics are collected every 30 seconds and provide core visibility into server health:
| Metric | Description | Alert Threshold |
|---|---|---|
| CPU Usage | Overall CPU utilization percentage | > 90% |
| Load Average | 1, 5, and 15 minute load averages | > CPU count |
| Memory Used | Percentage of RAM in use | > 90% |
| Memory Available | Free + cached memory available | < 10% |
| Swap Usage | Swap space utilization | > 50% |
| Disk Usage | Per-partition disk space used | > 85% |
| Disk I/O | Read/write bytes per second | — |
| Network Traffic | Bandwidth in/out per interface | — |
CPU Monitoring
The agent tracks:
- Overall CPU percentage across all cores
- Per-core utilization (visible in detailed view)
- Load averages (1, 5, 15 minutes)
Memory Monitoring
Memory metrics include:
- Used — Memory actively in use by applications
- Free — Completely unused memory
- Cached — Memory used for disk caching (can be reclaimed)
- Buffers — Memory used for I/O buffers
- Swap — Virtual memory on disk
Linux may show low "free" memory even when the system is healthy. Check "available" memory, which includes cache that can be reclaimed.
Disk Monitoring
Per-partition metrics:
- Total size, used space, available space
- Usage percentage
- Read/write I/O rates (bytes/second)
- I/O wait percentage
Network Monitoring
Per-interface bandwidth:
- Bytes received and transmitted
- Packets in/out
- Errors and dropped packets
Process Monitoring
Top processes by resource usage:
- Top 10 processes by CPU usage
- Top 10 processes by memory usage
- Process names, PIDs, and resource percentages
Tier 2 — Advanced Monitoring
Advanced monitoring features require additional configuration but provide deeper insights.
Auto-Discovery
Auto-discovery automatically detects running services on your server:
| Service Type | Detection Method |
|---|---|
| Web Servers | nginx, Apache, Caddy listening ports |
| Databases | PostgreSQL, MySQL, Redis, MongoDB |
| Message Queues | RabbitMQ, Kafka |
| Containers | Docker daemon |
| Custom Services | Configurable patterns |
How it works:
- The agent scans listening ports periodically
- Identifies services by port number and process name
- Reports discovered services to PixoMonitor
- Optionally enables detailed monitoring for discovered services
Auto-discovery runs every 5 minutes. Navigate to the Discovery tab on your server to see detected services and enable monitoring.
Log Monitoring
Monitor log files for errors, warnings, and custom patterns:
Navigate to the Logs tab
Open your server detail page and click the Logs tab.
Add a log file
Click Add Log File and enter the path (e.g., /var/log/nginx/error.log).
Configure patterns
Set up patterns to match. Default patterns include:
ERROR— Error level messagesWARN— Warning level messagesException— Application exceptions
Set alert thresholds
Configure how many matches trigger an alert (e.g., 5 errors in 5 minutes).
Supported log formats:
- Plain text logs
- JSON-formatted logs
- Syslog format
- Custom patterns via regex
Ensure the agent has read permission on log files. For system logs, the agent runs as root. For application logs, you may need to adjust file permissions.
Database Monitoring
Monitor PostgreSQL and MySQL database performance:
| Metric | PostgreSQL | MySQL |
|---|---|---|
| Connection Count | ✓ | ✓ |
| Active Queries | ✓ | ✓ |
| Slow Queries | ✓ | ✓ |
| Replication Lag | ✓ | ✓ |
| Database Size | ✓ | ✓ |
| Table Bloat | ✓ | — |
| Buffer Hit Ratio | ✓ | ✓ |
Setting up database monitoring:
Enable database monitoring
On the Database tab, click Configure for your database type.
Provide credentials
Enter a read-only database user for monitoring:
-- PostgreSQL
CREATE USER pixomonitor WITH PASSWORD 'your_password';
GRANT pg_monitor TO pixomonitor;
-- MySQL
CREATE USER 'pixomonitor'@'localhost' IDENTIFIED BY 'your_password';
GRANT PROCESS, REPLICATION CLIENT ON *.* TO 'pixomonitor'@'localhost';Test connection
Click Test Connection to verify credentials work.
Save configuration
Save to start collecting database metrics.
Database monitoring requires network access from the agent to the database. For local databases, use localhost or socket connections.
Advanced Alerting
Advanced alerting features help reduce noise and provide better context:
Alert Groups
Group related alerts together:
- Combine multiple metrics into a single alert group
- Receive one notification for correlated issues
- Example: CPU spike + high disk I/O = single "performance degradation" alert
Flap Detection
Prevent alert storms from unstable services:
- Detects rapid up/down state changes
- Suppresses notifications during flapping
- Alerts when service stabilizes
Alert History Timeline
View complete alert history:
- Timeline view of all state changes
- Duration of each state
- Correlation with metrics at alert time
Server Detail Page
Click on any server in the dashboard to access the detail page with five tabs:
Overview Tab
Real-time gauges and charts:
- CPU Gauge — Current CPU usage with historical sparkline
- Memory Gauge — RAM utilization with breakdown
- Disk Charts — Per-partition usage bars
- Network Graph — Live bandwidth in/out
- Process List — Top processes by CPU and memory
Discovery Tab
Auto-discovered services:
- List of detected services
- Service type, port, and status
- Enable/disable detailed monitoring
- Last discovery scan time
Logs Tab
Log file monitoring:
- Configured log files and their paths
- Recent matches and error counts
- Add/remove log files
- Pattern configuration
Database Tab
Database performance metrics:
- Connection pool status
- Query statistics
- Slow query log
- Replication status (if applicable)
Alerts Tab
Server-specific alerts:
- Active alerts and their status
- Alert history timeline
- Alert group configuration
- Flap detection status
Troubleshooting
Agent Shows "Offline"
-
Check agent service status:
sudo systemctl status pixomonitor-agent -
View agent logs:
sudo journalctl -u pixomonitor-agent -f -
Verify API key: Check
/etc/pixomonitor/agent.confcontains the correct API key. -
Check network connectivity:
curl -I https://pixomonitor.com/api/health -
Restart the agent:
sudo systemctl restart pixomonitor-agent
No Metrics Appearing
- Wait 60 seconds — Metrics take up to a minute to appear after agent start
- Check agent logs for connection errors
- Verify firewall allows outbound HTTPS (port 443)
- Check system resources — agent needs minimal CPU/memory to run
Database Monitoring Not Working
- Verify credentials — Test manually with provided username/password
- Check permissions — Ensure monitoring user has required grants
- Network access — Verify agent can reach database port
- Socket vs TCP — Use correct connection type for local databases
High Agent Resource Usage
The agent is designed to be lightweight (< 1% CPU, < 50MB RAM). If you see high usage:
- Check log file sizes — Very large logs can cause issues
- Reduce monitored items — Disable unused features
- Update agent — Newer versions have performance improvements
For persistent issues, contact support with your server ID and agent logs. Run journalctl -u pixomonitor-agent --since "1 hour ago" to collect recent logs.
Best Practices
- Use descriptive server names — Include environment and role (e.g., "prod-web-1", "staging-db")
- Set appropriate alert thresholds — Default thresholds work for most cases, but adjust for your workload
- Monitor all critical servers — Include web servers, databases, and background workers
- Enable auto-discovery — Let PixoMonitor find services you might have missed
- Configure log monitoring — Catch errors before they become incidents
- Use alert groups — Reduce noise by correlating related alerts
- Review metrics regularly — Establish baselines and spot trends
Server monitoring integrates with all other PixoMonitor features. Link servers to status pages, include them in escalation policies, and track SLA metrics across your infrastructure.
