Skip to main content

Monitor External Hosts

To monitor independent servers outside the Ops Platform deployment node, such as database or cache nodes, install Node Exporter on the target server, then add the host on the "Data Sources" page.

Note

The Ops Platform's standalone deployment node and Kubernetes cluster nodes already run ops-nodeagent, which listens on :59100 automatically. Installing it again may cause port conflicts. These steps apply only to additional external hosts.

  1. Download and extract Node Exporter on the target server. The offline package is in common/, with the same version 1.8.2 as the image:

    wget https://pdpublic.mingdao.com/private-deployment/offline/common/node_exporter-1.8.2.linux-amd64.tar.gz
    tar xvf node_exporter-1.8.2.linux-amd64.tar.gz
    mv node_exporter-1.8.2.linux-amd64 /usr/local/node_exporter
  2. Register the Systemd service:

    cat > /etc/systemd/system/node_exporter.service <<'EOF'
    [Unit]
    Description=Node Exporter
    After=network.target

    [Service]
    User=root
    Type=simple
    ExecStart=/usr/local/node_exporter/node_exporter --web.listen-address=:59100
    Restart=always
    RestartSec=3

    [Install]
    WantedBy=multi-user.target
    EOF
  3. Start the service and enable startup at boot:

    systemctl daemon-reload
    systemctl enable --now node_exporter
    systemctl status node_exporter
  4. Create a "Host" data source on the "Data Sources" page, one per server. Enter the target IP and port 59100, such as 192.168.1.20:59100. Changes take effect within 30 seconds after saving. View the host in "Resource Monitoring → Host" without restarting containers.

    For many hosts, use "Batch Import". Example hostInstance entry in the YAML template:

    sources:
    - kind: hostInstance
    name: extra-node-01
    address: 192.168.1.20:59100
    purposes: [metrics]