[Xymon] Xymon PowerShell Windows client

zak.beck at accenture.com zak.beck at accenture.com
Wed Mar 4 09:48:26 CET 2015


Hi

 

Unfortunately, you can't fake the BBWin identifier for just one section – you have to change the client to report in as BBwin. It was changed so that we could experimentally use separate configuration options for BBWin clients and Powershell clients.

 

To change how the client reports itself, change line 2746 in the current commit:

 

2745    WriteLog "Performing main and optional tests and building output..."

2746    $clout = "client " + $clientname + ".powershell powershell XymonPS" | Out-String

2747    $clsecs = XymonClientSections | Out-String

 

In the original Powershell client, this line was:

 

                $clout = "client " + $clientname + ".bbwin win32" | Out-String

 

So you can see we've changed '.bbwin' to '.powershell' and 'win32' to 'powershell'.

 

I appreciate this isn't very good and should probably be a configuration item.

 

[netstat] uses the output from netstat -s, but it appears the parsing is not very clever. [ifstat] uses a .Net object to pull out interface information. I haven't changed the code that generates either of these sections – quite likely it needs some work! I'll add it to the list.

Zak 

 

From: Jeremy Laidman [mailto:jlaidman at rebel-it.com.au] 
Sent: 04 March 2015 06:24
To: Brandon Dale
Cc: Beck, Zak; xymon at xymon.com
Subject: Re: [Xymon] Xymon PowerShell Windows client

 

On 4 March 2015 at 13:26, Brandon Dale <BDale at kitchengroup.com.au <mailto:BDale at kitchengroup.com.au> > wrote:

3.       On a windows machine running PowerShell client v1.98 I don’t get any network related graphs however I seem to have data available:

a.       [ifstat] contains data e.g 

 

[ifstat]
fe80::25a5:b99d:55cd:951f%12 2655878237 519887923
10.250.100.163 2655878237 519887923

 

Yep, this should be parseable by Xymon.  In principle.

 

At the moment I’m guessing the ifstat data isn’t in a format xymon will automatically graph and add to the trends page 

 

Xymon will parse the [ifstat] data from a Windows machine, if it's in a suitable format.  From the source code, the regexp for this is:

 

        ^([a-zA-Z0-9.:]+)\s+([0-9]+)\s+([0-9]+)

 

I note that in the first [ifstat] line above, there's a percentage sign in the first token, which doesn't match the regexp.  I don't know of Xymon continues on looking for other lines to match, or if it rejects the whole [ifstat] section as corrupt.  But I wonder what would happen if the IPv6 address wasn't in the [ifstat] client data.  Any chance you can unbind IPv6 for testing?

 

Another thing to note is that some of the "powershell" processing in Xymon just re-uses the "bbwin" processing.  But there are some bits of parsing code, including for "ifstat" it seems, that only look for the bbwin OS string, and I can't see any place in the powershell handling code that tries to fake the bbwin OS for ifstat.  In other words, could be that the code simply isn't there to do what you want.  But it might also be the case that adjusting the powershell client to report itself as the bbwin client might do the trick.

 

J

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150304/dd5372f6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6831 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150304/dd5372f6/attachment.bin>


More information about the Xymon mailing list