7.3 NEF Alert Configuration in OCI
The following procedure describes how to configure the NEF alerts for OCI. The OCI supports metric expressions written in MQL (Metric Query Language) and thus, requires a new NEF alert file for configuring alerts in OCI observability platform.
The following are the steps:
- Run the following command to extract the .zip
file:
Theunzip ocnef_oci_alertrules_<version>.zip
occapif_oci_alarm_terraform
andocnef_oci_alarm_terraform
folders are available in the zip file.Note:
The zip file is available in thecustom_templates.zip
. - Open the
occapif_oci_alarm_terraform
folder, in thenotifications.tf
file, update the parameter endpoint with the email id of the user. - Open the
ocnef_oci_alarm_terraform
folder, in thenotifications.tf
file, update the parameter endpoint with the email id of the user (replace test@gmail.com with the email id of the user). - Log in to the OCI Console.
Note:
For more details about logging in to the OCI, refer to Signing In to the OCI Console. - Open the navigation menu and select Developer Services. The Developer Services window appears in the right pane.
- Under the Developer Services, select Resource Manager.
- Under Resource Manager, select Stacks. The Stacks window appears.
- Click Create Stack.
- Select the default My Configuration radio button.
- Under Stack configuration, select the folder radio button and upload the
occapif_oci_alarm_terraform
folder. - Enter the Name and Description and select the compartment.
- Select the latest Terraform version from the Terraform version drop-down.
- Click Next. The Edit Stack screen appears.
- Enter the required inputs to create the NEF alerts or alarms and click Save and Run Apply.
- Verify that the alarms are created in the Alarm Definitions screen
(OCI Console > Observability &
Management > Monitoring >
Alarm Definitions) provided.
The required inputs are:
- Alarms Configuration
- Compartment Name - Choose name of compartment from the drop-down
- Metric namespace - Metric namespace that the user provided while deploying OCI Adaptors.
- Topic Name - Any user configurable name. Must contain fewer than 256 characters. Only alphanumeric characters plus hyphens (-) and underscores (_) are allowed.
- Message Format - Keep it as ONS_OPTIMIZED. (This is pre-populated)
- Alarm is_enabled - Keep it as True. (This is pre-populated)
- Alarms Configuration
- The steps 6 to 16 must be repeated for uploading the
ocnef_oci_alarm_terraform
folder. Keep Metric namespace as mgmtagent_kubernetes_metrics (This is pre-populated).