当前位置:网站首页>Notes of benthos

Notes of benthos

2022-07-23 19:10:00 Chise1

summary

Record some corners that may be used at ordinary times

Error handling

If you use kafka Wait for some of your own input, When a process returns error When , Will automatically retry , This is annoying , It can be used fallback solve .
as follows

output:
  fallback:
    - sql_raw:
        driver: mysql
        dsn: ${
    Alarm.Db.Dsn}
        query: "INSERT INTO cm_ala_corr_relation (rule_id, father_alarm_id, child_alarm_id, relation_time) VALUES (?, ?, ?, ?);"
        args_mapping: | root = [ this.RuleId, this.FatherAlarmId, this.ChildAlarmId, this.RelationTime ]
    - file:
        path: ./error_relation.txt

If an error is reported during output, it will automatically jump to the next output .

原网站

版权声明
本文为[Chise1]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/204/202207231332525920.html