|
|
@@ -34,16 +34,15 @@ class Alarm
|
|
|
// 业务环境过滤
|
|
|
if ($reportAlarmOpen /**&& (count($allowPlatform) == 0 || in_array($_SERVER['HTTP_HOST'], $allowPlatform))*/) {
|
|
|
$result = self::curl(json_encode($message));
|
|
|
- LoggerTool::info(['push AlarmService 1. ', $result]);
|
|
|
if ($result['code'] != 200) {
|
|
|
// 重新推送一次,如果失败,写错误日志
|
|
|
$result = self::curl(json_encode($message));
|
|
|
- LoggerTool::info(['push AlarmService 2. ', $result]);
|
|
|
if ($result['code'] != 200) {
|
|
|
LoggerTool::error(['预警信息上报平台失败. traceId【' . $message['trace-id'] . '】', $result]);
|
|
|
+ return false;
|
|
|
}
|
|
|
}
|
|
|
- LoggerTool::notice(sprintf('信息推送预警平台成功. platformID[%s], traceID[%s]', $message['platform-id'], $message['trace-id']));
|
|
|
+ LoggerTool::notice(['信息推送预警平台成功.', 'platformID: .' . $message['platform-id'], 'traceID: . ' . $message['trace-id']]);
|
|
|
} else {
|
|
|
$reason = '';
|
|
|
if ($reportAlarmOpen == '0') {
|