The following two steps should be processed to open alarm merging function:

1.1. Adjust the configuration of alarm

cd $WORKSPACE/alarm/

1. Adjust the content of highQueues configuration in cfg.json into 
[
  "event:p0",
  "event:p1"
] 
2. Adjust the content of lowQueues configuration in cfg.json into
[
  "event:p2",
  "event:p3",
  "event:p4",
  "event:p5",
  "event:p6"
] 

Instruction:
- In Open-Falcon, alarm is categorized into P0, P1... P6, the priority of alarm decreases successfully.
- For alarm of high priority, Open-Falcon will ensure it is sent preferentially.
- Alarm merging function only applies to alarms of low priority, because alarms of high priority are normally very important, which highly need real-time response, and we do not suggest for alarm combination.
- Therefore, it will not be combined in highQueues configuratio

The function of links components: when multiple alarms merger into one alarm, the http link addresses with details of alarms will be attached in the message for users to check the details.

1.2.1. install dependency

# yum install -y python-virtualenv
$ cd $WORKSPACE/links/
$ virtualenv ./env
$ ./env/bin/pip install -r pip_requirements.txt

1.2.2. init database and config

- database schema: https://github.com/open-falcon/scripts/blob/master/db_schema/links-db-schema.sql
- database config: ./frame/config.py
- initialize the data for Links.Of course,you can reference the part of Links in connecting with environment preparing

1.2.3. start

$ cd $WORKSPACE/links/
$ ./control start
    --> goto http://127.0.0.1:5090

$ ./control tail
    --> tail log
Copyright 2015 - 2018 Xiaomi Inc. all right reserved,powered by Gitbook该文件修订时间: 2022-05-30 16:56:29