mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Fix message
This commit is contained in:
parent
21f75ed0af
commit
b15bd6c965
2 changed files with 7 additions and 4 deletions
|
|
@ -53,13 +53,16 @@ function syslog_module.hooks.handleEvent(syslog_conf, message, host, priority)
|
|||
if event then
|
||||
|
||||
local event_type = event.event
|
||||
local reason = ''
|
||||
|
||||
if event_type == 'stop' and not isEmptyString(event.exit_status) and event.exit_status ~= '0' then
|
||||
event_type = 'failure'
|
||||
reason = '[' .. event.exit_status .. ']'
|
||||
end
|
||||
|
||||
local message = i18n("alert_messages.nbox_service", {service=event.service_name, host=event.hostname, ip=host, reason=event.exit_status})
|
||||
local message = i18n("alert_messages.nbox_service", {service=event.service_name, host=event.hostname, ip=host, reason=reason})
|
||||
if not isEmptyString(event.instance_name) then
|
||||
message = i18n("alert_messages.nbox_service_instance", {service=event.service_name, instance=event.instance_name, host=event.hostname, ip=host, reason=event.exit_status})
|
||||
message = i18n("alert_messages.nbox_service_instance", {service=event.service_name, instance=event.instance_name, host=event.hostname, ip=host, reason=reason})
|
||||
end
|
||||
|
||||
local is_alert = syslog_utils.handle_system_event(host, event.service_name, event_type, message, priority,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue