Queries to get a listing of alarm policies in DX UIM
search cancel

Queries to get a listing of alarm policies in DX UIM

book

Article ID: 375963

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

Need a query to get a listing of current alarm policies in the database.

Environment

  • DX UIM 23.4.3
  • Alarm Policies

Cause

Guidance

Resolution

--BASIC QUERY TO GET A LIST OF POLICIES, THRESHOLDS

select * from policy p

join PolicyCondition pc on pc.policy_id = p.id

join PolicyMetric pm on pm.id = pc.policyMetric_id

join PolicyTarget pt on pt.id = pm.id

join policythreshold pot on pot.condition_id = pm.id

 

--GET A LISTING OF CURRENT POLICIES where TYPE = DEVICE

select

p.name as policyname,

pm.name as QOS,

pm.probename as probe,

pm.description,

pm.shortunit as unit,

pt.name as device_group,

pt.type,

pot.operator,

pot.value as threshold,

pot.severity,

pot.type

from policy p

join PolicyCondition pc on pc.policy_id = p.id

join PolicyMetric pm on pm.id = pc.policyMetric_id

join PolicyTarget pt on pt.id = pm.id

join policythreshold pot on pot.condition_id = pm.id

where pt.type = 'DEVICE'

 

--GET A LISTING OF CURRENT POLICIES where TYPE = GROUP

select

ccs.name as devicename,

p.name as policyname,

pm.name as QOS,

pm.probename as probe,

pm.description,

pm.shortunit as unit,

pt.name as device_group,

pt.type,

pot.operator,

pot.value as threshold,

pot.severity,

pot.type

from policy p

join PolicyCondition pc on pc.policy_id = p.id

join PolicyMetric pm on pm.id = pc.policyMetric_id

join PolicyTarget pt on pt.id = pm.id

join policythreshold pot on pot.condition_id = pm.id

join cm_group cg on cg.name = pt.name

join cm_group_member cgm on cgm.grp_id = cg.grp_id

join cm_computer_system ccs on ccs.cs_id = cgm.cs_id

where pt.type = 'GROUP' order by ccs.name asc