Reminders
Question

Dynamic Group - Devices Without Action Policy

2 years ago
OfflineJeeves Murphy
Jeeves Murphy

Good Afternoon everyone,

I apologize if this quesiton has already been answered. I'm looking for a quick way to view devices that do not have action policies attached.  I'm currently using Dynamic Groups to look at Systems with specific action policies.  For example:

SELECT DISTINCT Device.nDeviceID
FROM Device
JOIN ActionPolicy
ON Device.nActionPolicyID = ActionPolicy.nActionPolicyID
WHERE ActionPolicy.sPolicyName LIKE N'%Generic Priority%'
AND Device.bRemoved = 0

And this works great for specific priorities, but for auditing purposes, I'd like to be able to see if there are any systems that were added without action policies.

What might be easier (and more accurate for what I'm looking for) is to be able to display devices that do not have specific action policies applied.  For example: Let's say we have a total of 5 action policies that we utilize.  Could we say something like "WHERE ActionPolicy.sPolicyName NOT LIKE N'%Priority1%' or N'%Priority2%'" etc etc?

Thank you for any help you can supply.

~Jeeves

-----
You had this question too1 person has this question.
 
Answered

0 Answers:

1 Reply

OfflineBryan Yoch Bryan Yoch said 2 years ago

http://community.whatsupgold.com/script_library/dynamicgroups/deviceswithnoactionsassigned

[Originally posted by Kerry Myers1568]

Used to identify devices which have no actions assigned to the device or any of the active monitors on that device.

SELECT  Device.nDeviceID
FROM Device   
LEFT OUTER JOIN ActionPolicy   
ON Device.nActionPolicyID = ActionPolicy.nActionPolicyID   
LEFT OUTER JOIN PivotActiveMonitorTypeToDevice   
ON Device.nDeviceID = PivotActiveMonitorTypeToDevice.nDeviceID   
LEFT OUTER JOIN ActionPolicy AP
ON PivotActiveMonitorTypeToDevice.nActionPolicyID =   
AP.nActionPolicyID
WHERE Device.bRemoved = 0   
AND ActionPolicy.sPolicyName IS NULL
GROUP BY Device.nDeviceID
Having MAX(AP.sPolicyName) IS NULL


Would you like to comment?

You must be a member. Sign In if you are already a member.

  • 879 views
  • 1 version
  • 1 reply
  • 0 followers
     
Post Date:
April 5, 2011
Posted By:
Jeeves Murphy

Related Content

Search this area

About this forum

  • 142k views
  • 2222 topics
  • 55 followers
     

Post questions and find answers for all things related to the Standard and Premium Editions of WhatsUp gold.


Viewed 879 times