tutorial

How to Monitor OpenNebula with Vigilmon

OpenNebula is an enterprise cloud management platform for private and hybrid cloud infrastructure. This guide shows you how to monitor the Sunstone UI, oned daemon, scheduler, database, host agents, storage, Oneflow, and TLS certificates with Vigilmon.

OpenNebula is an open source enterprise cloud platform that manages virtual machines, containers, and Kubernetes clusters across on-premises and hybrid infrastructure. When it goes down — or when a component like the scheduler or database becomes unhealthy — VMs stop migrating, new deployments fail, and your cloud management console goes dark.

This tutorial shows you how to monitor every critical component of an OpenNebula deployment using Vigilmon: Sunstone web UI, the oned core daemon, scheduler, database, host monitoring agents, storage drivers, and Oneflow.

What You'll Set Up

  • Sunstone web UI availability monitor (port 9869)
  • OpenNebula daemon (oned) XML-RPC API health check (port 2633)
  • Scheduler daemon (mm_sched) process heartbeat
  • Database backend health (MySQL/MariaDB or SQLite) TCP check
  • Host monitoring agent heartbeat
  • Oneflow service availability check
  • TLS certificate expiry alert

Prerequisites

  • A running OpenNebula installation (6.x or later)
  • Sunstone configured and accessible over HTTP or HTTPS
  • oned listening on port 2633 (XML-RPC API)
  • A free Vigilmon account

Step 1: Monitor the Sunstone Web UI

Sunstone is OpenNebula's main management dashboard. It runs on port 9869 by default.

  1. Log in to vigilmon.online and click Add Monitor.
  2. Set Type to HTTP / HTTPS.
  3. URL: https://your-opennebula-host.example.com:9869/
  4. Expected HTTP status: 200 or 302 (Sunstone may redirect to /login).
  5. Check interval: 1 minute.
  6. Click Save.

If Sunstone crashes or the Ruby/Puma process dies, this monitor fires immediately.


Step 2: Monitor the oned XML-RPC API

The OpenNebula daemon (oned) is the core Cloud Controller that manages the entire VM lifecycle, scheduling, and resource accounting. It exposes an XML-RPC API on port 2633.

TCP port check

  1. Click Add MonitorTCP Port.
  2. Host: your-opennebula-host.example.com, Port: 2633.
  3. Check interval: 1 minute.
  4. Click Save.

XML-RPC API health probe

For a deeper check, poll the one.system.version XML-RPC method from a cron heartbeat:

#!/bin/bash
RESPONSE=$(curl -sf --max-time 10 -H 'Content-Type: text/xml' \
  --data '<?xml version="1.0"?>
<methodCall>
  <methodName>one.system.version</methodName>
  <params>
    <param><value><string>oneadmin:YOUR_ONEADMIN_PASSWORD</string></value></param>
  </params>
</methodCall>' \
  http://localhost:2633/RPC2)

if echo "$RESPONSE" | grep -q "<value>"; then
  curl -sf https://vigilmon.online/heartbeat/YOUR_ONED_HEARTBEAT_ID
fi

Set the heartbeat interval in Vigilmon to 2 minutes. This confirms oned is running AND responding to API calls — a deeper check than a raw TCP connection.


Step 3: Monitor the Scheduler Daemon (mm_sched)

The OpenNebula scheduler (mm_sched) assigns VMs to physical hypervisor hosts. If it dies, new VMs queue in PENDING state indefinitely and no workloads get placed.

Add a process check cron heartbeat on the OpenNebula frontend:

#!/bin/bash
if pgrep -x mm_sched > /dev/null; then
  curl -sf https://vigilmon.online/heartbeat/YOUR_SCHED_HEARTBEAT_ID
fi

Add to cron every 2 minutes:

*/2 * * * * oneadmin /opt/scripts/check-sched.sh

Set the Vigilmon heartbeat interval to 2 minutes. A missed heartbeat means the scheduler has died and VM placement is frozen.


Step 4: Monitor the Database Backend

OpenNebula uses MySQL/MariaDB (or SQLite for small deployments) to store VM definitions, host inventory, user quotas, and network configurations. Database unavailability takes down the entire cloud platform.

MySQL/MariaDB TCP check

  1. Click Add MonitorTCP Port.
  2. Host: your-db-host.example.com, Port: 3306.
  3. Check interval: 1 minute.
  4. Click Save.

Database query heartbeat

For a deeper check, run a test query via cron:

#!/bin/bash
if mysql -u oneadmin -pYOUR_DB_PASSWORD -h localhost opennebula \
  -e "SELECT 1" > /dev/null 2>&1; then
  curl -sf https://vigilmon.online/heartbeat/YOUR_DB_HEARTBEAT_ID
fi

A failed query (authentication error, DB down, connection refused) skips the heartbeat and Vigilmon alerts.


Step 5: Monitor Host Monitoring Agents

OpenNebula polls each physical hypervisor host periodically via SSH to collect resource metrics (CPU, memory, disk). If host probes start timing out, OpenNebula's scheduler works with stale data and may overschedule hosts.

Add a cron heartbeat on the OpenNebula frontend that checks the freshness of host monitoring data:

#!/bin/bash
# Check that at least one host was successfully polled in the last 5 minutes
LAST_POLL=$(onehost list -x 2>/dev/null | \
  grep -oP '(?<=<LAST_MON_TIME>)\d+' | \
  sort -n | tail -1)

NOW=$(date +%s)
AGE=$(( NOW - LAST_POLL ))

if [ "$AGE" -lt 300 ]; then  # 5 minutes
  curl -sf https://vigilmon.online/heartbeat/YOUR_HOST_MON_HEARTBEAT_ID
fi

Set the Vigilmon heartbeat interval to 5 minutes. If all host probes start failing, this heartbeat will miss and you'll be alerted.


Step 6: Monitor Oneflow (Multi-VM Service Orchestration)

If you use Oneflow to manage multi-VM service templates (e.g., web tier + app tier + DB tier as a single service), monitor its availability:

Oneflow listens on port 2474 by default.

  1. Click Add MonitorTCP Port.
  2. Host: your-opennebula-host.example.com, Port: 2474.
  3. Check interval: 2 minutes.
  4. Click Save.

Optionally, add an HTTP check against the Oneflow REST API:

  1. Click Add MonitorHTTP / HTTPS.
  2. URL: http://your-opennebula-host.example.com:2474/service
  3. Expected status: 200 or 401 (unauthorized means the service is up).
  4. Check interval: 2 minutes.

Step 7: Monitor Storage Drivers

OpenNebula's storage subsystem (NFS, Ceph, iSCSI, or local filesystem) holds VM disk images. A storage failure prevents new VM deployments and can cause running VMs to pause.

NFS mount health heartbeat

#!/bin/bash
# Check that the NFS datastore mount is accessible
if timeout 5 ls /var/lib/one/datastores/ > /dev/null 2>&1; then
  curl -sf https://vigilmon.online/heartbeat/YOUR_STORAGE_HEARTBEAT_ID
fi

Ceph cluster health (if using Ceph)

#!/bin/bash
if ceph health | grep -q "HEALTH_OK"; then
  curl -sf https://vigilmon.online/heartbeat/YOUR_CEPH_HEARTBEAT_ID
fi

Set heartbeat intervals to 5 minutes in Vigilmon.


Step 8: TLS Certificate Expiry Monitoring

If Sunstone is configured for HTTPS, an expired certificate locks out all GUI access.

  1. Open the Sunstone monitor from Step 1.
  2. Enable Monitor SSL certificate.
  3. Set Alert when certificate expires in less than 21 days.
  4. Click Save.

Step 9: Configure Alert Channels and Escalation

  1. Go to Alert ChannelsAdd Channel.
  2. Add email, Slack, PagerDuty, or a webhook.
  3. For the Sunstone UI and oned API monitors, set Consecutive failures before alert to 1.
  4. For the scheduler and database monitors, set to 2.
  5. For storage and host monitoring heartbeats, set to 3 — brief storage blips are common during heavy I/O.

Summary

| Monitor | Type | Target | What It Catches | |---------|------|--------|-----------------| | Sunstone UI | HTTP | :9869 | Management dashboard down | | oned XML-RPC | TCP | :2633 | Core daemon unreachable | | oned API | Heartbeat | XML-RPC query via cron | Daemon up but not responding | | mm_sched | Heartbeat | Process check via cron | Scheduler crash, VM placement frozen | | MySQL/MariaDB | TCP | :3306 | Database unreachable | | Database query | Heartbeat | mysql -e "SELECT 1" via cron | DB connection pool exhausted | | Host monitoring | Heartbeat | onehost list freshness check | Host probes timing out | | Oneflow | TCP | :2474 | Service orchestration down | | Storage (NFS/Ceph) | Heartbeat | Mount/health check via cron | Datastore unavailable | | Sunstone TLS | SSL | Port 443/9869 | Certificate expiry |

OpenNebula gives you enterprise-grade VM orchestration on your own hardware — but the complexity of its daemon suite means failures can cascade silently. With Vigilmon watching Sunstone, oned, the scheduler, database, and storage health, you get immediate, actionable alerts before your cloud platform's users notice anything.

Get started free at vigilmon.online — no credit card required.

Monitor your app with Vigilmon

Free plan — 5 monitors, no credit card required. Up and running in 60 seconds.

Start free →