nas: alarm_enrichment rule

Document ID:  TEC1206036
Last Modified Date:  08/04/2017
{{active ? 'Hide' : 'Show'}} Technical Document Details

Products

  • CA Unified Infrastructure Management

Releases

  • CA Unified Infrastructure Management:Release:8.51

Components

  • UIM - ALARM_ENRICHMENT:UIMALM
Introduction:

We want an alarm_enrichment rule to lookup the device details in our CMDB based on the short name / hostname and not the FQDN.  The trouble is the source alarm contains the FQDN and the CMDB contains the short name / hostname.

 

Question:

In the "nas" Raw Configure, there is a parameter: "lookup_by_regexp".

Using a regex like "(^.*(?=(\.)))" to pull the hostname did not work.

 

Reference:

https://docops.ca.com/ca-unified-infrastructure-management-probes/ga/en/alphabetical-probe-articles/nas-alarm-server/alarm_enrichment-raw-configuration

 

How can we achieve this by other means?

Environment:
- UIM 8.5.1 - MS SQL Server DBMS
Answer:

The "lookup_by_regexp" is a filter and not a substitution parameter for the CMDB database query. 

Another option would be to create a function on the cmdb database to manipulate the search parameter. 

For example: 
SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO 
USE [cmdb] 
GO 
SET ANSI_NULLS ON 
GO 
SET QUOTED_IDENTIFIER ON 
GO 
CREATE FUNCTION [dbo].getHostName(@string varchar(8000)) 
RETURNS varchar(8000) AS 
BEGIN 
RETURN SUBSTRING(@string, 1, CHARINDEX('.', @string) - 1) 
END 
GO 

So, a query like this: 
select name,sla_level,description,ip,os_type,origin from cm_computer_system where name = dbo.getHostName('servername.company.com') 

would return rows where name = 'servername'. 

The next step would be to modify the cmdb query in the "nas" Raw Configure. 
For example: 
select name,sla_level,description,ip,os_type,origin from cm_computer_system where name = dbo.getHostName(?) 

So, the '?' gets replaced by the search parameter. 

Please help us improve!

Will this information enable you to resolve your issue?

Please tell us what we can do better.

{{feedbackText.length ? feedbackText.length : '0'}}/255

{{status}}

Not what you were looking for?

Search Again >

Product Information

Support by Product >

Communities

Join a Community >