This article defines the steps needed to query the size of the Telco Cloud Automation (TCA) alarms table, delete all the TCA alarms, or count the number and/or delete the alarms associated to a specific nfInstance.
Run the following to enter Mongo DB: mongo hybridity
To query the size of the Alarms table, run the following: db.NfvAlarms.dataSize()
To delete all alarms.
SSH to TCA-CP.
Run the following to enter Mongo DB: mongo hybridity
To delete all alarms on the TCA-CP, run the following: db.NfvAlarms.remove({})
Wait for 2 mins for TCA Manager to sync these changes from TCA-CP.
Note: These steps need to be performed on individual TCA-CPs.
To check the number of or delete the alarms associated to a specific NF Instance:
SSH to TCA-CP
Run the following to enter Mongo DB: mongo hybridity
To query the number of alarms associated with a specific nfInstance, run the following: db.NfvAlarms.find({"managedObjectId":<<nfInstanceId>>}).count()
To delete alarms of a specific nfInstance, run the following: db.NfvAlarms.remove({"managedObjectId":"<<nfInstanceId>>"})
Note: These steps need to be performed on individual TCA-CPs
Find the nfInstanceId: The nfInstance can be found in TCA under Inventory> Network Function: General Properties > id
Or you can navigate to the NF itself and copy the nfInstanceId from the TCA URL: