ELK 集成¶
ELK 是三个开源软件的缩写,分别表示:Elasticsearch , Logstash, Kibana , 它们都是开源软件。我们基于日志转发,提供了对应 API 做采集数据的适配。
ELK 集成 CA 步骤¶
默认探针方式¶
- 创建应用
在 Cloud Alert 界面创建 zabbix 应用,并获取 appkey 。
- 接口调用
接口 | http://api.aiops.com/alert/api/event/ELK/v1/ {appKey} |
请求方式 | POST header contenttype:application/json |
参数格式 | { "labels.alertname":"Log Alert", "labels.severity":"warning", "labels.host_ip":"10.93.193.1", "labels.site_code":"CNSH10", "labels.group":"上海科技绿洲24号楼", "labels.from":"ELK", "labels.instance":"CNSH10-F07-M-CE6855-CSW01", "labels.alert_info":"CID=0x80fc0101-alarmID=0x081320c6;The local fault alarm has occurred. (IfIndex=48, IfName=10GE1/0/44)", "annotations.info":"CID=0x80fc0101-alarmID=0x081320c6;The local fault alarm has occurred. (IfIndex=48, IfName=10GE1/0/44)", "generatorURL":"XXXX" } |
测试验证 | curl --location --request POST 'http://api.aiops.com/alert/api/event/ELK/v1/{appKey}' \ --header 'Content-Type: application/json' \ --data-raw '{ "labels.alertname":"Log Alert", "labels.severity":"warning", "labels.host_ip":"10.93.193.1", "labels.site_code":"CNSH10", "labels.group":"上海科技绿洲24号楼", "labels.from":"ELK", "labels.instance":"CNSH10-F07-M-CE6855-CSW01", "labels.alert_info":"CID=0x80fc0101-alarmID=0x081320c6;The local fault alarm has occurred. (IfIndex=48, IfName=10GE1/0/44)", "annotations.info":"CID=0x80fc0101-alarmID=0x081320c6;The local fault alarm has occurred. (IfIndex=48, IfName=10GE1/0/44)", "generatorURL":"XXXXXX" }' |