Xymon Mailing List Archive search

twitter style alerts are not working

4 messages in this thread

list Usa Ims · Thu, 17 Sep 2015 23:22:25 +0000 (UTC) ·
My twitter style alerts are not alerting me when there is an alert.
My 'alerts.cfg' file looks like:HOST=www.xxx.com SERVICE=xxxWebPage         SCRIPT /usr/lib/xymon/server/etc/xx.sh FORMAT=SMS COLOR=yellow,red RECOVERED
My 'hosts.cfg' file looks like:216.x.x.x     www.xxx.com  #xxxWebPage

My 'xx.sh' looks like:#!/bin/bashX=`date`msg=`echo "${BBALPHAMSG}"``/usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X $msg`
The xymon display server will turn red when there is an alert but I don't get the twitter alert.If I fire off the infrabot-tweet.pl on the command line, it works and I get the twitter alert.
I checked the permissions and all files under /usr/lib/xymon are owned by 'xymon:xymon'.
Please suggest, thanks.
list Zep · Fri, 18 Sep 2015 00:08:06 -0400 ·

On 09/17/2015 07:35 PM, usa ims via Xymon wrote:
Subject:
twitter style alerts are not working
From:
usa ims <user-42bb6445007b@xymon.invalid>
Date:
09/17/2015 07:22 PM

To:
"xymon at xymon.com" <xymon at xymon.com>


My twitter style alerts are not alerting me when there is an alert.

My 'alerts.cfg' file looks like:
HOST=www.xxx.com SERVICE=xxxWebPage
         SCRIPT /usr/lib/xymon/server/etc/xx.sh FORMAT=SMS
COLOR=yellow,red RECOVERED

My 'hosts.cfg' file looks like:
216.x.x.x     www.xxx.com  #xxxWebPage

My 'xx.sh' looks like:
#!/bin/bash
X=`date`
msg=`echo "${BBALPHAMSG}"`
`</usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X
$msg>`<
.... what is your intended purpose of the marks between >< chars?
I wouldn't expect them there.   also, is it a typo od does the script
really try to call 'ext' instead etc? (note the path difference from
your SCRIPT line and the path you call in the xx.sh script).
The xymon display server will turn red when there is an alert but I
don't get the twitter alert.
If I fire off the infrabot-tweet.pl on the command line, it works and
quoted from Usa Ims
I get the twitter alert.

I checked the permissions and all files under /usr/lib/xymon are owned
by 'xymon:xymon'.

Please suggest, thanks.
-- 

public gpg key id: AE60F64C
list Phil Crooker · Fri, 18 Sep 2015 06:49:14 +0000 ·
I think the >< characters are just email addons, they weren't in the original message.

However, I do see the main command line is surrounded by backticks:

`/usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X $msg`

Is that the case in the script? They should not be there.
quoted from Zep
From: Xymon <xymon-bounces at xymon.com> on behalf of zep <user-7203df77e300@xymon.invalid>
Sent: Friday, 18 September 2015 1:38 PM
To: xymon at xymon.com
Subject: Re: [Xymon] twitter style alerts are not working

On 09/17/2015 07:35 PM, usa ims via Xymon wrote:
Subject:
twitter style alerts are not working
From:
usa ims <user-42bb6445007b@xymon.invalid>
Date:
09/17/2015 07:22 PM

To:
"xymon at xymon.com" <xymon at xymon.com>


My twitter style alerts are not alerting me when there is an alert.

My 'alerts.cfg' file looks like:
HOST=www.xxx.com SERVICE=xxxWebPage
         SCRIPT /usr/lib/xymon/server/etc/xx.sh FORMAT=SMS
COLOR=yellow,red RECOVERED

My 'hosts.cfg' file looks like:
216.x.x.x     www.xxx.com  #xxxWebPage

My 'xx.sh' looks like:
#!/bin/bash
X=`date`
msg=`echo "${BBALPHAMSG}"`
`</usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X
$msg>`<
.... what is your intended purpose of the marks between >< chars?
I wouldn't expect them there.   also, is it a typo od does the script
really try to call 'ext' instead etc? (note the path difference from
your SCRIPT line and the path you call in the xx.sh script).
The xymon display server will turn red when there is an alert but I
don't get the twitter alert.
If I fire off the infrabot-tweet.pl on the command line, it works and
I get the twitter alert.

I checked the permissions and all files under /usr/lib/xymon are owned
by 'xymon:xymon'.

Please suggest, thanks.
--
public gpg key id: AE60F64C
list Usa Ims · Fri, 18 Sep 2015 19:09:58 +0000 (UTC) ·
CORRECTION:
The issue has been resolved. I put a print statement inside the script to print errors to a file:
 /usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl xxxxxx $msg [$X] >2 /tmp/error.log
Then I looked at the error file and noticed that one of the perl modules were not loading, once I fixed that, everything started working.
Thanks!
quoted from Phil Crooker


     On Friday, September 18, 2015 2:49 AM, Phil Crooker <user-e8e31cd73303@xymon.invalid> wrote:
   

 I think the >< characters are just email addons, they weren't in the original message.

However, I do see the main command line is surrounded by backticks:

`/usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X $msg`

Is that the case in the script? They should not be there.
From: Xymon <xymon-bounces at xymon.com> on behalf of zep <user-7203df77e300@xymon.invalid>
Sent: Friday, 18 September 2015 1:38 PM
To: xymon at xymon.com
Subject: Re: [Xymon] twitter style alerts are not working

On 09/17/2015 07:35 PM, usa ims via Xymon wrote:
Subject:
twitter style alerts are not working
From:
usa ims <user-42bb6445007b@xymon.invalid>
Date:
09/17/2015 07:22 PM

To:
"xymon at xymon.com" <xymon at xymon.com>


My twitter style alerts are not alerting me when there is an alert.

My 'alerts.cfg' file looks like:
HOST=www.xxx.com SERVICE=xxxWebPage
          SCRIPT /usr/lib/xymon/server/etc/xx.sh FORMAT=SMS
COLOR=yellow,red RECOVERED

My 'hosts.cfg' file looks like:
216.x.x.x    www.xxx.com  #xxxWebPage

My 'xx.sh' looks like:
#!/bin/bash
X=`date`
msg=`echo "${BBALPHAMSG}"`
`</usr/lib/xymon/server/ext/twitter/infrabot-tweet.pl recepient $X
$msg>`<
.... what is your intended purpose of the marks between >< chars?
I wouldn't expect them there.  also, is it a typo od does the script
really try to call 'ext' instead etc? (note the path difference from
your SCRIPT line and the path you call in the xx.sh script).
The xymon display server will turn red when there is an alert but I
don't get the twitter alert.
If I fire off the infrabot-tweet.pl on the command line, it works and
I get the twitter alert.

I checked the permissions and all files under /usr/lib/xymon are owned
by 'xymon:xymon'.

Please suggest, thanks.
--
public gpg key id: AE60F64C