Sending client data without client installed
Greetings,
I have a Cisco ACS appliance that runs a CentOS-based OS. I cannot install the Xymon client on it, but I can ssh to it from our Xymon server and run "show tech-support" to get the output of a long list of commands that include df -k, ps -aux, netstat -an, etc., and save the output to a file.
The output has section headers, so it's easy to parse out each of the command outputs that I'm interested in with a Perl script. I was thinking to have the same Perl script look at each of the command outputs and apply some logic to them to determine what color their status should be and then do a ' bb localhost "status hostname.disk COLOR <additional text>" '. Same idea for hostname.procs, hostname.ports, etc.
But this would essentially be like rewriting the Xymon client. Since I already have the outputs of df -k, ps -aux, netstat -an, etc., can I just send them to the Xymon server and have it magically know what to do with them to populate the disk, procs, and ports columns?
I've already seen the tip at http://www.xymon.com/xymon/help/xymon-tips.html#noinstall , but that doesn't apply to my scenario. I also looked into using devmon, but the MIBs that Cisco ACS supports don't give me the data I'm looking for.
Thanks, Ray
On 30-10-2012 21:22, Raymond Lee wrote:
I have a Cisco ACS appliance that runs a CentOS-based OS. I cannot install the Xymon client on it, but I can ssh to it from our Xymon server and run "show tech-support" to get the output of a long list of commands that include df -k, ps -aux, netstat -an, etc., and save the output to a file. [...] can I just send them to the Xymon server and have it magically know what to do with them to populate the disk, procs, and ports columns?
If you modify the data you have to that the command outputs have the headers that Xymon expects - the "[df]", "[ps]" etc section markers, see the "client data" from one of your other servers - then there is a fair chance that it might work.
In other words, if you can make your data look like what e.g. a Linux client would send, then it should work with Xymon.
The way to send the data off to Xymon would then be
xymon 10.0.0.1 "@" < datafile
and your datafile would have to begin with a line
client myhostname.linux cisco_acs
The "linux" part means that it will be interpreted by the Linux client handler; "cisco_acs" defines the configuration "class" that you can optionally use in the analysis.cfg to write common rules for all of your ACS systems.
The worst that can happen is that you won't see any statuses on your Xymon webpage; then we'll have to dig into the xymond/client/linux.c code to see how it is interpreted.
Regards, Henrik
On Tue, Oct 30, 2012 at 6:03 PM, Henrik Størner <henrik at hswn.dk> wrote:
On 30-10-2012 21:22, Raymond Lee wrote:
I have a Cisco ACS appliance that runs a CentOS-based OS. I cannot install the Xymon client on it, but I can ssh to it from our Xymon server and run "show tech-support" to get the output of a long list of commands that include df -k, ps -aux, netstat -an, etc., and save the output to a file. [...] can I
just send them to the Xymon server and have it magically know what to do with them to populate the disk, procs, and ports columns?
If you modify the data you have to that the command outputs have the headers that Xymon expects - the "[df]", "[ps]" etc section markers, see the "client data" from one of your other servers - then there is a fair chance that it might work.
In other words, if you can make your data look like what e.g. a Linux client would send, then it should work with Xymon.
Yup, I was already going down that route while parsing the output from the Cisco ACS command.
The way to send the data off to Xymon would then be
xymon 10.0.0.1 "@" < datafile
and your datafile would have to begin with a line
client myhostname.linux cisco_acs
The "linux" part means that it will be interpreted by the Linux client handler; "cisco_acs" defines the configuration "class" that you can optionally use in the analysis.cfg to write common rules for all of your ACS systems.
The worst that can happen is that you won't see any statuses on your Xymon webpage; then we'll have to dig into the xymond/client/linux.c code to see how it is interpreted.
Wow, this worked perfectly! I can see the columns on the webpage now. Thanks, Henrik!
-Ray
Regards, Henrik
______________________________**_________________ Xymon mailing list Xymon at xymon.com http://lists.xymon.com/**mailman/listinfo/xymon<http://lists.xymon.com/mailman/listinfo/xymon>
Raymond Lee wrote:
On Tue, Oct 30, 2012 at 6:03 PM, Henrik Størner <henrik at hswn.dk <mailto:henrik at hswn.dk>> wrote:
On 30-10-2012 21:22, Raymond Lee wrote: I have a Cisco ACS appliance that runs a CentOS-based OS. I cannot install the Xymon client on it, but I can ssh to it from our Xymon server and run "show tech-support" to get the output of a long list of commands that include df -k, ps -aux, netstat -an, etc., and save the output to a file. [...] can I just send them to the Xymon server and have it magically know what to do with them to populate the disk, procs, and ports columns? If you modify the data you have to that the command outputs have the headers that Xymon expects - the "[df]", "[ps]" etc section markers, see the "client data" from one of your other servers - then there is a fair chance that it might work. In other words, if you can make your data look like what e.g. a Linux client would send, then it should work with Xymon.Yup, I was already going down that route while parsing the output from the Cisco ACS command.
The way to send the data off to Xymon would then be xymon 10.0.0.1 "@" < datafile and your datafile would have to begin with a line client myhostname.linux cisco_acs The "linux" part means that it will be interpreted by the Linux client handler; "cisco_acs" defines the configuration "class" that you can optionally use in the analysis.cfg to write common rules for all of your ACS systems. The worst that can happen is that you won't see any statuses on your Xymon webpage; then we'll have to dig into the xymond/client/linux.c code to see how it is interpreted.Wow, this worked perfectly! I can see the columns on the webpage now.
Thanks, Henrik!-Ray
Regards, Henrik _________________________________________________ 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 http://lists.xymon.com/mailman/listinfo/xymon
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/
Andy
participants (3)
-
abs@shadymint.com
-
henrik@hswn.dk
-
raylee88@gmail.com