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:

FeatureDescription
System MetricsCPU, memory, disk, network, and process monitoring
Auto-DiscoveryAutomatically detect running services
Log MonitoringMonitor log files for errors and patterns
Database MonitoringTrack PostgreSQL and MySQL performance
Advanced AlertingAlert groups, correlation, and flap detection

Getting Started

Creating a Server

1

Navigate to Servers

Go to DashboardServers in the sidebar.

2

Add a new server

Click the Add New Server button in the top right.

3

Enter server details

Enter a descriptive name for your server (e.g., "production-web-1" or "staging-db").

4

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 bash

Option 2: API key as argument

curl -sSL https://pixomonitor.com/install-agent.sh | sudo bash -s YOUR_API_KEY

The 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-agent

The 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:

MetricDescriptionAlert Threshold
CPU UsageOverall CPU utilization percentage> 90%
Load Average1, 5, and 15 minute load averages> CPU count
Memory UsedPercentage of RAM in use> 90%
Memory AvailableFree + cached memory available< 10%
Swap UsageSwap space utilization> 50%
Disk UsagePer-partition disk space used> 85%
Disk I/ORead/write bytes per second
Network TrafficBandwidth 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 TypeDetection Method
Web Serversnginx, Apache, Caddy listening ports
DatabasesPostgreSQL, MySQL, Redis, MongoDB
Message QueuesRabbitMQ, Kafka
ContainersDocker daemon
Custom ServicesConfigurable patterns

How it works:

  1. The agent scans listening ports periodically
  2. Identifies services by port number and process name
  3. Reports discovered services to PixoMonitor
  4. 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:

1

Navigate to the Logs tab

Open your server detail page and click the Logs tab.

2

Add a log file

Click Add Log File and enter the path (e.g., /var/log/nginx/error.log).

3

Configure patterns

Set up patterns to match. Default patterns include:

  • ERROR — Error level messages
  • WARN — Warning level messages
  • Exception — Application exceptions
4

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:

MetricPostgreSQLMySQL
Connection Count
Active Queries
Slow Queries
Replication Lag
Database Size
Table Bloat
Buffer Hit Ratio

Setting up database monitoring:

1

Enable database monitoring

On the Database tab, click Configure for your database type.

2

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';
3

Test connection

Click Test Connection to verify credentials work.

4

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"

  1. Check agent service status:

    sudo systemctl status pixomonitor-agent
  2. View agent logs:

    sudo journalctl -u pixomonitor-agent -f
  3. Verify API key: Check /etc/pixomonitor/agent.conf contains the correct API key.

  4. Check network connectivity:

    curl -I https://pixomonitor.com/api/health
  5. 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

  1. Verify credentials — Test manually with provided username/password
  2. Check permissions — Ensure monitoring user has required grants
  3. Network access — Verify agent can reach database port
  4. 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:

  1. Check log file sizes — Very large logs can cause issues
  2. Reduce monitored items — Disable unused features
  3. 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

  1. Use descriptive server names — Include environment and role (e.g., "prod-web-1", "staging-db")
  2. Set appropriate alert thresholds — Default thresholds work for most cases, but adjust for your workload
  3. Monitor all critical servers — Include web servers, databases, and background workers
  4. Enable auto-discovery — Let PixoMonitor find services you might have missed
  5. Configure log monitoring — Catch errors before they become incidents
  6. Use alert groups — Reduce noise by correlating related alerts
  7. 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.