OCNRF Alert Configuration

OCNRF Alert Configuration

Follow the steps below for OCNRF Alert configuration in Prometheus:

Note:

  1. By default Namespace for OCNRF is ocnrf that must be update as per the deployment.
  2. The ocnrf-config-1.2.0.0.0.zip file can be downloaded from OHC.

    Unzip the ocnrf-config-1.2.0.0.0.zip package after downloading to get NrfAlertrules.yaml file.

  1. Take Backup of current configuration map of Prometheus:
    kubectl get configmaps _NAME_-server -o yaml -n _Namespace_ > /tmp/tempConfig.yaml
  2. Check and Add NRF Alert file name inside Prometheus configuration map:
    sed -i '/etc\/config\/alertsnrf/d' /tmp/tempConfig.yaml
    sed -i '/rule_files:/a\  \- /etc/config/alertsnrf' /tmp/tempConfig.yaml
  3. Update configuration map with updated file name of NRF alert file:
    kubectl replace configmap _NAME_-server -f /tmp/tempConfig.yaml
  4. Add NRF Alert rules in configuration map under file name of NRF alert file:
    kubectl patch configmap _NAME_-server -n _Namespace_--type merge --patch
    "$(cat ~/NrfAlertrules.yaml)"

Note:

The Prometheus server takes an updated configuration map that is automatically reloaded after approximately 60 seconds. Refresh the Prometheus GUI to confirm that the NRF Alerts have been reloaded.