In Alert Manager, when using a Custom Node Poller, some variables like $GroupName is not available.
It prevents me from sending the proper information back on a trap to an outside monitoring system (a NOC)
GroupName is not available because that variable is not stored in the Nodes table. In fact, as a node can belong to multiple groups, it will be somewhat difficult to implement and parse. Something similar is if you would want all the interface names (that are being polled) of that node. If you specific only 1 group per node, a workaround is to make that into a custom variable, and then use dynamic queries on that variable to populate the groups.
That would be nice if at least it would be marked, black on white, in the documentation or online help . I spent half a day trying to find out why and looking into manuals, then an hour on the phone with technical support. Now that I know, I understand the logic behind.
SW should introduce a concept of Primary group for that kind of purpose...