UIM - Reset MCS monitoring (Monitoring configuration Service)

book

Article ID: 12764

calendar_today

Updated On:

Products

DX Infrastructure Management NIMSOFT PROBES

Issue/Introduction

Attention: Going through the steps of the Article will completely reset MCS and all monitoring profiles will have to be recreated manually.

Can we reset MCS monitoring as I have some issues with profiles? This KB Describes how to reset MCS Monitoring tables.

Environment

Release: UIM 8.x, 9.x


Resolution

Follow the steps below to reprocess the MCS templates and repopulate the SSRV2Template db table. 


UIM 8.x and earlier

  1. Deactivate mon_config_service probe 
  2. Copy SSRV2_drop_all_tables.sql and Create_SSRV2_tables.sql under $Nimsoft\probes\service\mon_config_service\scripts\database\<your_DB_type> folder to DB server and run the scripts
  3. Activate the mon_config_service probe
  4. Delopy mon_config_service probe_templates from Archive 
  5. Create and deploy a profile under Monitoring tab in USM

UIM 8.51 and later

  1. Deactivate mon_config_service probe 
  2. Browse to the Nimsoft\probes\service\mon_config_service\lib directory
  3. Copy the mcs-db-scripts.jar file to the desktop.  (Make sure you do not move this file)
  4. Rename the file to mcs-db-scripts.zip.
  5. Open the ZIP file and extract the following files (\mcs-db-scripts.zip\legacy\sqlserver or mysql or oracle, depending on the UIM database in use):
    1. SSRV2_drop_all_tables.sql
    2. Create_SSRV2_tables.sql
  6. Copy the two .sql files to DB server and run the scripts to drop and then create the table structure (right-click on each file > Open With > Keep using SQL Server Management Studio). If any table cannot is not removed by the query, please remove them manually.
  7. Run the following SQL command: DROP TABLE SSRV2SchemaMigration;
  8. Activate the mon_config_service probe
  9. Deploy mon_config_service probe_templates from Archive Eg. cdm_mcs_templates, processes_mcs_template, net_connect_mcs_templates etc. 
  10. Create and deploy a profile under Monitoring tab in USM

UIM 9.02 and later

  1. Deactivate mon_config_service probe 
  2. Browse to the Nimsoft\probes\service\mon_config_service\lib directory
  3. Copy the mcs-db-scripts.jar file to the desktop.  (Make sure you do not move this file)
  4. Rename the file to mcs-db-scripts.zip.
  5. Open the ZIP file and extract the following file ONLY (\mcs-db-scripts.zip\legacy\sqlserver or mysql or oracle, depending on the UIM database in use):
    1. SSRV2_drop_all_tables.sql
  6. Copy the .sql file to DB server and run the script to drop the table structure (right-click on the file > Open With > Keep using SQL Server Management Studio). If any table is not removed by the query, please remove them manually.
  7. Activate the mon_config_service probe - it will create the needed tables automatically.
  8. Deploy mon_config_service probe_templates from Archive. Eg. cdm_mcs_templates, processes_mcs_template, net_connect_mcs_templates etc. 
  9. Create and deploy a profile under Monitoring tab in USM

Additional Information

NOTE
If working on Oracle and using either SQL*Plus or SQL Developer you need to run

SQL> set define off;

before you run the script to avoid an issue with a label containing the & character. see here for an explanation.

this process was also used to solve the below error in the MCS logs:

Mar 18 11:08:51:698 [main, mon_config_service] com.microsoft.sqlserver.jdbc.SQLServerException: The statistics 'poller' is dependent on column 'poller'.
Mar 18 11:08:52:205 [1352] Controller: Max. restarts reached for probe

Also, for UIM 9.01EA, due to an issue with the V9_0_0_00__Add_SSRV2PolicyProfileBlob_Table.sql migration script added in (.01 EA, after executing the SSRV2_drop_all_tables.sql make sure you also drop the following before executing the Create_SSRV2_tables.sql script:

Tables:
SSRV2PolicyProfileBlob
SSRV2PolicyTargetStatus

Sequences:
SSRV2PolicyProfileBlob_seq
SSRV2PolicyTargetStatus_seq

Triggers:
SSRV2PolicyProfileBlob_seq_tr
SSRV2PolicyTargetStatus_seq_t

Note regarding MySQL (Upgrade from UIM 8.5.1 to 9.0.2 with MySQL v5.7)
- If the reset of MCS does not resolve the issues being see with mon_config_service, e.g., not starting, please also check this article:

MCS (mon_config_service) monitoring stopped working after upgrading UIM from 8.5.1 to version 9.0.2
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=125623

 

NOTE FOR UIM 9.2.0:

After running the "Drop All Tables" script you should run the following queries in order:

 

Sequences

drop sequence SSRV2PROFILEEVENT_SEQ;

drop sequence SSRV2POLICYPROFILEBLOB_SEQ;

drop sequence SSRV2POLICYTARGETSTATUS_SEQ;

 

Tables

drop table SSRV2CONTAINERPROPERTY;

drop table SSRV2POLICYPROFILEBLOB;

drop table SSRV2PROBETEMPLATEUPGRADE;

drop table SSRV2PROBETEMPLATESPACKAGE;

drop table "SSRV2SchemaMigration";

drop table SSRV2TEMPLATEFILTER;

drop table SSRV2PROFILECONDITION;

drop table SSRV2POLICYTARGETSTATUS;

drop table SSRV2PROFILEEVENT;

 

Views

drop view SSRV2GROUPWITHPATH;

 

After this, verify all tables and sequences beginning with SSRV2 are gone from the database and manually delete any leftovers.

 

IMPORTANT!

Make sure ALL SSRV2 Tables, Sequences, Functions, Triggers, and/or Views have been dropped, otherwise you will not resolve template problems showing up as XML, or templates becoming grayed out, or errors such as-> [main, mon_config_service] org.flywaydb.core.api.FlywayException.

To confirm all of the mon_config_service tables have been dropped, check using this query for Oracle databases:

select * FROM USER_OBJECTS WHERE OBJECT_NAME LIKE '%SSRV%'

select * from ssrv2template -> will show you which templates were processed and when they were processed.

 

Note that once the MCS is reset/the tables are dropped you must follow this sequence:

- Deactivate mon_config_service
- Delete it from the file system
- Redeploy it
- Redeploy the mcs_template probe packages to the Primary Hub from the local archive
- Activate mon_config_service
- Wait around 10-15 minutes then check