Hello There, Guest! Login Register
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Error in commands notify-service-by-telegram and notify-host-by-telegram

#4
Hi Robbie,

You have in fact already done most of the work, but probably forgotten about it!

To start with: in /usr/local/bin you have now a script called telegram_nems.lua which is a modified version of my original script called telegram_nagios.lua.
The new script takes two additional arguments: the bot (arg[1] and the chat_id arg[2]. 
The bot and the chat_id are now stored in the resource.cfg as $USER11$ and $USER12$.

In Nconf however you have still the old command line: (This is for notify-host-by telegram, notify-service-by telegram is similar)

/usr/local/bin/telegram_nagios.lua "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT$" "$LONGDATETIME$"

so this should be changed to:

/usr/local/bin/telegram_nems.lua $USER11$ $USER12$ "$NOTIFICATIONTYPE$" "$HOSTNAME$" "$HOSTSTATE$" "$HOSTADDRESS$" "$HOSTOUTPUT$" "$LONGDATETIME$"

That should do it.

Sorry about not responding to the previous message, I must have overlooked it.


BR
 Reply
 
Messages In This Thread
 
Forum Jump:

Users browsing this thread: 1 Guest(s)