[Xymon] windows powershell client
David Baldwin
david.baldwin at ausport.gov.au
Thu Apr 7 05:06:49 CEST 2011
David,
> Still get the error in powershell, but xymon receive info anyway.
> So, I see we can get xymonconfig.cfg in %temp% folder. This file is
> empty. How can I set some feature like bbwin.
> I would like to monitor some services and other external scripts like
> bbwin does.
>
As I mentioned in my earlier e-mail, the PowerShell does not run
external scripts at present, so you will need to use BBWin or set up
Scheduled tasks if you want to use the PowerShell client for xymon
client reports.
I think I can piece together what you tried to do from the exception
reports below.
PS C:\xymon> . .\xymonsend.ps1
PS C:\xymon> xymonsend "ping" "xymonhost"
Is your xymon server called "xymonhost"? If not, that is the problem.
Substitute its real name.
I've updated the README.txt and the code to better handle the case of
using a name which does not lookup to an IP address.
PS C:\Xymon> XymonSend ping xymonhost
XymonSend : No IP addresses could be found for host: xymonhost
At line:1 char:10
+ XymonSend <<<< ping xymonhost
+ CategoryInfo : InvalidData: (:) [Write-Error],
WriteErrorException
+ FullyQualifiedErrorId :
Microsoft.PowerShell.Commands.WriteErrorException,XymonSend
David.
> Thx.
>
> David Raymond
>
> -----Original Message-----
> From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf
> Of Raymond, David
> Sent: Wednesday, April 06, 2011 10:23
> Cc: xymon at xymon.com
> Subject: Re: [Xymon] windows powershell client
>
> I try this new client, but I get error. I have try IP address and dns
> name entry, same result.
> Try it on windows 7 x64.
>
> Exception calling "GetHostAddresses" with "1" argument(s): "No such host
> is known"
> At C:\Xymon\xymonsend.ps1:10 char:65
> + $srvIPs = $srvparams[0] | %{[system.net.dns]::GetHostAddresses
> <<<< ($_)} | %{ $_.IPAddressToString}
> + CategoryInfo : NotSpecified: (:) [],
> MethodInvocationException
> + FullyQualifiedErrorId : DotNetMethodException
>
> XymonSend : Cannot connect to host xymonhost () :
> System.Management.Automation.MethodInvocationException: Exception cal
> ling "Connect" with "2" argument(s): "Value cannot be null.
> Parameter name: addresses" ---> System.ArgumentNullException: Value
> cannot be null.
> Parameter name: addresses
> at System.Net.Sockets.Socket.Connect(IPAddress[] addresses, Int32
> port)
> at System.Net.Sockets.TcpClient.Connect(IPAddress[] ipAddresses,
> Int32 port)
> at Connect(Object , Object[] )
> at
> System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object
> target, Object[] arguments, MethodInforma
> tion methodInformation, Object[] originalArguments)
> --- End of inner exception stack trace ---
> at
> System.Management.Automation.DotNetAdapter.AuxiliaryMethodInvoke(Object
> target, Object[] arguments, MethodInforma
> tion methodInformation, Object[] originalArguments)
> at System.Management.Automation.ParserOps.CallMethod(Token token,
> Object target, String methodName, Object[] paramAr
> ray, Boolean callStatic, Object valueToSet)
> at System.Management.Automation.MethodCallNode.InvokeMethod(Object
> target, Object[] arguments, Object value)
> at System.Management.Automation.MethodCallNode.Execute(Array input,
> Pipe outputPipe, ExecutionContext context)
> at System.Management.Automation.ParseTreeNode.Execute(Array input,
> Pipe outputPipe, ArrayList& resultList, Execution
> Context context)
> at
> System.Management.Automation.StatementListNode.ExecuteStatement(ParseTre
> eNode statement, Array input, Pipe output
> Pipe, ArrayList& resultList, ExecutionContext context)
> At line:1 char:11
> + xymonsend <<<< "ping" "xymonhost"
> + CategoryInfo : OpenError: (:) [Write-Error],
> WriteErrorException
> + FullyQualifiedErrorId :
> Microsoft.PowerShell.Commands.WriteErrorException,XymonSend
>
> David Raymond-----Original Message-----
> From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf
> Of David Baldwin
> Sent: Thursday, March 31, 2011 0:17
> To: Tom Georgoulias
> Cc: xymon at xymon.com
> Subject: Re: [Xymon] windows powershell client
>
> Tom,
>> What's the status of the powershell windows client? I have a few
>> windows servers that need to be monitored and thought I'd try the
>> power shell client instead of BBWin, if the shell client is ready.
> The following is still the state of play:
> http://lists.xymon.com/oldarchive/2011/01/msg00244.html
>
> On the only Windows host where I need to run external scripts, I am
> running XymonPSClient as the client and BBWin with everything else
> turned off except externals to run those scripts.
>
> David.
>
> --
> David Baldwin - IT Unit
> Australian Sports Commission www.ausport.gov.au
> Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
> david.baldwin at ausport.gov.au Leverrier Street Bruce ACT 2617
>
>
> ------------------------------------------------------------------------
> -------------
> Keep up to date with what's happening in Australian sport visit
> http://www.ausport.gov.au
>
> This message is intended for the addressee named and may contain
> confidential and privileged information. If you are not the intended
> recipient please note that any form of distribution, copying or use of
> this communication or the information in it is strictly prohibited and
> may be unlawful. If you receive this message in error, please delete it
> and notify the sender.
> ------------------------------------------------------------------------
> -------------
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon
--
David Baldwin - IT Unit
Australian Sports Commission www.ausport.gov.au
Tel 02 62147830 Fax 02 62141830 PO Box 176 Belconnen ACT 2616
david.baldwin at ausport.gov.au Leverrier Street Bruce ACT 2617
More information about the Xymon
mailing list