[Xymon] Sending client data without client installed
Raymond Lee
raylee88 at gmail.com
Fri Nov 9 20:39:11 CET 2012
On Thu, Nov 8, 2012 at 6:29 PM, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:
>
> On 1 November 2012 05:58, Andy Smith <abs at shadymint.com> wrote:
>>
>> Raymond Lee wrote:
>
>
>>
>> Maybe too late now, but I have had good success with this for various linux based appliances :-
>>
>> http://tools.rebel-it.com.au/xymon-rclient/
>
>
> (and now listed on Xymonton)
>
> Great to hear this is getting some use.
>
> In theory, this should work with a suitable client script in client/bin called something like xymonclient-cisco_acs.sh, probably based on the xymonclient-linux.sh.
>
> But if you only have one type of appliance, a custom script like Henrik suggested (and Raymond implemented) is a much simpler solution.
>
> Raymond, it would be good to see your final solution to this.
I won't go into too much detail about my scripts, but I did just what
Henrik suggested:
Step 1: I use Expect to ssh to the Cisco ACS appliance and grab the
output of the "show tech-support" command.
Step 2: The output from the above command contains sections that show
'df -k', 'uname -a', 'ifconfig -a', 'netstat -an', etc., so I parse it
with Perl and build a file that looks something like this:
client myhostname.linux cisco_acs
[date]
Fri Nov 9 13:03:53 CST 2012
[uname]
(output of 'uname -a')
[osversion]
CentOS release 4.7 (Final)
[uptime]
(output of 'uptime')
[df]
(output of 'df -k')
[mount]
(output of 'mount')
[free]
(output of 'free')
[ifconfig]
(output of 'ifconfig -a')
[route]
(output of 'netstat -rn')
[ports]
(output of 'netstat -an')
[ifstat]
(output of 'ifconfig -a')
[ps]
(output of 'ps -ef')
[msgs:/var/log/messages]
(last 100 lines of /var/log/messages)
Basically, you want to build a file that looks like the page you see
when you go to https://yourxymonserver/xymon-cgi/svcstatus.sh?CLIENT=clienthostname.
You don't necessarily need to include every [section] header if
they're not available to you...just fill out whatever you have or
whatever you're interested in.
Step 3: on the Xymon server, I feed it that client data file from
above with the command 'xymon localhost "@" < clientdatafile'
That's it! Xymon magic happens from there, and you should start
seeing columns being updated on your Xymon web page.
- Ray
>
> J
>
More information about the Xymon
mailing list