[Xymon] XymonD --merge-clientlocal issues

Richard L. Hamilton rlhamil2 at gmail.com
Wed Oct 17 21:36:05 CEST 2018


FYI, on Unix/Linux, if all the processes in question are indeed stopped, the only way (short of a special driver) I know of that a setting in memory could persist (until reboot, of course) is with a System V shared memory segment.  Those are created by processes, but persist until reboot, unless deleted by a process with the appropriate privileges.  The command

ipcs -m

will list those.

Here's some output from one of my Linux VM's:
[root at bigapple-centos ~]# ps -fuxymon
UID        PID  PPID  C STIME TTY          TIME CMD
xymon     1478     1  0 15:20 ?        00:00:00 /home/xymon/client/bin/xymonlaunch --config=/home/xymon/client/etc

That shows that xymon is running.

[root at bigapple-centos ~]# ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      


That shows no System V style shared memory segments in use.  Even if there were some, unless they showed the owner the same as that of the xymon process (xymon, in this case), they'd probably be associated with something else.  Doesn't look to me like a normal basic xymon installation uses SysV shared memory at all.

The "key" would be a hex number, supplied by the requestor (think of it as a name, but a separate namespace from pathnames).  The "shmid" would be a system-assigned number.  Processes wishing to access the same segment would have to have agreed on the same key, and have suitable permissions (either those of the creating process, or wider permission that it granted).  There are other facilities shown by ipcs (semaphores and message queues; see the man page for more info).  If one really needed to clean any of those up, there's an "ipcrm" command (again, see man page).  I wouldn't do that unless I was sure I knew what I was doing. :-)

> On Oct 17, 2018, at 14:46, Timothy Williams <tlwilliams4 at vcu.edu> wrote:
> 
> I meant the machine/OS, as some settings are kept in memory and I didn't know (I'm a Windows guy) if restarting the Xymon application by xymonlaunch -restart would have refreshed the memory settings.
> 
> However, the Linux manager looked at it and found the issue as missing a slash / at the end of the previous parameter to wrap the line. It never saw the new parameter.
> It's now working as designed.
> 
> On Tue, Oct 16, 2018 at 11:49 PM Galen Johnson <solitaryr at gmail.com <mailto:solitaryr at gmail.com>> wrote:
> By "whole server" I assume you just mean restarting the xymon server (app, not machine)?  I usually restart the server but that's because I'm impatient and want immediate gratification for those types of changes.  As far as I recall, that shouldn't be required.  It also shouldn't hurt to do so since it restarts fairly quickly (at least for my small environment).
> 
> =G=
> 
> On Tue, Oct 16, 2018 at 3:29 PM Timothy Williams <tlwilliams4 at vcu.edu <mailto:tlwilliams4 at vcu.edu>> wrote:
> The [name] section lines are working OK; I am not trying to use regex, just specific hosts to merge with [powershell] defaults. 
> 
> We are testing by restarting the xymon services, any off chance it needs a whole server reboot?
> 
> 
> On Tue, Oct 16, 2018 at 3:21 PM Galen Johnson <solitaryr at gmail.com <mailto:solitaryr at gmail.com>> wrote:
> From the client-local.cfg man page:
> 
> FILE FORMAT
> The  file is divided into sections, delimited by "[name]" lines.  A section name can be either an operating system identifier - linux, solaris, hp-ux, aix, freebsd, openbsd, netbsd, darwin - a class, or a hostname. When deciding which section to send to a client, Xymon will  first  look for  a section named after the hostname of the client; if such a section does not exist, it will look for a section named by the operating system of the client. So you can configure special configurations for individual hosts, and have a default configuration for all other hosts of a certain type.
> 
> It will often be practical to use regular expressions for hostnames.  To do this you must use
> 
>            [host=<expression>]
> 
> where <expression> is a Perl-compatible regular expression. The same kind of matching can be done on operating system or host class, using
> 
>            [os=<expresssion>]
>            [class=<expression>]
> 
> Apart from the section delimiter, the file format is free-form, or rather it is defined by the tools that make use of the configuration.
> 
> 
> I just went through this recently so it was fresh in my mind :-).
> 
> =G=
> 
> On Tue, Oct 16, 2018 at 1:50 PM Thomas Eckert <thomas.eckert at it-eckert.de <mailto:thomas.eckert at it-eckert.de>> wrote:
> That's what works for me. I remember that the correct syntax, in particular with regexes, is slightly different across the config files.
> 
> On Oct 16, 2018 19:39, Timothy Williams <tlwilliams4 at vcu.edu <mailto:tlwilliams4 at vcu.edu>> wrote:
> Yes, that's right about tasks.cfg. It had other start parameters, and have added the merge.
> 
> Do you think that it needs [host=server1] rather than just [server1]?
> 
> Tim
> 
> On Tue, Oct 16, 2018 at 1:30 PM Thomas Eckert <thomas.eckert at it-eckert.de <mailto:thomas.eckert at it-eckert.de>> wrote:
> Hi Tim,
> 
> for future readers: There is an error in the man page `xymond(8)`: `--merge-clientconfig` in `xymond(8)` is **wrong**. The option `--merge-clientlocal` documented in `client-local.cfg(5)` is correct.
> You added this in `tasks.cfg` to the launch of `xymond`, right?
> 
> I have this running successfully in a Linux-environment with host-specific (`[host=%www.*]`) and class (`[linux]`)-sections and the sections merge fine.
> 
> Cheers
> Thomas
> On 16 Oct 2018, at 17:40, Timothy Williams <tlwilliams4 at vcu.edu <mailto:tlwilliams4 at vcu.edu>> wrote:
> 
> We have set up a new 4.3.28 xymon server, and will be migrating hosts to it in the next few weeks. On it I would like to start to use the --merge-clientlocal command. In testing, Windows powershell clients pick up either the individual host section OR the powershell section, it does not merge. Are there subtleties not in the man-pages that people have found to get it to work? (note that the xymond man-page states to use --merge-clientconfig, but that doesn't work either)
> 
> Could it be the section/host headings, or order? I have:
> 
> [server1]
> file:somefile
> 
> [server2]
> file:different file
> 
> [os=powershell] (also tried [class=powershell] and [powershell] alone)
> xymonlogsend
> clientversion:2.28:http://url <http://url/>
> Thanks,
> Tim Williams
> 
> 
> 
> _______________________________________________
> 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 <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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20181017/efde98bc/attachment.html>


More information about the Xymon mailing list