Dynamic labels?

Does anyone know if you can assign a text label for a switch dynamically?

Background… I have an apc switched pdu that has ports that I can turn on and off by calling an exec to a bash script that uses snmp. I would also like to read the port description from the pdu using another exec bash script and have it populate the text label for that switch so that I don’t have to update it in my items file every time I update it on the pdu.

The short answer is no. Once you define the label in your items file or sitemap the only part you can change is the state.

To do what you are after would require a second String item to hold the text.

Rich is right that there is no published facility for changing labels, but if you really, really wanted to change it, you could rewrite your sitemap file using a bash script and sed or similar to transform a “template” sitemap of your own invention, replacing placeholders with the desired label text.