[Xymon] Xymon Powershell Client Problems
Ribeiro, Glauber
glauber.ribeiro at experian.com
Thu Sep 25 22:12:14 CEST 2014
I've seen most of those, and reported them to the maintainer, but I hadn't seen the "Critical" one.
#1 is because of that string introduced by a version control system. I just edit it do get rid of, or quote, the "$"s.
Setting up the host name doesn't work. I think I figured out why, and I posted it in this list a few weeks ago. I'd need to search for the email - I believe the wrong default variable is used. I work around the host name issues using an alias on the server, in hosts.cfg.
There was an issue with large disks reporting free space incorrectly because of using signed 32-bit ints. I think that's been fixed.
Even though it's not perfect yet, I still use this one instead of BBWin, because BBWin is also buggy and not really maintained. At least the Powershell version I can fix myself. :-)
glauber
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Brandon Dale
Sent: Thursday, September 25, 2014 01:44
To: xymon at xymon.com
Subject: [Xymon] Xymon Powershell Client Problems
I have been testing the XymonPSClient for windows found a few problems I was hoping someone could help with, I set this up on a few machines running 2008r2 and 2012r2
1. Tried to install on Server 2012 R2 running powershell version 4, got this error:
PS C:\xymon> .\xymonclient.ps1 install
At C:\xymon\xymonclient.ps1:28 char:24
+ $XymonClientVersion = "$Id: xymonclient.ps1 7348 2014-01-15 05:13:48Z dbaldwin $ ...
+ ~~~~
Variable reference is not valid. ':' was not followed by a valid variable name character. Consider using ${} to
delimit the name.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : InvalidVariableReferenceWithDrive
I edited xymonclient.ps1 and just removed the ":" character and that seems to make it work.
2. setting clientfqdn 0 doesn't stop it appending the fqdn, to get this to work I have to manually set the hostname without the fqdn on this line and uncomment the line:
# $clientname = "winxptest" # Define this to override the default client hostname
Here is an example of my config
PS C:\xymon> .\xymonclient.ps1 config
XymonPSClient config:
servers : kgxymon01
clientconfigfile : C:\xymon\xymonconfig.cfg
clientlogfile : C:\xymon\xymonclient.log
clientname : test05
clientfqdn : 0
loginterval : 60
name : test05
loopinterval : 60
reportevt : 1
Settable Params and values:
clientbbwinmembug=1
clientconfigfile=C:\xymon\xymonconfig.cfg
clientfqdn=0
clientlogfile=C:\xymon\xymonclient.log
clientlower=1
clientname=test05
clientremotecfgexec=0
loginterval=60
loopinterval=60
maxlogage=60
name=test05
reportevt=1
servers=kgxymon01
slowscanrate=72
wanteddisks=3
wantedlogs=Application System Security
and here is part of the contents of c:\xymon\xymonclient.log the fqdn is still added.
clientname
test05.mydomain.local
[XymonPSClientInfo]
Id : 2212
Handles : 442
CPU : 24.640625
Name : powershell
3. Can't filter out events, the settings from client-local.cfg on the xymon server are successfully copied to c:\xymon\xymonconfig.cfg with the filter rules I had setup for BBwin which work. For example
eventlog:application:10240
ignore This is a test
I would expect this to ignore any event where the message is "This is a test" this works in BBwin, with the powershell client the event will still appear in the msgs column, as far as I can these filters don't work at all with the PowerShell client but I may be doing it wrong.
4. In xymonclient.ps1 for function XymonMsgs it has the following:
Get-EventLog -ErrorAction:SilentlyContinue -LogName $log.Log -asBaseObject -After $since | where {$_.EntryType -match "Error|Warning"}
This is missing "Critical" level, after a quick google it seems like get-eventlog might not support retrieving critical level events, does this mean the powershell client will never report on critical events?
Brandon Dale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140925/de95ceb8/attachment.html>
More information about the Xymon
mailing list