Loading…
Loading documentation...
Collect metrics and logs to monitor availability and performance.
Set up comprehensive monitoring for your instances using Prometheus for metrics collection, Grafana for visualization, and Loki for log aggregation.
Every server's page shows, with nothing to install:
For per-core figures, disk I/O or your application's own metrics, deploy Prometheus and Grafana as below.
For advanced monitoring, deploy Prometheus and Grafana on a dedicated monitoring instance.
# Download and install
useradd --no-create-home --shell /bin/false prometheus
mkdir -p /etc/prometheus /var/lib/prometheus
curl -LO https://github.com/prometheus/prometheus/releases/download/v2.53.0/prometheus-2.53.0.linux-amd64.tar.gz
tar xzf prometheus-2.53.0.linux-amd64.tar.gz
cp prometheus-2.53.0.linux-amd64/prometheus /usr/local/bin/
cp prometheus-2.53.0.linux-amd64/promtool /usr/local/bin/
# /etc/prometheus/prometheus.yml
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'node'
static_configs:
- targets:
- 'web-1-private-ip:9100'
- 'web-2-private-ip:9100'
- 'db-primary-private-ip:9100'
- job_name: 'app'
static_configs:
- targets:
- 'web-1-private-ip:3000'
- 'web-2-private-ip:3000'
metrics_path: /metrics
curl -LO https://github.com/prometheus/node_exporter/releases/download/v1.8.1/node_exporter-1.8.1.linux-amd64.tar.gz
tar xzf node_exporter-1.8.1.linux-amd64.tar.gz
cp node_exporter-1.8.1.linux-amd64/node_exporter /usr/local/bin/
cat > /etc/systemd/system/node_exporter.service <<'EOF'
[Unit]
Description=Node Exporter
After=network.target
[Service]
User=nobody
ExecStart=/usr/local/bin/node_exporter
Restart=always
[Install]
WantedBy=multi-user.target
EOF
systemctl enable node_exporter
systemctl start node_exporter
apt install -y apt-transport-https software-properties-common
curl -fsSL https://apt.grafana.com/gpg.key | gpg --dearmor -o /usr/share/keyrings/grafana.gpg
echo "deb [signed-by=/usr/share/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee /etc/apt/sources.list.d/grafana.list
apt update && apt install -y grafana
systemctl enable grafana-server
systemctl start grafana-server
Access Grafana at http://MONITORING_IP:3000 (default login: admin/admin).
In Grafana: Configuration > Data Sources > Add data source > Prometheus. Set URL to http://localhost:9090.
Expose custom metrics from your application:
// Express + prom-client example
const client = require('prom-client');
const collectDefaultMetrics = client.collectDefaultMetrics;
collectDefaultMetrics();
const httpRequests = new client.Counter({
name: 'http_requests_total',
help: 'Total HTTP requests',
labelNames: ['method', 'path', 'status'],
});
app.use((req, res, next) => {
res.on('finish', () => {
httpRequests.inc({ method: req.method, path: req.path, status: res.statusCode });
});
next();
});
app.get('/metrics', async (req, res) => {
res.set('Content-Type', client.register.contentType);
res.send(await client.register.metrics());
});
Alerts are set per server in your Servers Are Up dashboard:
Or use Prometheus Alertmanager for advanced alerting rules.
| Metric | Warning | Critical |
|---|---|---|
| CPU Usage | > 70% for 5 min | > 90% for 5 min |
| Memory Usage | > 80% | > 95% |
| Disk Usage | > 75% | > 90% |
| 5xx Error Rate | > 1% | > 5% |
| Response Latency (p95) | > 500ms | > 2s |
Every Servers Are Up virtual machine and container includes an integrated HTML5 browser-based SSH, RDP, and VNC console in your dashboard, default-off inbound firewall rules with per-IP allow-lists, and full programmatic control via REST API v1 and Model Context Protocol (MCP). Explore our Virtual Datacenter Plans or reach out to Servers Are Up Support.