External scripts for Xymon client on Xymon Server
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi all,
I am not sure what is the correct way to add external scripts to a client instance running on a machine that houses a server. If you look in hobbitlaunch.cfg in the server's etc directory, you see:
"hobbitclient" runs the Xymon client. The client is installed
automatically when you install a Xymon server (presumably, you do
want to monitor the Xymon server ?), but there's no need to have two
hobbitlaunch instances running at the same time. So we'll just run it
from here.
Note: If you are using another client package, you should disable this
one.
[hobbitclient] ENVFILE /opt/xymon-4.2.3/client/etc/hobbitclient.cfg NEEDS hobbitd CMD /opt/xymon-4.2.3/client/bin/hobbitclient.sh LOGFILE $BBSERVERLOGS/hobbitclient.log INTERVAL 5m
...however, if I do this, it appears as if either none of the external scripts run, or if they do run, they don't write anything to the logfiles/do not get their information to the Xymon server program.
Do I need to add the external scripts to hobbitlaunch.cfg instead of clientlaunch.cfg? Something else?
Thanks in advance for any help!
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0Se9kACgkQmb+gadEcsb5dZgCcCTI1Vo5bettyXsJmPVxvUCBn vvEAn1JPGf35Bp05ixzRkl1aGIqR9f46 =SXy3 -----END PGP SIGNATURE-----
The clientlaunch.cfg is in the client's etc dir, not the server etc dir. Logs / tmp files will be under the client dir too.
Example, on a hobbit server there are both $hobbithome/{server,client} dirs.
client/ext/na2.sh
[client/etc] tail clientlaunch.cfg
[NA2CPU] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/na2.sh LOGFILE $HOBBITCLIENTHOME/logs/na2.log INTERVAL 2m
Tim
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/22/2010 05:43 PM, Tim McCloskey wrote:
The clientlaunch.cfg is in the client's etc dir, not the server etc dir. Logs / tmp files will be under the client dir too.
Example, on a hobbit server there are both $hobbithome/{server,client} dirs.
client/ext/na2.sh
[client/etc] tail clientlaunch.cfg
[NA2CPU] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/na2.sh LOGFILE $HOBBITCLIENTHOME/logs/na2.log INTERVAL 2m
Yes, that much I knew. OK, so I've taken another look at this. It looks as if the external client scripts ARE running, but the data doesn't go anywhere and there are no ghost clients. I've also checked what I believe are all of the places that the port and server address are defined to make sure this isn't all going someplace else.
One of my external scripts, for example, is a vmio script. You can see it is running the commands needed to accomplish that:
xymon 4976 4973 0 17:50:09 ? 0:00 vmstat 300 2 xymon 4978 4975 0 17:50:09 ? 0:00 iostat -dxsrP 300 2
...however, about 6 months ago, these tests turned purple (to me, what seems like by magic). The other external scripts (one that gets temperature and one that does metastat for the SW raid) run too quickly for me to tell what their story is, but they do not write anything to the client log directory.
Anyone have any idea how to troubleshoot this?
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0SgcAACgkQmb+gadEcsb4AMgCfcebR4VMSStbvrzA3JZpF6wzB 6DcAnA5yA1redutitZN8AYnOtldWY5lZ =wP+T -----END PGP SIGNATURE-----
You probably have a log file somewhere. In Tim's example, it defined like this:
LOGFILE $HOBBITCLIENTHOME/logs/na2.log
If the log doesn't show anything interesting, you should be able to *make* it show something interesting. For example, a "set -x" at the top of the script will show you exactly what it does.
You can also execute the script manually as if it were Xymon executing it, using the bbcmd command.
Ralph Mitchell
On Wed, Dec 22, 2010 at 5:54 PM, Ryan Novosielski <novosirj at umdnj.edu>wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/22/2010 05:43 PM, Tim McCloskey wrote:
The clientlaunch.cfg is in the client's etc dir, not the server etc dir. Logs / tmp files will be under the client dir too.
Example, on a hobbit server there are both $hobbithome/{server,client} dirs.
client/ext/na2.sh
[client/etc] tail clientlaunch.cfg
[NA2CPU] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/na2.sh LOGFILE $HOBBITCLIENTHOME/logs/na2.log INTERVAL 2m
Yes, that much I knew. OK, so I've taken another look at this. It looks as if the external client scripts ARE running, but the data doesn't go anywhere and there are no ghost clients. I've also checked what I believe are all of the places that the port and server address are defined to make sure this isn't all going someplace else.
One of my external scripts, for example, is a vmio script. You can see it is running the commands needed to accomplish that:
xymon 4976 4973 0 17:50:09 ? 0:00 vmstat 300 2 xymon 4978 4975 0 17:50:09 ? 0:00 iostat -dxsrP 300 2
...however, about 6 months ago, these tests turned purple (to me, what seems like by magic). The other external scripts (one that gets temperature and one that does metastat for the SW raid) run too quickly for me to tell what their story is, but they do not write anything to the client log directory.
Anyone have any idea how to troubleshoot this?
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0SgcAACgkQmb+gadEcsb4AMgCfcebR4VMSStbvrzA3JZpF6wzB 6DcAnA5yA1redutitZN8AYnOtldWY5lZ =wP+T -----END PGP SIGNATURE-----
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
An HTML attachment was scrubbed... URL: <http://lists.xymon.com/pipermail/xymon/attachments/20101223/8905d9f6/attachment.html>
I always used to use cron to run extra checkout scripts - it takes the guesswork out of scheduling a lot of scripts.
Ralph Mitchell
On Wed, Dec 22, 2010 at 6:44 PM, Roland Soderstrom < rolands at logicaltech.com.au> wrote:
This always confused me. In beta2 I run the client tasks specified in client/etc/clientlaunch.cfg
in beta3 I run the client tasks specified in server/etc/tasks.cfg it's even a note in tasks.cfg
client tasks are configured here, apart from the normal builtin that runs
from xymonclient.
I'm not sure which method is the correct one in beta2, the note in beta3 tells me that is the correct method for beta3.
-Roland
On 23/12/10 09:54 AM, Ryan Novosielski wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 12/22/2010 05:43 PM, Tim McCloskey wrote:
The clientlaunch.cfg is in the client's etc dir, not the server etc dir. Logs / tmp files will be under the client dir too.
Example, on a hobbit server there are both $hobbithome/{server,client} dirs.
client/ext/na2.sh
[client/etc] tail clientlaunch.cfg
[NA2CPU] ENVFILE $HOBBITCLIENTHOME/etc/hobbitclient.cfg CMD $HOBBITCLIENTHOME/ext/na2.sh LOGFILE $HOBBITCLIENTHOME/logs/na2.log INTERVAL 2m
Yes, that much I knew. OK, so I've taken another look at this. It looks as if the external client scripts ARE running, but the data doesn't go anywhere and there are no ghost clients. I've also checked what I believe are all of the places that the port and server address are defined to make sure this isn't all going someplace else.
One of my external scripts, for example, is a vmio script. You can see it is running the commands needed to accomplish that:
xymon 4976 4973 0 17:50:09 ? 0:00 vmstat 300 2 xymon 4978 4975 0 17:50:09 ? 0:00 iostat -dxsrP 300 2
...however, about 6 months ago, these tests turned purple (to me, what seems like by magic). The other external scripts (one that gets temperature and one that does metastat for the SW raid) run too quickly for me to tell what their story is, but they do not write anything to the client log directory.
Anyone have any idea how to troubleshoot this?
- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0SgcAACgkQmb+gadEcsb4AMgCfcebR4VMSStbvrzA3JZpF6wzB 6DcAnA5yA1redutitZN8AYnOtldWY5lZ =wP+T -----END PGP SIGNATURE-----
To unsubscribe from the xymon list, send an e-mail toxymon-unsubscribe at xymon.com
To unsubscribe from the xymon list, send an e-mail to xymon-unsubscribe at xymon.com
participants (4)
-
novosirj@umdnj.edu
-
ralphmitchell@gmail.com
-
rolands@logicaltech.com.au
-
tm@freedom.com