[Xymon] MacBook client
Richard Hamilton
rlhamil2 at gmail.com
Wed Feb 15 01:37:33 CET 2017
Login startup items won't do it. Back before OS X dropped support for system startup items (I think that was gone in Yosemite), they'd have worked, and that's what I used. Nowadays, a launch daemon plist is the way to go, but I've had little luck with either the MacPorts one (which if I recall, uses an intermediate process to cope with the mismatch between launchd requirements and traditional Unix daemon processes), or one of my own used with a modified runclient.sh that passes through --no-daemon to xymonlaunch. Mine almost works, but for some reason xymonlaunch when started at boot that way doesn't seem to send any data; I have to kill it and let launchd restart it before it works properly, I haven't figured that out yet; with only a couple of systems affected, I've just worked around it so far. In the unlikely event that I get motivated and figure it out, I'll write a message; but you'll probably get there faster if you figure it out for yourself. :-)
Update: ok, after having it randomly work just to mess with me, I finally rebooted often enough to catch the failure. BSD style ps let me see xymonlaunch's environment variables, and when it was failing, MACHINEDOTS (and MACHINE) were set to localhost. In other words, it set those variables too early, before the system had set the proper hostname. I made some further changes to my already heavily modified runclient.sh, to set MACHINEDOTS and MACHINE after waiting for the network (if an option to do that was passed). I think it should work now. And I think the runclient.sh should still work compatibly with the original if none of the new options are passed.
Here are the files I have. They have .txt suffixes on the end so that mail filters won't choke on a .sh suffix or whatever. You need to change the pathname for runclient.sh in the .plist file, and possibly the user and group it runs as (_xymon on mine) and the environment variables it sets up; not sure they're all necessary, but they don't hurt, at least not if they're correct.
On Tue, Feb 14, 2017 at 2:07 PM, Kris Springer <kspringer at innovateteam.com <mailto:kspringer at innovateteam.com>> wrote:
Thanks. I was able to get the Macports xymon-client functioning manually, but can't seem to figure out how to make it auto start at boot. I found some instructions at
http://sandlininc.com/?p=112 <http://sandlininc.com/?p=112>
and I ran the following commands in an attempt to make it work, but it didn't. The client is not auto-starting after a reboot.
$sudo -s
bash-3.2# launchctl load -w /Library/LaunchDaemons/org.macports.xymon-client.plist
bash-3.2# launchctl start org.macports.xymon-client
Anyone know the commands to make this work? I suspect I simply entering the wrong commands. Or is there a startup 'app' that could be added into the 'Users & Groups>Login Items' section instead?
I'm on MacBook Pro with Sierra v10.12.3
Thank you.
------------------------------------------------
Kris Springer
On 2/10/2017 10:42 AM, Bruce Ferrell wrote:
> On 2/10/17 10:13 AM, Kris Springer wrote:
>> Anyone have a xymon client that can be easily installed on MacBooks? Something as easy as BBWin would be nice.
>>
>> Thank you.
>>
>> ------------------------------------------------
>>
>> Kris Springer
>>
>>
>>
>>
>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com <mailto:Xymon at xymon.com>
>> http://lists.xymon.com/mailman/listinfo/xymon <http://lists.xymon.com/mailman/listinfo/xymon>
> macports has a xymon client
>
>
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com <mailto:Xymon at xymon.com>
> http://lists.xymon.com/mailman/listinfo/xymon <http://lists.xymon.com/mailman/listinfo/xymon>
_______________________________________________
Xymon mailing list
Xymon at xymon.com <mailto:Xymon at xymon.com>
http://lists.xymon.com/mailman/listinfo/xymon <http://lists.xymon.com/mailman/listinfo/xymon>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170214/88af1a95/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: com.xymon.client.plist.txt
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170214/88af1a95/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170214/88af1a95/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: runclient.sh.txt
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170214/88af1a95/attachment-0001.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20170214/88af1a95/attachment-0002.html>
More information about the Xymon
mailing list