Changing Interfaces on Proxmox-Server

Hi Stefan,

we use this approach in our own PVE setup:

  • first make sure, that you have good interface names instead of just Interface 1,2,3…
    see: Monitoring your network: Four rules to rule them all
    This article is written for Checkmk 1.6, but easy to transfer. The 2.0 article will be published soon.
  • After setting these rules and rediscover you will have interfaces like:
    image
    These are the “real” interfaces, that belong to the proxmox host. While these other interfaces belong to the VMs and containers:
    image
    (Btw: The number in the interface name is the VMID of your VM/Container.)
  • As these interfaces will be transferred from e.g. PVE node1 to node2 in case that you migrate a VM within the PVE cluster from node1 to node2, those interfaces would go UNKNOWN on node1 and would be then found on node2. As we don’t want that to happen, we need to create a cluster:
  • Create a cluster host in Checkmk and add your nodes that are part of your Proxmox cluster and set the host to “no ip” (in PVE there is no single cluster IP):
  • Then set up a rule defining what the “clustered services” are. In our case all the VM interfaces:

    This rule is applied to the nodes (not the cluster host!).
    In this example I used a regexp to match all nodes like pve-muc-001, pve-muc-002, etc.
    And use the VM interfaces in the services fields. It’s also a regexp (a prefix match), e.g. Interface tap would match tap106i0.
  • Doing so attaches those VM/Container interfaces to the Cluster which looks like that:

    Here you can see in the status details, that these services are coming from two different hosts/nodes of the cluster.

For very volatile VMs, e.g. test hosts that are coming and going and don’t need to be monitored we do the following:
Create the hosts in PVE with a custom VMID outside of your normal range, e.g. use the range 600-699.
Those VMs will have interfaces like “Interface tap666i0”
Use this in a “disables services” rule to exclude services matching Interface fw6\d\d and Interface tap6\d\d

Hope this helps,
Alex