Xymon Mailing List Archive search

XYMONNETWORK environment variable

6 messages in this thread

list Paul Root · Thu, 5 Jan 2012 11:09:03 -0600 ·
I'll looking at this to reduce a bit of complexity in my network since I have a couple of proxies (that also act as backup).

Is the XYMONNETWORK variable a single entry or could it be a list of logical networks for a proxy to serve?

My setup has 4 distinct networks and 2 proxies, plus a bunch of devmon boxes that may want to be separated as well.


Paul Root    - Engineer III
Managed Services Systems - CenturyLink


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 Paul Root · Thu, 5 Jan 2012 14:46:48 -0600 ·
So a follow up.

I'm guessing I need a new section for an additional xymonnet?

So I did this:

[xymonnet]
        ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
        NEEDS xymond
        CMD xymonnet --report --ping --checkresponse
        LOGFILE $XYMONSERVERLOGS/xymon-network.log
        INTERVAL 5m

[xymonnet2]
        ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
        NEEDS xymond
        CMD XYMONNETWORK=IAD xymonnet --report --ping --checkresponse
        LOGFILE $XYMONSERVERLOGS/xymon-network.log
        INTERVAL 5m

Is that right? And it's ok to use the same log file?

Should I have another xymonnetagain then too?

Paul Root    - Engineer III
Managed Services Systems - CenturyLink


From: Larry Barber [mailto:user-6ef9c2864140@xymon.invalid]
Sent: Thursday, January 05, 2012 11:23 AM
To: Root, Paul
Subject: Re: [Xymon] XYMONNETWORK environment variable

XYMONNETWORK is a single entity, but you can set up multiple xymonnet instance on a given server and use a different XYMONNETWORK for each one. Just invoke xymonnet like this in tasks.cfg : XYMONNETWORK=xxxxxx $XYMONSERVERHOME/bin/xymonnet ....

Thanks,
Larry Barber
quoted from Paul Root
On Thu, Jan 5, 2012 at 11:09 AM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote:
I'll looking at this to reduce a bit of complexity in my network since I have a couple of proxies (that also act as backup).

Is the XYMONNETWORK variable a single entry or could it be a list of logical networks for a proxy to serve?

My setup has 4 distinct networks and 2 proxies, plus a bunch of devmon boxes that may want to be separated as well.


Paul Root    - Engineer III
Managed Services Systems - CenturyLink


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.


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 Henrik Størner · Thu, 05 Jan 2012 21:48:58 +0100 ·
quoted from Paul Root
On 05-01-2012 18:09, Root, Paul wrote:
I'll looking at this to reduce a bit of complexity in my network since I have a couple of proxies (that also act as backup).

Is the XYMONNETWORK variable a single entry or could it be a list of logical networks for a proxy to serve?
XYMONNETWORK is not used by the proxy, only by the network test tool 
(xymonnet).


Regards,
Henrik
list Henrik Størner · Thu, 05 Jan 2012 21:52:11 +0100 ·
quoted from Paul Root
On 05-01-2012 21:46, Root, Paul wrote:
So a follow up.

I’m guessing I need a new section for an additional xymonnet?
Yes.
quoted from Paul Root
[xymonnet]
ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD xymonnet --report --ping --checkresponse
LOGFILE $XYMONSERVERLOGS/xymon-network.log
INTERVAL 5m

[xymonnet2]
ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD XYMONNETWORK=IAD xymonnet --report --ping --checkresponse
LOGFILE $XYMONSERVERLOGS/xymon-network.log
INTERVAL 5m

Is that right? And it’s ok to use the same log file?
Not quite right, because the CMD setting doesn't permit you to set environment variables that way (the command isn't passed to a shell, but executed directly). So the easiest thing to do is to have a shell-script "wrapper" around the xymonnet command, that sets the XYMONNET environment variable.
Should I have another xymonnetagain then too?
Good question - off the top of my head, I'd say "yes, you should".


Regards,
Henrik
list Paul Root · Thu, 5 Jan 2012 15:43:07 -0600 ·
Thanks!

Paul Root    - Engineer III
Managed Services Systems - CenturyLink

-----Original Message-----
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On
Behalf Of Henrik Størner
Sent: Thursday, January 05, 2012 2:52 PM
To: xymon at xymon.com
quoted from Henrik Størner
Subject: Re: [Xymon] XYMONNETWORK environment variable

On 05-01-2012 21:46, Root, Paul wrote:
So a follow up.

I'm guessing I need a new section for an additional xymonnet?
Yes.
[xymonnet]
ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD xymonnet --report --ping --checkresponse
LOGFILE $XYMONSERVERLOGS/xymon-network.log
INTERVAL 5m

[xymonnet2]
ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD XYMONNETWORK=IAD xymonnet --report --ping --checkresponse
LOGFILE $XYMONSERVERLOGS/xymon-network.log
INTERVAL 5m

Is that right? And it's ok to use the same log file?
Not quite right, because the CMD setting doesn't permit you to set
environment variables that way (the command isn't passed to a shell,
but

executed directly). So the easiest thing to do is to have a shell-
script
quoted from Paul Root
"wrapper" around the xymonnet command, that sets the XYMONNET
environment variable.
Should I have another xymonnetagain then too?
Good question - off the top of my head, I'd say "yes, you should".


Regards,
Henrik
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 Henrik Størner · Thu, 05 Jan 2012 23:14:31 +0100 ·
quoted from Paul Root
[xymonnet2]
ENVFILE /usr/lib64/xymon/server/etc/xymonserver.cfg
NEEDS xymond
CMD XYMONNETWORK=IAD xymonnet --report --ping --checkresponse
Not quite right, because the CMD setting doesn't permit you to set
environment variables that way (the command isn't passed to a shell,
but executed directly).
For the record, Larry Barber pointed out to me that I was wrong - you 
*can* use a syntax like this to set environment variables in the CMD line.

(I wrote the code, but that doesn't mean I know what it does - OK ?)


Regards,
Henrik