Hi Team
I am new to xymon and trying to learn about it. But I am unable to figure out few questions.
- I run xymon client installation by apt-get. but can you tell me what is actually running or getting installed in my system is it a rpm or what?
- how my agent works. how does it gains information from the system it is running on.
- what is the architecture of the xymon.
I would really appreciate your help. Please give me the insight of the tool.
-- Thanks and Regards
*Sanjana *
Sanjana
The apt-get tool is for Debian-based systems, including Ubuntu. These use the "deb" packaging format, which is different from the "rpm" (Red Hat Package Manager) format that other systems (not just Red Hat) use.
You can list the files installed by a "deb" package using the "dpkg" tool. So the following might list the files that were installed by apt-get for you:
dpkg --listfiles xymon-client
I don't know the name of the package that you installed, but substitute as appropriate. If you don't know the package name either, running "dpkg --list | grep xymon" might show you.
The client package typically creates a client directory structure with subdirectories called "bin", "etc", "ext", "tmp" and "log". Some of these might be symbolic links to other directories. You might find these all under /usr/lib/hobbit/client/.
The client package would also install a start-up or "init" script to start the "xymonlaunch" daemon at boot time. In some releases of the package, the init script actually runs another script called runclient.sh, and this in turn runs xymonlaunch. Either way, the goal is to have xymonlaunch running in memory. Once started, the xymonlaunch process runs everything else that's required to perform the Xymon agent tasks.
The xymonlaunch process looks at the clientlaunch.cfg file (probably in the "etc" subdirectory) and starts processes that are defined in that file. The only thing that needs to run from clientlaunch.cfg is what is defined in the [client] section. This section tells xymonlaunch to run the "xymonclient.sh" script every 5 minutes.
Assuming a default "central mode" installation, the xymonclient.sh script has two main tasks. The first task is to collect local client data (CPU usage, disk usage, etc) for reporting to the Xymon server. The second task is to fetch any (optional) configuration data from the Xymon server and store it in a temporary file. The temporary file is used to collect additional client data to send to the Xymon server on the next run.
As mentioned, the client data collection is performed by the xymonclient.sh script. One of the first things this script does it to work out the type of system on which it is running. It then runs an OS-specific script as appropriate. For example, on a Linux system, xymonclient.sh will run xymonclient-linux.sh. The OS-specific script is where the majority all the data is actually collected. It's all collated into a client message format and written out for xymonclient.sh to collect and report back to the Xymon server.
The client message is sent back to the Xymon server over a TCP connection on port 1984. The Xymon server collects this message, parses the different sections for useful metrics, and uses the data to create status information and RRD files for graphing. All of the status information is stored in html files on disk, so that a web server, such as Apache, can display it all. Some information, such as the various graphs of performance metrics, is dynamic, and uses some CGI scripts to be called by the web server.
The Xymon server also runs a xymonlaunch process, and has a similar configuration file called tasks.cfg. There's much more that goes on here, so there are many more processes started by the server from the tasks.cfg file.
The Xymon server's different components communicate with each other via various message formats. I've mentioned a "client" message containing client data. There are other messages also, such as "status" messages that some the Xymon server components can report "red" or "yellow" or "green" conditions. Each message type has its own "channel" handler. For example, a client message usually contains a [df] section with the output of the "df" command, and this includes disk usage figures. The xymond process gives the message to the xymond_client process, which parses the [df] section for disk usage levels, and if a threshold is exceeded (90% by default) then xymond_client will send a "status" message over TCP port 1984 containing the alert colour ("yellow" for 90%) and other information. The status message is then received by xymond which updates the "disk" status page for the server in question. The xymond process also sends the status message to the xymond_rrd process so that it can add the disk usage percentages to an RRD file for graphing.
Xymon clients can also send message types other than "client" messages, and the most common one is the "status" message that I've already mentioned. In fact, the forerunner to Xymon, called Big Brother, status messages almost exclusively, and the "client" message is a much more recent invention.
One of Xymon's awesome features is how extensible it is, and the "status" message is the classic way to extend Xymon's functionality. The "ext" subdirectory on a client is usually where extension scripts are located (but they could be anywhere). You can write a script to monitor anything you like, and report it to the Xymon server using a status message. Such a script can be as simple as:
#!/bin/sh
RESULT=sudo smartctl -H /dev/sda0 2>&1
if echo "$RESULT" | grep "Status: OK"; then
COL="green"
else
COL="red"
fi
printf "status $MACHINE.smart $COL SMART status $COL\n$RESULT\n" | $XYMON
$XYMSRV @
You simply arrange for the script to be run every 5 minutes as an "ext" script, and you'll end up with a new "smart" status page (and a corresponding green, yellow or red dot on the summary page) on your Xymon server web interface.
This is fairly simplistic overview, and there are many features I haven't mentioned, but I hope it answers some of your questions. The official introduction to Xymon is here:
http://xymon.sourceforge.net/xymon/help/manpages/man7/xymon.7.html
Cheers Jeremy
On 28 January 2015 at 00:09, Sanjana Ahlawat <sanjana.ahlawat at gssltd.co.in> wrote:
Hi Team
I am new to xymon and trying to learn about it. But I am unable to figure out few questions.
- I run xymon client installation by apt-get. but can you tell me what is actually running or getting installed in my system is it a rpm or what?
- how my agent works. how does it gains information from the system it is running on.
- what is the architecture of the xymon.
I would really appreciate your help. Please give me the insight of the tool.
-- Thanks and Regards
*Sanjana *
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 28 January 2015 at 14:31, J.C. Cleaver <cleaver at terabithia.org> wrote:
On Tue, January 27, 2015 7:14 pm, Jeremy Laidman wrote:
*snipped*
That's such an awesome summary I might just have to steal that for our internal team documentation :)
Shucks, what a compliment! Thanks.
Hi Jeremy
Thanks for the prompt reply. Many of my doubts got cleared from what you have answered but I would be really pleased if u can provide little more information on the process of data collection by client. It is clear that xymonclient.sh collects the data and is than forwarded to the server. But my main query is how does this collects(xymonclient.sh) data. I have an understanding that message data is read from system logs or error logs, but what about the cpu, disk and other information.
Thanks and Regard Sanjana
On Wed, Jan 28, 2015 at 8:44 AM, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:
Sanjana
The apt-get tool is for Debian-based systems, including Ubuntu. These use the "deb" packaging format, which is different from the "rpm" (Red Hat Package Manager) format that other systems (not just Red Hat) use.
You can list the files installed by a "deb" package using the "dpkg" tool. So the following might list the files that were installed by apt-get for you:
dpkg --listfiles xymon-client
I don't know the name of the package that you installed, but substitute as appropriate. If you don't know the package name either, running "dpkg --list | grep xymon" might show you.
The client package typically creates a client directory structure with subdirectories called "bin", "etc", "ext", "tmp" and "log". Some of these might be symbolic links to other directories. You might find these all under /usr/lib/hobbit/client/.
The client package would also install a start-up or "init" script to start the "xymonlaunch" daemon at boot time. In some releases of the package, the init script actually runs another script called runclient.sh, and this in turn runs xymonlaunch. Either way, the goal is to have xymonlaunch running in memory. Once started, the xymonlaunch process runs everything else that's required to perform the Xymon agent tasks.
The xymonlaunch process looks at the clientlaunch.cfg file (probably in the "etc" subdirectory) and starts processes that are defined in that file. The only thing that needs to run from clientlaunch.cfg is what is defined in the [client] section. This section tells xymonlaunch to run the "xymonclient.sh" script every 5 minutes.
Assuming a default "central mode" installation, the xymonclient.sh script has two main tasks. The first task is to collect local client data (CPU usage, disk usage, etc) for reporting to the Xymon server. The second task is to fetch any (optional) configuration data from the Xymon server and store it in a temporary file. The temporary file is used to collect additional client data to send to the Xymon server on the next run.
As mentioned, the client data collection is performed by the xymonclient.sh script. One of the first things this script does it to work out the type of system on which it is running. It then runs an OS-specific script as appropriate. For example, on a Linux system, xymonclient.sh will run xymonclient-linux.sh. The OS-specific script is where the majority all the data is actually collected. It's all collated into a client message format and written out for xymonclient.sh to collect and report back to the Xymon server.
The client message is sent back to the Xymon server over a TCP connection on port 1984. The Xymon server collects this message, parses the different sections for useful metrics, and uses the data to create status information and RRD files for graphing. All of the status information is stored in html files on disk, so that a web server, such as Apache, can display it all. Some information, such as the various graphs of performance metrics, is dynamic, and uses some CGI scripts to be called by the web server.
The Xymon server also runs a xymonlaunch process, and has a similar configuration file called tasks.cfg. There's much more that goes on here, so there are many more processes started by the server from the tasks.cfg file.
The Xymon server's different components communicate with each other via various message formats. I've mentioned a "client" message containing client data. There are other messages also, such as "status" messages that some the Xymon server components can report "red" or "yellow" or "green" conditions. Each message type has its own "channel" handler. For example, a client message usually contains a [df] section with the output of the "df" command, and this includes disk usage figures. The xymond process gives the message to the xymond_client process, which parses the [df] section for disk usage levels, and if a threshold is exceeded (90% by default) then xymond_client will send a "status" message over TCP port 1984 containing the alert colour ("yellow" for 90%) and other information. The status message is then received by xymond which updates the "disk" status page for the server in question. The xymond process also sends the status message to the xymond_rrd process so that it can add the disk usage percentages to an RRD file for graphing.
Xymon clients can also send message types other than "client" messages, and the most common one is the "status" message that I've already mentioned. In fact, the forerunner to Xymon, called Big Brother, status messages almost exclusively, and the "client" message is a much more recent invention.
One of Xymon's awesome features is how extensible it is, and the "status" message is the classic way to extend Xymon's functionality. The "ext" subdirectory on a client is usually where extension scripts are located (but they could be anywhere). You can write a script to monitor anything you like, and report it to the Xymon server using a status message. Such a script can be as simple as:
#!/bin/sh RESULT=
sudo smartctl -H /dev/sda0 2>&1if echo "$RESULT" | grep "Status: OK"; then COL="green" else COL="red" fi printf "status $MACHINE.smart $COL SMART status $COL\n$RESULT\n" | $XYMON $XYMSRV @You simply arrange for the script to be run every 5 minutes as an "ext" script, and you'll end up with a new "smart" status page (and a corresponding green, yellow or red dot on the summary page) on your Xymon server web interface.
This is fairly simplistic overview, and there are many features I haven't mentioned, but I hope it answers some of your questions. The official introduction to Xymon is here:
http://xymon.sourceforge.net/xymon/help/manpages/man7/xymon.7.html
Cheers Jeremy
On 28 January 2015 at 00:09, Sanjana Ahlawat <sanjana.ahlawat at gssltd.co.in
wrote:
Hi Team
I am new to xymon and trying to learn about it. But I am unable to figure out few questions.
- I run xymon client installation by apt-get. but can you tell me what is actually running or getting installed in my system is it a rpm or what?
- how my agent works. how does it gains information from the system it is running on.
- what is the architecture of the xymon.
I would really appreciate your help. Please give me the insight of the tool.
-- Thanks and Regards
*Sanjana *
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- Thanks and Regards
*Sanjana Wily Admin Team,Gateway Software Solutions Pvt. Ltd.249(A) , 1st FloorEast of Kailash , Sant NagarNew Delhi-110065, India..sanjana.ahlawat at gssltd.co.in <sanjana.ahlawat at gssltd.co.in>*
On Tue, January 27, 2015 10:37 pm, Sanjana Ahlawat wrote:
Thanks for the prompt reply. Many of my doubts got cleared from what you have answered but I would be really pleased if u can provide little more information on the process of data collection by client. It is clear that xymonclient.sh collects the data and is than forwarded to the server. But my main query is how does this collects(xymonclient.sh) data. I have an understanding that message data is read from system logs or error logs, but what about the cpu, disk and other information.
Thanks and Regard Sanjana
Sanjana,
All of those values are collected as the raw output from various unix shell commands.
"xymonclient.sh" checks its local OS type (eg, "linux") and then executes (eg.) "xymonclient-linux.sh". That script simply executes basic utilities like 'free', 'df', 'top', 'ps', etc... The output is appended to the overall "client" message being sent back to the server.
Once it's received server-side, the xymond_client process listens for incoming "client" messages, determines that it relates to an (eg.) linux server, and evaluates the output of those free/df/top/etc. commands, creating status messages as appropriate to reflect whether the CPU load average has exceeded the defined threshold.
Note that when running xymonclient.sh in "--local" mode, xymond_client actually runs on the client machine, which then sends those status messages up to the server. However, the basic principle is the same: xymonclient(-*).sh executes raw *nix commands and the output is parsed by a different tool to isolate the cpu/disk/memory statistics.
HTH,
-jc
On Wed, Jan 28, 2015 at 8:44 AM, Jeremy Laidman <jlaidman at rebel-it.com.au> wrote:
Sanjana
The apt-get tool is for Debian-based systems, including Ubuntu. These use the "deb" packaging format, which is different from the "rpm" (Red Hat Package Manager) format that other systems (not just Red Hat) use.
You can list the files installed by a "deb" package using the "dpkg" tool. So the following might list the files that were installed by apt-get for you:
dpkg --listfiles xymon-client
I don't know the name of the package that you installed, but substitute as appropriate. If you don't know the package name either, running "dpkg --list | grep xymon" might show you.
The client package typically creates a client directory structure with subdirectories called "bin", "etc", "ext", "tmp" and "log". Some of these might be symbolic links to other directories. You might find these all under /usr/lib/hobbit/client/.
The client package would also install a start-up or "init" script to start the "xymonlaunch" daemon at boot time. In some releases of the package, the init script actually runs another script called runclient.sh, and this in turn runs xymonlaunch. Either way, the goal is to have xymonlaunch running in memory. Once started, the xymonlaunch process runs everything else that's required to perform the Xymon agent tasks.
The xymonlaunch process looks at the clientlaunch.cfg file (probably in the "etc" subdirectory) and starts processes that are defined in that file. The only thing that needs to run from clientlaunch.cfg is what is defined in the [client] section. This section tells xymonlaunch to run the "xymonclient.sh" script every 5 minutes.
Assuming a default "central mode" installation, the xymonclient.sh script has two main tasks. The first task is to collect local client data (CPU usage, disk usage, etc) for reporting to the Xymon server. The second task is to fetch any (optional) configuration data from the Xymon server and store it in a temporary file. The temporary file is used to collect additional client data to send to the Xymon server on the next run.
As mentioned, the client data collection is performed by the xymonclient.sh script. One of the first things this script does it to work out the type of system on which it is running. It then runs an OS-specific script as appropriate. For example, on a Linux system, xymonclient.sh will run xymonclient-linux.sh. The OS-specific script is where the majority all the data is actually collected. It's all collated into a client message format and written out for xymonclient.sh to collect and report back to the Xymon server.
The client message is sent back to the Xymon server over a TCP connection on port 1984. The Xymon server collects this message, parses the different sections for useful metrics, and uses the data to create status information and RRD files for graphing. All of the status information is stored in html files on disk, so that a web server, such as Apache, can display it all. Some information, such as the various graphs of performance metrics, is dynamic, and uses some CGI scripts to be called by the web server.
The Xymon server also runs a xymonlaunch process, and has a similar configuration file called tasks.cfg. There's much more that goes on here, so there are many more processes started by the server from the tasks.cfg file.
The Xymon server's different components communicate with each other via various message formats. I've mentioned a "client" message containing client data. There are other messages also, such as "status" messages that some the Xymon server components can report "red" or "yellow" or "green" conditions. Each message type has its own "channel" handler. For example, a client message usually contains a [df] section with the output of the "df" command, and this includes disk usage figures. The xymond process gives the message to the xymond_client process, which parses the [df] section for disk usage levels, and if a threshold is exceeded (90% by default) then xymond_client will send a "status" message over TCP port 1984 containing the alert colour ("yellow" for 90%) and other information. The status message is then received by xymond which updates the "disk" status page for the server in question. The xymond process also sends the status message to the xymond_rrd process so that it can add the disk usage percentages to an RRD file for graphing.
Xymon clients can also send message types other than "client" messages, and the most common one is the "status" message that I've already mentioned. In fact, the forerunner to Xymon, called Big Brother, status messages almost exclusively, and the "client" message is a much more recent invention.
One of Xymon's awesome features is how extensible it is, and the "status" message is the classic way to extend Xymon's functionality. The "ext" subdirectory on a client is usually where extension scripts are located (but they could be anywhere). You can write a script to monitor anything you like, and report it to the Xymon server using a status message. Such a script can be as simple as:
#!/bin/sh RESULT=
sudo smartctl -H /dev/sda0 2>&1if echo "$RESULT" | grep "Status: OK"; then COL="green" else COL="red" fi printf "status $MACHINE.smart $COL SMART status $COL\n$RESULT\n" | $XYMON $XYMSRV @You simply arrange for the script to be run every 5 minutes as an "ext" script, and you'll end up with a new "smart" status page (and a corresponding green, yellow or red dot on the summary page) on your Xymon server web interface.
This is fairly simplistic overview, and there are many features I haven't mentioned, but I hope it answers some of your questions. The official introduction to Xymon is here:
http://xymon.sourceforge.net/xymon/help/manpages/man7/xymon.7.html
Cheers Jeremy
On 28 January 2015 at 00:09, Sanjana Ahlawat <sanjana.ahlawat at gssltd.co.in
wrote:
Hi Team
I am new to xymon and trying to learn about it. But I am unable to figure out few questions.
- I run xymon client installation by apt-get. but can you tell me what is actually running or getting installed in my system is it a rpm or what?
- how my agent works. how does it gains information from the system it is running on.
- what is the architecture of the xymon.
I would really appreciate your help. Please give me the insight of the tool.
-- Thanks and Regards
*Sanjana *
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
-- Thanks and Regards
*Sanjana Wily Admin Team,Gateway Software Solutions Pvt. Ltd.249(A) , 1st FloorEast of Kailash , Sant NagarNew Delhi-110065, India..sanjana.ahlawat at gssltd.co.in <sanjana.ahlawat at gssltd.co.in>*
Xymon mailing list Xymon at xymon.com http://lists.xymon.com/mailman/listinfo/xymon
On 29 January 2015 at 06:29, J.C. Cleaver <cleaver at terabithia.org> wrote:
All of those values are collected as the raw output from various unix shell commands.
Yep, exactly as JC said. To illustrate a little bit more, you should have a look at the xymonclient-linux.sh (or any of the other OS-specific versions of the same). At around line 80 is the code for "free" to show free memory, which looks like this:
echo "[free]" free
The output for this is something like:
[free] total used free shared buffers cached Mem: 6103900 5495904 607996 0 655316 4156752 -/+ buffers/cache: 683836 5420064 Swap: 6291448 88 6291360
So this text, and all of the others that are generated by xymonclient-linux.sh, are sent as a client message to the Xymon server. Have a look at an example client message on the demon website at http://xymon.org/xymon-cgi/svcstatus.sh?CLIENT=felix.hswn.dk. You'll see a [free] section that looks pretty much like I showed above.
In fact, if you run xymonclient-linux.sh on a client installation, it will send the client message to your screen.
If a new OS came along, anyone could create their own xymonclient-newos.sh script and have it run all of the appropriate commands (df, free, ifconfig) to generate the same text elements as all of the other OS-specific client scripts.
Then, on the Xymon server side, different bits of the client message processing code will parse the client message for different sections. The bit that looks for free memory will look for the [free] section for a Linux, AIX or SCO server, or the [meminfo] section for a BSD-type server, or [memory] section for a Solaris, HPUX or Windows server. In most cases, the same section is used for all OSes, but in some cases, there are significant differences between OS flavours, and so different code needs to parse them differently. But the important thing is that the client message contains the output of the "df", "top", "vmstat" or whatever commands, labeled by [sections], and sent to the server for parsing.
Cheers Jeremy
You might find this diagram of some help in understanding the different parts of Xymon and the different message types it uses.
http://tools.rebel-it.com.au/Xymon%20-%20the%20Big%20Picture.pdf
I refer to it often.
Cheers Jeremy
participants (3)
-
cleaver@terabithia.org
-
jlaidman@rebel-it.com.au
-
sanjana.ahlawat@gssltd.co.in