Skip to content
Permalink
Browse files

More improvements to Telegram output

  • Loading branch information...
NEMS Linux
NEMS Linux committed Sep 6, 2019
1 parent e73fd47 commit f4726724a246545f147a551ff40758e84b39c235
Showing with 3 additions and 3 deletions.
  1. +3 −3 data/1.5/nagios/plugins/notify-by-telegram.lua
@@ -4,7 +4,7 @@
-- Kaganishu for helping with documentation and improvements for NEMS 1.5
-- NickTheGreek for contributing his findings to help improve functionality for NEMS 1.5

-- VERSION 1.5.3
-- VERSION 1.5.4

https = require('ssl.https')
local handle = io.popen("/usr/local/bin/nems-info alias")
@@ -35,10 +35,10 @@ end
Alias = "Reporting NEMS Server: " .. nemsalias .. '\n' --NEMS Server Alias

if (#arg == 8) then --assumes this since 8 arguments have been passed
message = scolor .. '\n' .. '\n' .. Notification .. Host ..State .. Address .. Info .. Date_Time .. Alias
message = scolor .. '\n' .. '\n' .. Alias .. Date_Time .. Notification .. Host ..State .. Address .. Info
else
Service = "Service: " .. arg[8] .. '\n' --$SERVICEDESC$
message = scolor .. '\n' .. '\n' .. '***** NEMS Linux ***** ' ..'\n' ..'\n' .. Notification .. Host .. Service ..State .. Address .. Info .. Date_Time .. Alias
message = scolor .. '\n' .. '\n' .. Alias .. Date_Time .. Notification .. Host .. Service ..State .. Address .. Info
end

local data_str = 'chat_id=' .. chat_id .. '&text=' .. message..''

0 comments on commit f472672

Please sign in to comment.
You can’t perform that action at this time.