Determine link-status via Proxmox UI on vmbrs with Linux VLANs

jsterr

Well-Known Member
Jul 24, 2020
687
166
53
32
Is there a way to see the actual link status of the interfaces that are up via UI. We have the following situation, we cant tell if vmbr152 is up or not (it is not) because both (the vmbr152) and the raw-device (enp25s0f1.152) is up (Active=yes), but they are not (they are actually offline)

Is there a way to fix the view or am I missing something?
 

Attachments

  • linux-vlan-active-or-not-active.png
    linux-vlan-active-or-not-active.png
    22.4 KB · Views: 18
Last edited:
No, AFAIU that view parses the /etc/network/interfaces file. It does not check the current state as you can do with ip a for example.
 
Last edited:
  • Like
Reactions: jsterr
Is there a way to put something into the Datacenter-Notes? So I could get the infos via "ip a" and put it into the notes-view for a customer? AKA -> is there a file for it? I might open a feature request for a "Up" column, that checks the interface status.
 
Last edited:
Is there a way to put something into the Datacenter-Notes? So I could get the infos via "ip a" and put it into the notes-view for a customer? AKA -> is there a file for it?
/etc/pve/datacenter.cfg, Stored as the first lines as a comment. Create some notes and then check how it looks. All the other DC configs are stored there too.

So using the API is probably a better way. What worked in a quick test, to keep newlines intact, is to first write it into a file, and then use it for the API call:
For example:
Code:
cat ~/foo
This

is

a

test
```
codeblock
```
And then run
pvesh set cluster/options --description "$(cat ~/foo)"

I might open a feature request for a "Up" column, that checks the interface status.
Please :)
 
  • Like
Reactions: Fathi and jsterr
/etc/pve/datacenter.cfg, Stored as the first lines as a comment. Create some notes and then check how it looks. All the other DC configs are stored there too.

So using the API is probably a better way. What worked in a quick test, to keep newlines intact, is to first write it into a file, and then use it for the API call:
For example:
Code:
cat ~/foo
This

is

a

test
```
codeblock
```
And then run
pvesh set cluster/options --description "$(cat ~/foo)"


Please :)
Thanks Aaron! Did work out well, will script it so it shows all 3 nodes and maybe markdown tables.
How would I set it in nodes-view (notes)? via pvesh?

1692713180577.png
 
Hehe, nice. How often do you run the script to update the notes?

For the node specific description/notes: https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/config (the forum is messing up the link formatting a bit)

Thanks! I did it:

Code:
# Script zum Erstellen der Datacenter Notizen und Eintragen dieser

cat << 'EOF' > notes-interfacesstatus.sh
#!/bin/bash
hostname=`hostname`
ip -brief address > /tmp/interfacestatus &&
awk '{ $1=$1; gsub(" ", "|"); printf "|%s|\n", $0 }' /tmp/interfacestatus > /tmp/temp && mv /tmp/temp /tmp/interfacestatus &&
sed -i '1s/^/|Interface|Status |IP-Adresse| \n/' /tmp/interfacestatus &&
sed -i '2s/^/|--|--|--| \n/' /tmp/interfacestatus &&
echo "|||" >> /tmp/interfacestatus &&
pvesh set /nodes/$hostname/config --description "$(cat /tmp/interfacestatus)" &&
rm /tmp/interfacestatus
EOF

# Script ausführbar machen und testen
chmod +x notes-interfacesstatus.sh

# Cronjob einfügen und Notizen genießen (der Status der Interfaces wird 5 minütlich upgedated)
crontab -e ausführen und folgende Zeile einfügen und mit STRG+X speichern (nano)
*/5 * * * * /root/notes-interfacesstatus.sh >/dev/null 2>&1

Updates the notes every 5 minutes and looks like this:

1692879835000.png
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!