[Xymon] Monitoring multiple, disconnected sites

Ralph Mitchell ralphmitchell at gmail.com
Sat Mar 16 15:16:33 CET 2013


On the client side, the only change was in
/home/xymon/client/bin/xymonclient.sh.  See attached diff.  You'll need to
fill in the destination server name.

On the server side, add the email alias to /etc/aliases and rebuild the db
files:

     xymonmsg: |/usr/local/bin/xymonmsg.sh
     newaliases

Install the attached xymonmsg.sh script to match the above path.  Check
permissions - it needs to be executable by your email receiver.

This is just a basic configuration.  Extra frills that could be added
include:

     1) encrypt the payload, especially if you send logs.
     2) send a second message with a cryptographic signature for
authentication
     3) add sequence numbers to the subject, then only accept a report with
a higher number than the last, because emails are not guaranteed to arrive
in the same order as they're sent.

Ralph Mitchell


On Sat, Mar 16, 2013 at 4:51 AM, Vernon Everett <everett.vernon at gmail.com>wrote:

> Yes, I can see it.
> It's working perfectly.
> I forgot about using pipes and mail aliases, and my mind was darting off
> down the more difficult tracks.
> This is too easy.
>
> So that Xymon server on you IP is receiving all it's status updates via
> email?
> Brilliant!
>
> If you have any code snippets you can send me, it would be appreciated.
> Thanks for bringing me back to the simple way of doing things.
>
> Regards
> Vernon
>
>
>
> On 16 March 2013 15:16, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
>>
>> my laptop, running the xymon client, delivering the standard status
>> report via email to my server.  Both systems are on my home network.  The
>> laptop is on a wifi link.
>>
>> The status message is about 80Kb, but I'm base64-encoding in-flight
>> because there seems to be a line-length limit, probably enforced by mailx.
>>
>> Details tomorrow, if you're interested.  It's past 3am, and I need
>> sleep...
>>
>> Ralph Mitchell
>>
>>
>> On Fri, Mar 15, 2013 at 10:56 PM, Ralph Mitchell <ralphmitchell at gmail.com
>> > wrote:
>>
>>> 1) the xymon client script assembles the status report into a file, then
>>> transmits that to the server over port 1984 using the xymon client program.
>>>  You could pipe it through mailx instead, to send it to the xymon server.
>>>
>>> 2) on the Xymon server, use an email alias to pipe the incoming mail
>>> through a script.  Or use something like procmail to handle it.  Add an
>>> alias like this to /etc/aliases:
>>>
>>>      xymonmsg: |/usr/local/bin/xymonmsg.sh
>>>
>>> then run "newaliases" to recreate the alias db files.  Any email
>>> addressed to xymonmsg at your.server.com will be piped through that script.
>>>
>>> In the email, everything up to the first blank line is a header.  After
>>> that blank line, the remainder is the body of the email, which would be the
>>> xymon report.  That can be broken out and passed through the xymon command.
>>>
>>> I've done this to deliver logs, but the principal is sound for xymon
>>> reports as well.
>>>
>>> Ralph Mitchell
>>>
>>>
>>> On Fri, Mar 15, 2013 at 9:30 PM, Vernon Everett <
>>> everett.vernon at gmail.com> wrote:
>>>
>>>> Hi Adam and everybody
>>>>
>>>> You are of course completely correct, and confirmed what I knew, but
>>>> didn't really want to accept.
>>>>
>>>> IT people love problem solving within defined limited parameters, so
>>>> let's see if we can come up with an elegant solution to this one, because I
>>>> am sure I am not the first to encounter this.
>>>>
>>>> The only "connection" I have between the sites, is email.
>>>> Is there a way to get the clients to send data to the server via emails?
>>>> Alternatively, we could get a local server instance to update the
>>>> master server with consolidated data via email.
>>>>
>>>> I am thinking the core of the problem is 2-fold.
>>>> 1. Send the data via email from client or local server.
>>>> 2. Receive and interpret the data at server side by parsing the
>>>> incoming emails.
>>>>
>>>> Unless I missed something, both these tasks are non-trivial.
>>>> Any ideas?
>>>>
>>>> Regards
>>>> Vernon
>>>>
>>>>
>>>>
>>>> On 15 March 2013 08:53, Adam Goryachev <
>>>> mailinglists at websitemanagers.com.au> wrote:
>>>>
>>>>> On 15/03/13 11:19, Vernon Everett wrote:
>>>>> > Hi all
>>>>> >
>>>>> > Here's an interesting problem that has been put to me.
>>>>> > A potential customer has a number of independent IT installations,
>>>>> > with no always-on link between them or central IT.
>>>>> > If there is an issue at a site, support staff will connect using VPN
>>>>> > or Citrix over the interwebs.
>>>>> > Is it possible to set up a central Xymon server to monitor these
>>>>> > remote sites?
>>>>> > If yes, then how?
>>>>> > Has anybody done this before?
>>>>>
>>>>> Do you mean the sites have no "always-on link" like a dial-up
>>>>> connection
>>>>> ? or do you mean there is no VPN always on, but they always have
>>>>> working
>>>>> Internet?
>>>>>
>>>>> At the end of the day, if you want to get data out of the network to a
>>>>> remote location (whether you use xymon or any other widget), you will
>>>>> need to decide how that information gets there. Whether that is via the
>>>>> Internet or sneakernet is up to you, but obviously sneakernet will be
>>>>> less frequent and a bit more time consuming.
>>>>>
>>>>> Once you decide on how the data can be transported, it is just a matter
>>>>> of working out how to tell xymon to use that transport method. Let us
>>>>> know what you come up with, and I'm sure someone will be able to offer
>>>>> further advice.
>>>>>
>>>>> Regards,
>>>>> Adam
>>>>>
>>>>> --
>>>>> Adam Goryachev
>>>>> Website Managers
>>>>> www.websitemanagers.com.au
>>>>>
>>>>> _______________________________________________
>>>>> Xymon mailing list
>>>>> Xymon at xymon.com
>>>>> http://lists.xymon.com/mailman/listinfo/xymon
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> "Accept the challenges so that you can feel the exhilaration of victory"
>>>> - General George Patton
>>>>
>>>> _______________________________________________
>>>> Xymon mailing list
>>>> Xymon at xymon.com
>>>> http://lists.xymon.com/mailman/listinfo/xymon
>>>>
>>>>
>>>
>>
>
>
> --
> "Accept the challenges so that you can feel the exhilaration of victory"
> - General George Patton
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130316/52ec30a9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xymonmsg.sh
Type: application/x-sh
Size: 920 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130316/52ec30a9/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xymonclient.sh.diff
Type: application/octet-stream
Size: 487 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130316/52ec30a9/attachment.obj>


More information about the Xymon mailing list