Usage:
For help regarding the use of alarmctl tool:
ccm release common-services alarmctl -h
List all available destinations:
ccm release common-services alarmctl -l destinations
Create a destination entry:
ccm release common-services alarmctl -a destinations --address <1.1.1.1> --type <TRAP> --port <162> --username <admin> --password <****> --auth <SHA> --priv <AES> --authPwd <***> --privPwd <***>
In case of destination type = TRAP, no need to supply --url
ccm release common-services alarmctl -a destinations --address <1.1.1.1> --type <KAFKA> --port <162> --username <admin> --password <****> --auth <SHA> --priv <AES> --url <url> --authPwd <***> --privPwd <***>
Note: Authentication protocol(authPwd) and Privacy Protocol(privPwd) are optional.
Delete a destination by supplying only address of the destination:
ccm release common-services alarmctl -d destinations --address <1.1.1.1>
If the destination with that address is not present, then such message will be displayed -> Destination with given address not found
ErrorEvents:
List All Error Events:
ccm release common-services alarmctl -l errorEvents
List ErrorEvents
a. based on event Id:
ccm release common-services alarmctl -l errorEvents --eventId <10010>
b. based on product name:
ccm release common-services alarmctl -l errorEvents --productName <CommonServices>
c. based on product version:
ccm release common-services alarmctl -l errorEvents --productVersion <1.2>
d. based on any of above combinations:
ccm release common-services alarmctl -l errorEvents --productVersion <1.2> --productName <CommonServices>
ccm release common-services alarmctl -l errorEvents --productVersion <1.0.0.0> --productName <CommonServices> --eventId <10012>
View the raised Alarms:
List all alarms:
ccm release common-services alarmctl -l alarmEvents
List alarms:
a. Based on alarm's event Id:
ccm release common-services alarmctl -l alarmEvents --eventId <10012>
b. Based on Alarm state. whether raised or cleared:
ccm release common-services alarmctl -l alarmEvents --eventId <10010> --state RAISED
c. Based on Alarm Notification OID, event Id and state:
ccm release common-services alarmctl -l alarmEvents --eventId <10012> --state RAISED --notificationOid <.1.3.6.1.4.1.6889.2.121.0.10012>
d. Based on Product name:
ccm release common-services alarmctl -l alarmEvents --productName <CommonServicesPlatform>
e. Based on Product Name and Product Version:
ccm release common-services alarmctl -l alarmEvents --productName <CommonServicesPlatform> --productVersion <1.0.0.0>
f. Based on Product Name, Product Version and Service name:
ccm release common-services alarmctl -l alarmEvents --productName <CommonServicesPlatform> --productVersion <1.0.0.0> --serviceName <CMonitor>
g. Based on Alarm's Severity:
ccm release common-services alarmctl -l alarmEvents --severity <CRITICAL>
h. Based on all criterias:
ccm release common-services alarmctl -l alarmEvents --eventId <10012> --productName <CommonServices> --productVersion <1.1.0.0.970011> --state <RAISED> --serviceName <CMonitor> --notificationOid <.1.3.6.1.4.1.6889.2.121.0.10012> --severity <CRITICAL>
Send Clear ErrorEvent to clear the raised Alarm:
This will work when the event Id in raised alarm is used as event id for clear error event.
ccm release common-services alarmctl --ClearAlarm --eventId <52703> --productName <CommonServicesPlatform> --productVersion <1.0.0.0> --serviceName <CMonitor>
Note: Use --tabulate argument to view the alarmEvents in tabular format.
ccm release common-services alarmctl -l alarmEvents --tabular
Test the Alarm:
This is used to test whether an alarm is getting raised or not.
ccm release common-services alarmctl --TestAlarm --productName <CommonServices> --productVersion <1.0>
Generate Mib:
The command to generate MIB file for product name and version. It will generate MIB file with product name provided as argument on '/tmp' location.
ccm release common-services alarmctl --generateMib --productName <Product Name> --productVersion <Product version>
Clear Older records:
If the number of Error Events/ Alarm Events is greater than some threshold(currently 100), this command will delete the older error events/alarm events.
Error Events:
ccm release common-services alarmctl --clean errorEvents --productName <ProductName> --productVersion <ProductVersion> --serviceName <ServiceName>
Alarm Events:
ccm release common-services alarmctl --clean alarmEvents --productName <ProductName> --productVersion <ProductVersion> --serviceName <ServiceName>
Get Help associated with alarm :
Based on notification OID:
ccm release common-services alarmctl --ah --productName <productName> --productVersion <productVersion> --notificationOid <nOID>
Based on serviceName and eventId:
ccm release common-services alarmctl --ah --productName <productName> --productVersion <productVersion> --serviceName <servicename> --eventId <eventId>
Note: If serviceName contains space, please provide it in double quotes
Description : Utility for Alarming service operations
optional arguments:
-h, --help show this help message and exit
-l , --list list the resource eg. destinations|errorEvents
-d , --delete delete the resource eg. destinations|errorEvents
-a , --add add the resource eg. destinations
--ah returns help associated with the alarm event
-c C ignore
--ClearAlarm clears raised alarm. Required: eventId, productName,
productVersion, serviceName of ErrorEvent
--TestAlarm Raises alarm. Required: productName,productVersion of
ErrorEvent
--clean Cleans error events if count exceeds predefined value.
Required: Event(errorEvents or
alarmEvents),productName,productVersion of ErrorEvent
--threshold update the threshold of AlarmDefinition
--generateMib generate Mib for AlarmDefinition
Alarm Event Options:
--alarmId ALARMID Event ID of Alarm Event
--state STATE state of the Alarm raised (CLEARED|ACTIVE)
--notificationOid NOTIFICATIONOID
notificationOid of the Alarm raised
--severity SEVERITY severity of the Alarm raised
--tabular
Error Event Options:
--eventId EVENTID Event ID of Error Event
--productName PRODUCTNAME
Product Name
--productVersion PRODUCTVERSION
Product Version
--serviceName SERVICENAME
Service Name
Destination Options:
--address ADDRESS ip address of the destination
--type TYPE type of the destination (TRAP|KAFKA)
--port PORT port number of the destination
--username USERNAME username of the user
--password PASSWORD password of the user
--auth AUTH authenticationProtocol (SHA|MD5)
--priv PRIV privacyProtocol (AES|DES)
--url URL url: to be provided only in case of KAFKA
--authPwd AUTHPWD Authentication password.Optional Parameter
--privPwd PRIVPWD Privacy password.Optional Parameter
generate Mib Options:
--productName PRODUCTNAME
Product Name
--productVersion PRODUCTVERSION
Product Version
Clear Older Records Options:
--productName PRODUCTNAME
Product Name
--productVersion PRODUCTVERSION
Product Version
--serviceName SERVICENAME
Service Name