<div dir="ltr"><div>JC,<br>      I see it takes stdout just fine.  Might I add that it might be beneficial if the script would output the heading<br>say [script] vice the name of the the script "script.sh"?  I java a bunch of specific info on each host that is 90%<br>there for ref by our security folks, developers, etc... for instance which mode selinux is in, whether auditing is running,<br>backup logs are current, etc.  Using the "local" directory feature would gather the info, put a header on it and allow<br>reports to more easily be run against the data.<br><br>      Also, on the <a href="http://xymond_rootlogin.pl">xymond_rootlogin.pl</a> script, where would this be set up to run? In the tasks.cfg?<br><br><br></div>Dave<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Jan 10, 2016 at 8:05 PM, J.C. Cleaver <span dir="ltr"><<a href="mailto:cleaver@terabithia.org" target="_blank">cleaver@terabithia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Glad it could help :)<br>
<br>
There should be a README-local file in the client home directory (or<br>
documentation directory, depending on what install method you used). By<br>
default, the client will look in $XYMONHOME/local/ for anything<br>
executable. If anything is found, it's run (xymonclient.sh:65) and the<br>
output is added to the client report near the end, under the heading<br>
"[local:<filename>]". This allows a server admin to easily add new things<br>
on a one-off basis.<br>
<br>
Xymon v4.4 will have a similar directory named /sections/ with does the<br>
same thing, except without the "local:" prefix on the output. (It's<br>
intended for packaged site or distro/vendor-specific scripts.)<br>
<br>
<br>
Ryan: Yes, this is one area where it definitely needs more highlighting. A<br>
lot of users miss that this happens, but it's really an invaluable<br>
resource for forensics.<br>
<br>
Remember, though, that this requires xymon to be running in server-config<br>
mode, not --local client mode. In --local client mode, this raw data never<br>
leaves the original box and so can't be saved.<br>
<br>
<br>
Regards,<br>
-jc<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Sun, January 10, 2016 3:51 pm, David Boyer wrote:<br>
> JC,<br>
>       Yes, it does! Thanks for the background.. I've written/modified<br>
> several tests for my environment while we were still in the "big brother"<br>
> era.  I'm still<br>
> learning the ins/outs of xymon.  I'm intrigued by the use of the "local"<br>
> directory on the clientside.  Where might I find more information about<br>
> using this feature.<br>
><br>
> Dave<br>
><br>
> On Sun, Jan 10, 2016 at 3:35 PM, Novosielski, Ryan<br>
> <<a href="mailto:novosirj@ca.rutgers.edu">novosirj@ca.rutgers.edu</a>><br>
> wrote:<br>
><br>
>> I just wanted to thank you, JC, for this information. I wanted to know<br>
>> whether it would be possible to check the kernel version back some time<br>
>> even though that is something I did not test. I figured the info might<br>
>> show<br>
>> something, but that isn't kept in history or anything. If I had realized<br>
>> that a client data snapshot is kept when the status changes, I would<br>
>> have<br>
>> had the answer (which I still need, so it's very helpful).<br>
>><br>
>> ____ *Note: UMDNJ is now Rutgers-Biomedical and Health Sciences*<br>
>> || \\UTGERS      |---------------------*O*---------------------<br>
>> ||_// Biomedical | Ryan Novosielski - Senior Technologist<br>
>> || \\ and Health | novosirj@rutgers.edu- <a href="tel:973%2F972.0922" value="+19739720922">973/972.0922</a> (2x0922)<br>
>> ||  \\  Sciences | OIRT/High Perf & Res Comp - MSB C630, Newark<br>
>>     `'<br>
>><br>
>> On Jan 10, 2016, at 06:48, J.C. Cleaver <<a href="mailto:cleaver@terabithia.org">cleaver@terabithia.org</a>> wrote:<br>
>><br>
>> Hi David,<br>
>><br>
>><br>
>> On Sat, January 9, 2016 3:15 pm, David Boyer wrote:<br>
>><br>
>> I see that there is data in the client data that is not turned into<br>
>><br>
>> columns?  Can I turn this data into columns to report?  I'm using xymon<br>
>><br>
>> 4.3.20 on both the client/server.<br>
>><br>
>><br>
>> On linux, I see that this data is not turned into any columns:<br>
>><br>
>> [who]<br>
>><br>
>> [route]<br>
>><br>
>> [netstat]<br>
>><br>
>> [ifstat]<br>
>><br>
>><br>
>> Not that I'd use all of them, just wondering what the reasoning is<br>
>> behind<br>
>><br>
>> it.<br>
>><br>
>><br>
>> This is correct. The client data is a full raw text of various bits of<br>
>> information that can be used to create status messages out of, but there<br>
>> isn't a mandated 1:1 correspondence between each section and each test.<br>
>> By<br>
>> keeping them independent (raw data and central processing), you have the<br>
>> flexibility to write up new tests based off of already-existing incoming<br>
>> data, and/or add new "raw" data without having a specific test in mind.<br>
>><br>
>> For the 'who' data in particular, there's a sample processor in the<br>
>> source<br>
>> tarball that can demonstrate how easy it is to add simple new tests at<br>
>><br>
>> <a href="https://sourceforge.net/p/xymon/code/HEAD/tree/branches/4.3.24/xymond/xymond_rootlogin.pl" rel="noreferrer" target="_blank">https://sourceforge.net/p/xymon/code/HEAD/tree/branches/4.3.24/xymond/xymond_rootlogin.pl</a><br>
>><br>
>> You can easily add new sections to the client data by adding files to a<br>
>> "/local/" directory on the client machine, or editing the<br>
>> xymonclient-${OS}.sh shell script by hand, and running any command that<br>
>> the unprivileged 'xymon' user can execute.<br>
>><br>
>> What's the benefit to all this additional data if it's not used?<br>
>> Primarily<br>
>> forensics and triage. As the xymon(7) man page puts it:<br>
>><br>
>> The Xymon user-interface is simple, but engineers will also find lots of<br>
>><br>
>> relevant information. E.g. the data that clients report to Xymon contain<br>
>> the raw output from a number of system commands. That information is<br>
>> available directly in Xymon, so an administrator no longer needs to<br>
>> login to a server to get an overview of how it is behaving - the very<br>
>> commands they would normally run have already been performed, and the<br>
>> results are on-line in Xymon.<br>
>><br>
>> <a href="https://www.xymon.com/help/manpages/man7/xymon.7.html" rel="noreferrer" target="_blank">https://www.xymon.com/help/manpages/man7/xymon.7.html</a><br>
>><br>
>><br>
>><br>
>> This becomes even more relevant when you consider snapshoting. When a<br>
>> status goes "red", a snapshot of the client data at that time is kept.<br>
>> So<br>
>> if you went back later to try to figure out why (e.g.) CPU was rising,<br>
>> the<br>
>> output of the '[who]' section tells you who might have been doing<br>
>> something then, even if the data wasn't used for making a test out of at<br>
>> that time.<br>
>><br>
>><br>
>><br>
>><br>
>> Also, I notice that getting the data via xymondboard is not 100%<br>
>> either...<br>
>><br>
>><br>
>> [xymon@ztest bin]$ ./xymon 192.168.1.230 "clientlog yumlist section=who"<br>
>><br>
>> *snip*<br>
>><br>
>><br>
>> As you can see below, requesting a status on all the tests, there is no<br>
>><br>
>> "who" being reported.<br>
>><br>
>> But just a moment ago, asking for just that data it works.<br>
>><br>
>><br>
>> [xymon@ztest bin]$ ./xymon 192.168.1.230 "xymondboard host=yumlist"<br>
>><br>
>> *snip*<br>
>><br>
>><br>
>> Correct. The "clientlog" command retrieves the most recent raw client<br>
>> data, while the "xymondboard" command retrieves just the status messages<br>
>> (the tests that you see on the webpages).<br>
>><br>
>> The "clientlog" column on the web page, much like the "info" and<br>
>> "trends"<br>
>> columns, isn't a real test... it's just present to provide easy access<br>
>> to<br>
>> the most recent data. You can also access it from the "Client data" link<br>
>> on the bottom of any of that host's status pages.<br>
>><br>
>><br>
>> Hope that helps!<br>
>><br>
>> -jc<br>
>><br>
>> _______________________________________________<br>
>> Xymon mailing list<br>
>> <a href="mailto:Xymon@xymon.com">Xymon@xymon.com</a><br>
>> <a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank">http://lists.xymon.com/mailman/listinfo/xymon</a><br>
>><br>
>><br>
><br>
<br>
<br>
</div></div></blockquote></div><br></div>