This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SQL Query on an Email Alert

Dear Folks,

I have been trying to create an alert for High DHCP Scope Utilization with an Email Notification. In the Email i am unable to put the DHCP Server details if running on the DHCP Scopes. Hence, i have added an sql query to run over it. I put the query as below which i received from Thwack:

${SQL: select distinct a.FriendlyName from [IPAM_DHCPServerReportView] a inner Join [IPAM_DhcpScopeReportView] b on b.ParentID= a.groupid and b.groupid = ${N=SwisEntity;M=NodeScope.GroupId}}

But i am getting Macro SQL Error stating that No Obejct Reference.

I am able to get the value of the ${N=SwisEntity;M=NodeScope.GroupId} separately on the screen. Also if i put a value for it on the SQL i am getting correct answer in alert.

As each time we need to get info based on each DHCP Scope, we need to work such a query.

If anyone has any similar solution, it will be highly appreciable.

  • Try duplicating the alert definition and saving it as a new alert definition. I did this and found that the SQL macros in the new alert (the duplicate) execute correctly. Don't try simulating the alert - the error still shows up there. It should be correct when the alert runs, though.

    Please let me know if this works for you.