Alerting using SWIS variables - The Datastore Story

So I have built a couple of datastore alerts in the Orion alerting engine.  I won't bore you with the technical details of the alert logic, etc. because it doesn't really matter.  My issue is with using SWIS variable references and having them not render in the output.

Here is a portion of the notification entry:

Datastore total latency for ${N=SwisEntity;M=Name} in ${N=SwisEntity;M=Clusters.Name} on ${N=SwisEntity;M=DataCenter.VCenter.Name} is ${LatencyTotal} ms

As you can see the SwisEntity is a datastore.  What I want to do is to display the Cluster name and the vCenter that manages the hosts in that cluster to make it easier for our vCore team to find the offending datastore. (We have lots of vCenters and some of them share cluster names)  However, even those SWQL studio shows that Orion.VIM.Datastores is connected to Orion.VIM.Clusters via a named link 'Clusters' that reference ${N=SwisEntity;M=Clusters.Name} doesn't resolve to the cluster name.

And, just because I am a glutton for punishment, I tried to follow the table links from Orion.VIM.Datastores all the way back to Orion.VIM.VCenters using ${N=SwisEntity;M=DataCenter.VCenter.Name}.

My questions are two-fold:

1)  Why isn't my cluster reference working even though I can see the linked table reference in the Orion.VIM.Datastores table?

2)  Can I follow linked tables across multiple links to go from datastores to clusters to datacenters to vCenters to get the vCenter name?  If so, what am I missing in my variable?

  • Hi, it looks like virtualization alert macros have some issues with navigable properties. You can use custom SWQL macro as a workaround, for example following will get you the cluster name:

    ${N=SWQL;M=SELECT TOP 1 d.Clusters.DisplayName FROM Orion.VIM.Datastores d WHERE DataStoreID=${N=SwisEntity;M=DataStoreID} }

  • Hey Lukas, I tried to get that custom SWQL macro to work but it would not render into a value.  I ended up falling back to a SQL custom value for both the cluster and vCenter name.  I did notice that the alerting engine only says 'Insert custom SQL' not 'SWQL' -- is that an NPM 12 feature?

Reply Children
No Data