Permalink
Browse files

Distinguish between similar named variables

  • Loading branch information...
NEMS Linux
NEMS Linux committed Nov 9, 2018
1 parent eb7a470 commit f21d158965227725907b2ddc2f6a098b4b0dae9a
Showing with 2 additions and 2 deletions.
  1. +2 −2 data/1.5/nagios/plugins/telegram_nems.lua
@@ -6,7 +6,7 @@ https = require('ssl.https')
local handle = io.popen("/usr/local/bin/nems-info alias")
local result = handle:read("*a")
handle:close()
local alias = string.gsub(result, "\n", "")
local nemsalias = string.gsub(result, "\n", "")
local telegram_url = 'https://api.telegram.org/bot' .. arg[1] .. '/sendMessage?'
local chat_id = '-' .. arg[2]
@@ -16,7 +16,7 @@ local chat_id = '-' .. arg[2]
Address = "Address: " .. arg[6] ..'\n' --$HOSTADDRESS$
Info = "Info: " .. arg[7] ..'\n' --$HOSTOUTPUT$/"$SERVICEOUTPUT$"
Date_Time = "Date/Time: " .. arg[8] ..'\n' --$LONGDATETIME$
Alias = "Reporting NEMS Server: " .. alias .. '\n' --NEMS Server Alias
Alias = "Reporting NEMS Server: " .. nemsalias .. '\n' --NEMS Server Alias
if (#arg == 8) then --assumes this since 8 arguments have been passed
message = '***** NEMS Linux ***** ' ..'\n' ..'\n' .. Notification .. Host ..State .. Address .. Info .. Date_Time .. Alias

0 comments on commit f21d158

Please sign in to comment.