I'm currently in the progress of upgrading/replacing my old hobbit version 4.2.0 to 4.3.4 I have installed on a brand new server and I'm just testing if everything is ok.
My SMS alert script seems to work ok, but the BBALPHAMSG variable seems to be truncated to around 12-16 characters, leaving the status messages incomplete. I can easily add $DOWNSECS and/or $DOWNSECSMSG and they are added to the message which then is longer of cause.
The exact same script works on my old server, and by manually setting the variables I can send any text I like.
Anyone seen this behavior ?
Running on FreeBSD 8.2-RELEASE
From /var/log/xymon/alert.log: 2011-11-29 22:12:29 Paging script /usr/local/www/xymon/server/ext/kannel-sms.sh terminated by signal 60 (not sure if signal 60 is ok)
Best regards Gorm
On 11/29/11 16:21, Gorm J. Siiger wrote:
I'm currently in the progress of upgrading/replacing my old hobbit version 4.2.0 to 4.3.4 I have installed on a brand new server and I'm just testing if everything is ok.
My SMS alert script seems to work ok, but the BBALPHAMSG variable seems to be truncated to around 12-16 characters, leaving the status messages incomplete. I can easily add $DOWNSECS and/or $DOWNSECSMSG and they are added to the message which then is longer of cause.
The exact same script works on my old server, and by manually setting the variables I can send any text I like.
Anyone seen this behavior ?
Best regards Gorm
Hi Gorm... I seem to be seeing the same thing here with v4.3.4
In my alerts.cfg file I have the FORMAT set to "SMS" like so:
--[snip]--
SCRIPT $xymon-sms-alert email-to-txt-svc at example.com
TIME=$smsalerthours DURATION>5m FORMAT=SMS REPEAT=$never
COLOR=red RECOVERED STOP
--[snip]--
(with $never and the other variables defined above in alerts.cfg)
I wrote a custom alert script xymon-SMS-alert.sh in which (for debugging purposes) I write out some of the environment variables to a log file for each alert sent.
In that script I also see that I had written a line to pull something specific from the BBALPHAMSG for use in my email-to-SMS text message (not sure now though what that might have been)
This line from my xymon-SMS-alert.sh was pulling everything starting at the 10th _space_ in the BBALPHAMSG, and then grabbing the first string before the colon in the string that was left over:
--[snip]--
SMSTXT=echo "$BBALPHAMSG" | cut -d' ' -f10- | cut -d':' -f1
--[snip]--
Below are several examples of what BBALPHAMSG is being set to, which appear to me to be truncated and/or missing information. Each of them only has 3 strings separated by _spaces_ so my SMSTXT variable above ALWAYS evaluates to null because it is first looking for everything after the 10th space. :)
--[snip]-- BBALPHAMSG=dhcp.example.org:conn red [52433
BBALPHAMSG=zimbra.example.org:memory RECOVERE
BBALPHAMSG=mvfilemaker.example.org:disk DISABLE --[snip]--
To me it does appear that the SMS format seems to truncate the BBALPHAMSG variable as shown above.
P.S. It is also possible that my SMSTXT variable was evaluating BBALPHAMSG when the FORMAT was set to TEXT or SCRIPT during initial testing - both of which would contain more information - and I had simply left it in there so now I will have to test that theory too. :)
-- Bill Arlofski Reverse Polarity, LLC 860-824-2433 Office http://www.revpol.com/
Below are several examples of what BBALPHAMSG is being set to, which appear to me to be truncated and/or missing information. Each of them only has 3 strings separated by _spaces_ so my SMSTXT variable above ALWAYS evaluates to null because it is first looking for everything after the 10th space. :)
--[snip]-- BBALPHAMSG=dhcp.example.org:conn red [52433
BBALPHAMSG=zimbra.example.org:memory RECOVERE
BBALPHAMSG=mvfilemaker.example.org:disk DISABLE --[snip]--
To me it does appear that the SMS format seems to truncate the BBALPHAMSG variable as shown above.
Yes, thats exactely what I see - there must be some kind of message evaluation in the FORMAT=SMS which fails.
Thanks for testing :)
-- Best regards Gorm
On 11/30/11 12:57, Gorm J. Siiger wrote:
To me it does appear that the SMS format seems to truncate the BBALPHAMSG variable as shown above.
Yes, thats exactely what I see - there must be some kind of message evaluation in the FORMAT=SMS which fails.
Thanks for testing :) Best regards Gorm
Well, it was entirely coincidental that I was looking into my SMS messages at about the exact time you wrote your message. I had just installed a new SMS app on my phone yesterday and was paying more attention to the content of the SMS messages I was receiving which led me to investigate my script. :)
Cheers!
-- Bill Arlofski Reverse Polarity, LLC http://www.revpol.com/
participants (2)
-
gjs@sonnit.dk
-
waa-hobbitml@revpol.com