# Server monitoring

Pyvolt automatically monitors your provisioned servers and displays metrics, logs, and an activity trail.

## Metrics

The **Metrics** tab shows resource usage graphs:
- **CPU Usage** -- percentage of CPU in use
- **Memory Usage** -- percentage of RAM in use
- **Disk Usage** -- percentage of root filesystem used
- **Network Bandwidth** -- inbound and outbound traffic in MB

Use the period filter (top right) to switch between:
- **1H** -- last hour
- **6H** -- last 6 hours
- **24H** -- last 24 hours (default)
- **7D** -- last 7 days
- **1M** -- last month

Metrics are collected automatically every 5 minutes via SSH. Data appears shortly after your server is provisioned.

Grab the latest snapshot from your terminal:

```cli
pyvolt metrics my-server
```

## Logs

The **Logs** tab shows a live view of server log files. Use the dropdown to switch between:
- **Nginx Access** -- HTTP request log
- **Nginx Error** -- nginx error log
- **Syslog** -- system messages
- **Auth** -- authentication events (SSH logins, sudo usage)

Logs are syntax-highlighted with colour coding for error levels (red for errors, yellow for warnings, green for info) and HTTP status codes.

## Activity

The **Activity** tab shows an audit trail of all actions on the server:
- Deployments (started, succeeded, failed)
- Service restarts (nginx, Redis)
- Server reboots
- Apps created or deleted
- Settings changes

## Server actions

The gear icon in the server header provides quick actions:
- **Restart nginx** -- restarts the nginx web server
- **Restart Redis** -- restarts the Redis service
- **Reboot server** -- reboots the entire server (requires confirmation)

These actions are logged in the Activity tab.
