Xymon Mailing List Archive search

ascertaining the xymon server used

4 messages in this thread

list Ian Diddams · Mon, 17 Feb 2020 10:06:21 +0000 (UTC) ·
scenario:? multiple xymon clients across several environments and linux OS. An unrelated script (ir not xymon related) run as root user, however does need to ascertain the xymon server IP for various system checks.

Is there any "easy" or "simple" manner than can be scripted to ascertain this?? Without some really convuluted logic checking various configuration files that appear to (environment , OS etc dependent) to be in various places ie not always ~xymon/client/etc/xymonclient.cfg, which may then use an include on eg /etc/sysconfig/xymon-client... 

thoughts?
ian
list Paul Root · Mon, 17 Feb 2020 15:11:12 +0000 ·
So are you asking, ?How do I find the IP address of the Xymon server without having to look for the xymonclient.cfg file (or any files it includes)?? With the reason that that file can be in multiple places due to differences in packaging of the Xymon client application.

The answer is to run your script from inside the xymoncmd executable.
quoted from Ian Diddams

From: Ian Diddams <user-7fbf34ed5219@xymon.invalid>
Sent: Monday, February 17, 2020 4:06 AM
To: xymon at xymon.com
Subject: ascertaining the xymon server used

scenario:  multiple xymon clients across several environments and linux OS. An unrelated script (ir not xymon related) run as root user, however does need to ascertain the xymon server IP for various system checks.
Is there any "easy" or "simple" manner than can be scripted to ascertain this?  Without some really convuluted logic checking various configuration files that appear to (environment , OS etc dependent) to be in various places ie not always ~xymon/client/etc/xymonclient.cfg, which may then use an include on eg /etc/sysconfig/xymon-client...
thoughts?

ian

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Ron Cohen · Mon, 17 Feb 2020 16:33:15 +0000 ·
... or add a CNAME e.g. xymon to your DNS.
quoted from Paul Root


On 17/02/2020 15:11, Root, Paul T wrote:
So are you asking, ?How do I find the IP address of the Xymon server without having to look for the xymonclient.cfg file (or any files it includes)?? With the reason that that file can be in multiple places due to differences in packaging of the Xymon client application.

The answer is to run your script from inside the xymoncmd executable.

*From:*Ian Diddams <user-7fbf34ed5219@xymon.invalid>
quoted from Paul Root
*Sent:* Monday, February 17, 2020 4:06 AM
*To:* xymon at xymon.com
*Subject:* ascertaining the xymon server used

scenario:? multiple xymon clients across several environments and linux OS. An unrelated script (ir not xymon related) run as root user, however does need to ascertain the xymon server IP for various system checks.

Is there any "easy" or "simple" manner than can be scripted to ascertain this? Without some really convuluted logic checking various configuration files that appear to (environment , OS etc dependent) to be in various places ie not always ~xymon/client/etc/xymonclient.cfg, which may then use an include on eg /etc/sysconfig/xymon-client...

thoughts?

ian

This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.
list Stef Coene · Mon, 17 Feb 2020 19:16:41 +0100 ·
This works for me (all on 1 line):

echo "echo \$XYMSRV" | `ps -e -o args | grep xymonlaunch | awk '{print $1}' | grep -v grep | grep -v sed | grep -v server | sed 's/xymonlaunch/xymoncmd/g'`


Stef
quoted from Ian Diddams

On 2020-02-17 11:06, Ian Diddams via Xymon wrote:
scenario: multiple xymon clients across several environments and linux OS. An unrelated script (ir not xymon related) run as root user, however does need to ascertain the xymon server IP for various system checks.

Is there any "easy" or "simple" manner than can be scripted to ascertain this?? Without some really convuluted logic checking various configuration files that appear to (environment , OS etc dependent) to be in various places ie not always ~xymon/client/etc/xymonclient.cfg, which may then use an include on eg /etc/sysconfig/xymon-client...

thoughts?

ian