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
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.
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
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.
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