In version 3.2 of MaaS, automatic tags became available and while this is may be trivial for some, it helps quiet a bit by organizing items automatically. So lets get to it.
Below is a screenshot on what creating a tag looks like, the definitions are in XPath, so in case you weren't familiar, like me, the two backslashes are important. Originally, I thought they were there as comments as I'm unfamiliar with XPath, but the `//` selects nodes in the document from the current node that match the selection no matter where they are. So, be sure they are included.
That said, the examples are nice to have as it shows how to do some basic searches, also MaaS' website also shows some more examples on their 'how to tag machines' page.
For us, we group them two different ways. The first is by machine type to verify their configurations match. This can be done a couple of ways, the first is just looking for an exact match under the `system_vendor` class, but we noticed this didn't always work because the system may include other information, so we had to make sure it contained a string. Both examples are below. //node[@class="system"]/product = "PowerEdge R610" //node[@class="system"]/product[contains(.,"PowerEdge R630")]
The next way to group machines is by their physical location and if their are VM's or not. Their physical location is still difficult to manage based off of the options available. But VM, LXD or physical servers is easy. LXD and and Virsh can be found by using one of their examples:
//node[@class="system"]/vendor = "QEMU"
Based off of their physical location, IPMI power settings would be ideal as we organize the IP's from the racks that they are on. However, since that's not possible, I'm currently at a loss. If you have any ideas, please let me know! Here's a snapshot of the final result of auto tagging.
Your comment will be posted after it is approved.
Leave a Reply. |
AuthorJames Benson is an IT professional. Archives
August 2022
Categories
All
|