Quantcast
Channel: Symantec Connect - Products - Discussions
Viewing all articles
Browse latest Browse all 21603

Tags import via ODBC/SQL-statement

$
0
0
I need a solution

Hi all

 

I do want to take advantage of the server status field in our CMDB. If a server is deployed or retired shall be represented with a Tag. I've been able to query all the servers from our CMDB through an ODBC connection using an SQL-statement.

I've got queries for UNIX and Common platforms. All but one field are populated as expected...

I did create the Tag category "Status" and the Tags "Deployed", "Inventory", "Retired", "Staging" and "NULL".

How can I set Tags via ODBC import?

 

I'm using the following query:

SELECT TRIM(ip_address) as IPAddress,
  LOWER(TRIM(name)) AS HostMachine,
  environment AS Integrity,
  service_level  AS Availability,
  Case
  when server_status_dv = 'Deployed' then '@:1:15:Status\Deployed'
  when server_status_dv = 'Inventory' then '@:1:16:Status\Inventory'
  when server_status_dv = 'Retired' then '@:1:14:Status\Retired'
  when server_status_dv = 'Staging' then '@:1:14:Status\Staging'
  else '@:1:11:Status\NULL'
  end AS Tags,
  applications_hosted_dv AS AssetOwner,
  environment AS AssetDepartment,
  sys_class_name_dv AS AssetLocation,
  support_group_dv AS AssetCustodian
FROM CMDB_CI_VM_INSTANCE
WHERE SYS_CLASS_NAME in ('linux_virtual','aix_virtual','solaris_virtual')
  AND ip_address IS NOT NULL
  AND name IS NOT NULL
ORDER BY HostMachine;

The result set does look fine while running the query against our DB2-database.

Any suggestions?

 

Regards

-Luca.


Viewing all articles
Browse latest Browse all 21603

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>