X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Fuser-guide.rst;h=0acb6235a617180f9b2cd331c61bf8a3ae267a88;hb=43fe17ef30078c8ceb624a4aa5167d509466e086;hp=b33a62a7e12e2d4270e47c5979d40966afc98da9;hpb=0a49138a0ca403ceda29e1d5c9d912ffc3c525e0;p=ric-plt%2Falarm-go.git diff --git a/docs/user-guide.rst b/docs/user-guide.rst index b33a62a..0acb623 100755 --- a/docs/user-guide.rst +++ b/docs/user-guide.rst @@ -67,17 +67,17 @@ given as parameters for Alarm Context/Object The Alarm object contains following parameters: - \* SpecificProblem: problem that is the cause of the alarm + SpecificProblem: problem that is the cause of the alarm \(* PerceivedSeverity: The severity of the alarm, see below for possible values - \* ManagedObjectId: The name of the managed object that is the cause of the fault + ManagedObjectId: The name of the managed object that is the cause of the fault \(* - \* ApplicationId: The name of the process raised the alarm + ApplicationId: The name of the process raised the alarm \(* AdditionalInfo: Additional information given by the application - \* IdentifyingInfo: Identifying additional information, which is part of alarm identity + IdentifyingInfo: Identifying additional information, which is part of alarm identity \(* Items marked with \*, i.e., ManagedObjectId (mo), SpecificProblem (sp), ApplicationId (ap) and IdentifyingInfo (IdentifyingInfo) make up the identity of the alarm. All parameters must be according to the alarm definition, i.e. all mandatory parameters should be present, @@ -116,41 +116,57 @@ Through CLI operator can do the following operations: CLI commands need to be given inside Alarm Manger pod. To get there first print name of the Alarm Manger pod. +.. code-block:: none + kubectl get pods -A | grep alarmmanager Output should be look someting like this: +.. code-block:: none + ricplt deployment-ricplt-alarmmanager-6cc8764749-gnwjh 1/1 running 0 15d Then give this command to enter inside the pod. Replace the pod name with the actual name from the printout. +.. code-block:: none + kubectl exec -it deployment-ricplt-alarmmanager-6cc8764749-gnwjh bash CLI commands can have some of the following parameters - - \--moid ManagedObjectId, example string: RIC - - \--apid ApplicationId string, example string: UEEC - - \--sp SpecificProblem, example value: 8007 - - \--severity Severity of the alarm, possible values: UNSPECIFIED, CRITICAL, MAJOR, MINOR, WARNING, CLEARED or DEFAULT - - \--iinfo Identifying info, a user specified string, example string: INFO-1 - - \--mal Maximum number of active alarms, example value 1000 - - \--mah Maximum number of alarms in alarm history, example value: 2000 - - \--aid Alarm id, example value: 8007 - - \--atx Alarm text string, example string: E2 CONNECTIVITY LOST TO E-NODEB - - \--ety Event type string, example string: Communication error - - \--oin Operation instructions string, example string: Not defined - - \--prf Performance profile id, possible values: 1 = peak performance test or 2 = endurance test - - \--nal Number of alarms, example value: 50 - - \--aps Alarms per second, example value: 1 - - \--tim Total time of test in minutes, example value: 1 - - \--host Alarm Manager REST address: default value = localhost - - \--port Alarm Manager REST port: default value = 8080 - - \--if Used Alarm Manager command interface, http or rmr: default value = http - - - ``Note that there are two minus signs before parameter name!`` +.. code-block:: none + + --moid ManagedObjectId, example string: RIC + --apid ApplicationId string, example string: UEEC + --sp SpecificProblem, example value: 8007 + --severity Severity of the alarm, possible values: UNSPECIFIED, CRITICAL, MAJOR, MINOR, WARNING, CLEARED or DEFAULT + --iinfo Identifying info, a user specified string, example string: INFO-1 + --mal Maximum number of active alarms, example value 1000 + --mah Maximum number of alarms in alarm history, example value: 2000 + --aid Alarm id, example value: 8007 + --atx Alarm text string, example string: E2 CONNECTIVITY LOST TO E-NODEB + --ety Event type string, example string: Communication error + --oin Operation instructions string, example string: Not defined + --rad Raise alarm delay in seconds. Default value = 0 + --cad Clear alarm delay in seconds. Default value = 0 + --prf Performance profile id, possible values: 1 = peak performance test or 2 = endurance test + --nal Number of alarms, example value: 50 + --aps Alarms per second, example value: 1 + --tim Total time of test in minutes, example value: 1 + --host Alarm Manager host address. Default value = localhost + --port Alarm Manager port. Default value = 8080 + --if Used Alarm Manager command interface, http or rmr: default value = http + --active Active alerts in Prometheus Alert Manager. Default value = true + --inhibited Inhibited alerts in Prometheus Alert Manager. Default value = true + --silenced Silenced alerts in Prometheus Alert Manager. Default value = true + --unprocessed Unprocessed alerts in Prometheus Alert Manager. Default value = true + --host Prometheus Alert Manager host address + --port Prometheus Alert Manager port. Default value = 9093 + + +``Note that there are two minus signs before parameter name!`` - If parameter contains any white spaces then it must be enclosed in quotation marks like: "INFO 1" +If parameter contains any white spaces then it must be enclosed in quotation marks like: "INFO 1" CLI command examples: @@ -212,11 +228,11 @@ CLI command examples: .. code-block:: none - Syntax: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" [--host] [--port] + Syntax: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" [--rad] [--cad] [--host] [--port] - Example: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" + Example: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" --rad 0 --cad 0 - Example: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" --host localhost --port 8080 + Example: cli/alarm-cli define --aid 8007 --atx "E2 CONNECTIVITY LOST TO E-NODEB" --ety "Communication error" --oin "Not defined" --rad 0 --cad 0 --host localhost --port 8080 Delete existing alarm definition: @@ -253,6 +269,14 @@ CLI command examples: Endurance test example: cli/alarm-cli perf --prf 2 --nal 50 --aps 1 --tim 1 --host localhost --port 8080 --if rmr +Get alerts from Prometheus Alert Manager: + + .. code-block:: none + + Syntax: cli/alarm-cli alerts --active --inhibited --silenced --unprocessed --host [--port] + + Example: cli/alarm-cli alerts --active true --inhibited true --silenced true --unprocessed true --host 10.102.36.121 --port 9093 + REST interface usage guide -------------------------- @@ -297,11 +321,11 @@ Below are examples for REST interface. Curl tool is used to send REST commands. Add one new alarm definition: - Example: curl -X POST "http://localhost:8080/ric/v1/alarms/define" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"alarmdefinitions\": [{\"alarmId\": 8007, \"alarmText\": \"E2 CONNECTIVITY LOST TO E-NODEB\", \"eventtype\": \"Communication error\", \"operationinstructions\": \"Not defined\"}]}" + Example: curl -X POST "http://localhost:8080/ric/v1/alarms/define" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"alarmdefinitions\": [{\"alarmId\": 8007, \"alarmText\": \"E2 CONNECTIVITY LOST TO E-NODEB\", \"eventtype\": \"Communication error\", \"operationinstructions\": \"Not defined\, \"raiseDelay\": 1, \"clearDelay\": 1"}]}" Add two new alarm definitions: - Example: curl -X POST "http://localhost:8080/ric/v1/alarms/define" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"alarmdefinitions\": [{\"alarmId\": 8007, \"alarmText\": \"E2 CONNECTIVITY LOST TO E-NODEB\", \"eventtype\": \"Communication error\", \"operationinstructions\": \"Not defined\"},{\"alarmId\": 8008, \"alarmText\": \"ACTIVE ALARM EXCEED MAX THRESHOLD\", \"eventtype\": \"storage warning\", \"operationinstructions\": \"Clear alarms or raise threshold\"}]}" + Example: curl -X POST "http://localhost:8080/ric/v1/alarms/define" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"alarmdefinitions\": [{\"alarmId\": 8007, \"alarmText\": \"E2 CONNECTIVITY LOST TO E-NODEB\", \"eventtype\": \"Communication error\", \"operationinstructions\": \"Not defined\, \"raiseDelay\": 0, \"clearDelay\": 0"},{\"alarmId\": 8008, \"alarmText\": \"ACTIVE ALARM EXCEED MAX THRESHOLD\", \"eventtype\": \"storage warning\", \"operationinstructions\": \"Clear alarms or raise threshold\", \"raiseDelay\": 0, \"clearDelay\": 0}]}" Delete one existing alarm definition: