How to delete an imported JSON schema
search cancel

How to delete an imported JSON schema

book

Article ID: 191816

calendar_today

Updated On:

Products

DX Unified Infrastructure Management (Nimsoft / UIM)

Issue/Introduction

I've created a schema and imported on UIM to monitor a product using restmon.

Now I need delete this imported schema to import a new one with other metrics and using other name 

How to delete ?

Environment

Release : 20.1

Component : UIM - MON_CONFIG_SERVICE

Resolution

1. Run the following SQL query to find the template ids (there will generally be a minimum of two templates ids per package - one for the Setup component, and one for the metrics components):

Select *from SSRV2Template

OR

Select *from SSRV2Template where description like '%XXXX%'

Example:
Select *from SSRV2Template where description like '%IDESSENTIALS%'

Take note of templateids to use in step 2.


2. Then run the following SQL delete commands:

delete from SSRV2PackageTemplate where template in (417,418)
delete from ssrv2container where template in (417,418)
delete from ssrv2removal where template in (417,418)
delete from ssrv2configvalue where field in (select id from ssrv2field where template in (417,418))
delete from ssrv2field where template in (417,418)
delete from ssrv2profile where template in (417,418)
delete from ssrv2template where templateid in (417,418)
delete from SSRV2ProbeTemplatesPackage where probe_name like '%weather%' (as you will keep the probe, you will not need to run this command)

Also delete the template folder from <\Nimsoft\probes\service\mon_config_service\migrators\probes>

NOTE: the probe name here in the 3rd query "IDESSENTIALS" actually come from the title line of the .json file (the schema name)

Attachments