[Xymon] Xymon Powershell Windows client

zak.beck at accenture.com zak.beck at accenture.com
Wed Feb 18 10:35:19 CET 2015


Thanks for the mountpoint info, I'll need to look at this in some detail.
I'll put it on the todo list.

 

Zak

 

From: Gavin Stone-Tolcher [mailto:g.stone-tolcher at its.uq.edu.au] 
Sent: 18 February 2015 01:19
To: Beck, Zak; xymon-developer at lists.sourceforge.net; xymon at xymon.com
Subject: RE: Xymon Powershell Windows client

 

Many many thanks for the quick fix for multiple servers. V1.97 is working OK
now for me in this respect!

 

I still am not seeing a windows MountPoint on my test Win 7 32bit client in
the "disk" output with v1.97 and "wanteddisks" set to "3 4".

 

Quickly looking at the client's code, it appears that "Get-WmiObject -Class
Win32_LogicalDisk" is used to collect disk info?

Several google clicks later, various sites seem to suggest windows
MountPoint info is not really available using that class?

e.g.

http://learn-powershell.net/2012/08/10/locating-mount-points-using-powershel
l/

 

Another good site with code examples suggests using the "Win32_Volume" class
to collect the info

http://blogs.lessthandot.com/index.php/sysadmins/os/windows/getting-remote-m
ount-point-information/

 

While yet another site seems to be using the "Win32_MountPoint" class in his
code to get MountPoint info from what I can see:

http://www.powershelladmin.com/wiki/PowerShell_Get-MountPointData_Cmdlet#Sho
wing_Used.2FFree_Space_On_Mount_Points

 

I tried looking at the C++ code of winbb client but I'm afraid I can't make
much sense of it.

 

I am wondering if the "disk" code in the powershell client might need some
tweaks to collect MountPoint info?

 

 

Cheers,

Gavin Stone-Tolcher, IT Support Officer, Network Operations and Incident
Response

Information Technology Services

The University of Queensland

Level 4, Prentice Building, St Lucia 4072

T: +61 7 334 66645, M: +61 401 140 838

E:  <mailto:g.stone-tolcher at its.uq.edu.au> g.stone-tolcher at its.uq.edu.au W:
<http://www.its.uq.edu.au> www.its.uq.edu.au

 

ITS: Service. Team. Accountability. Results.

 

IMPORTANT: This email and any attachments are intended solely for the
addressee(s), contain copyright material and are confidential. We do not
waive any legal privilege or rights in respect of copyright or
confidentiality. Except as intended addressees are otherwise permitted, you
do not have permission to use, disclose, reproduce or communicate any part
of this email or its attachments. Statements, opinions and information not
related to the official business of The University of Queensland are neither
given nor endorsed by us. By using this email (including accessing any
attachments or links) you agree we are not liable for any loss or damage of
any kind arising in connection with any electronic defect, virus or other
malicious code we did not intentionally include.

 

Please consider the environment before printing this email.

 

CRICOS Code 00025B

 

From: zak.beck at accenture.com <mailto:zak.beck at accenture.com>
[mailto:zak.beck at accenture.com] 
Sent: Tuesday, 17 February 2015 9:00 PM
To: Gavin Stone-Tolcher; xymon-developer at lists.sourceforge.net
<mailto:xymon-developer at lists.sourceforge.net> ; xymon at xymon.com
<mailto:xymon at xymon.com> 
Subject: RE: Xymon Powershell Windows client

 

Hi

 

Thanks for the bug report - I've committed a patch which should fix the
multiple servers issue, please try it.

 

There should be a single <servers> element in your config, containing the
list of servers, space delimited:

 

<servers>server1.domain.com server2.domain.com</servers>

 

Re: mountpoints, if you add this to your XML config, you will get
mountpoints.

 

  <wanteddisks>3 4</wanteddisks>

 

By default, wanteddisks = 3 - possible settings below, and you can combine
settings with spaces:

 

2=USB

3=Local disks

4=Network shares

5=CD

 

But you will need the latest patch with the config fix for this to work
properly.

 

Regards, 

Zak 

 

From: Gavin Stone-Tolcher [mailto:g.stone-tolcher at its.uq.edu.au] 
Sent: 17 February 2015 00:09
To: Beck, Zak; xymon-developer at lists.sourceforge.net
<mailto:xymon-developer at lists.sourceforge.net> ; xymon at xymon.com
<mailto:xymon at xymon.com> 
Subject: RE: Xymon Powershell Windows client

 

Just a quick FYI:

 

I was just trying a test install on a 32bit windows 7 client and got this:

 

Cannot set "servers" because only strings can be used as values to set
XmlNode p

At C:\Program Files\xymon\xymonclient.ps1:644 char:26

+             $script:XymonSettings. <<<< servers =
$script:XymonSettings.server

    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException

    + FullyQualifiedErrorId : PropertyAssignmentException

 

I had multiple IP in the <servers> etry in the config.

Changing the <servers> entry in xymonclient_config.xml to have a single
entry rather than multiple whitespace entries allows the client to install
with no error.

 

After installation adding a second IP to <servers> entry also does not seem
to work with it just reporting to the first entry?

 

Also just another quick one, I have a mountpoint defined on this system that
does not seem to be collected. Are mountpoints supported?

I re-ran the bbwin client on the same system and the mountpoint is detected
and displayed.

 

 

Cheers,

Gavin Stone-Tolcher, IT Support Officer, Network Operations and Incident
Response

Information Technology Services

The University of Queensland

Level 4, Prentice Building, St Lucia 4072

T: +61 7 334 66645, M: +61 401 140 838

E:  <mailto:g.stone-tolcher at its.uq.edu.au> g.stone-tolcher at its.uq.edu.au W:
<http://www.its.uq.edu.au> www.its.uq.edu.au

 

ITS: Service. Team. Accountability. Results.

 

IMPORTANT: This email and any attachments are intended solely for the
addressee(s), contain copyright material and are confidential. We do not
waive any legal privilege or rights in respect of copyright or
confidentiality. Except as intended addressees are otherwise permitted, you
do not have permission to use, disclose, reproduce or communicate any part
of this email or its attachments. Statements, opinions and information not
related to the official business of The University of Queensland are neither
given nor endorsed by us. By using this email (including accessing any
attachments or links) you agree we are not liable for any loss or damage of
any kind arising in connection with any electronic defect, virus or other
malicious code we did not intentionally include.

 

Please consider the environment before printing this email.

 

CRICOS Code 00025B

 

From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of
zak.beck at accenture.com <mailto:zak.beck at accenture.com> 
Sent: Friday, 13 February 2015 7:53 PM
To: xymon-developer at lists.sourceforge.net
<mailto:xymon-developer at lists.sourceforge.net> ; xymon at xymon.com
<mailto:xymon at xymon.com> 
Subject: [Xymon] Xymon Powershell Windows client

 

Hi all,

 

Today I have uploaded a new version of the Xymon Powershell client to SVN
(in sandbox/WinPSClient). We (Accenture) are very pleased to be contributing
these changes to the open source community. I've been working on this now
for around 8 months on and off and hopefully the changes made will be of
benefit to everyone!

 

Whilst making changes, we have focussed mainly on making it work, improving
reliability and most importantly improving performance.

 

In most cases, on our 64 bit OS virtual machines, a data collection now
takes around 5 seconds. On heavily loaded (CPU load or event log load)
servers, the script is now considerably faster than originally. Key to this
has been reducing the amount of WMI usage as this was a major culprit. 

 

We have also implemented some new features, largely based on our in-house
requirements but hopefully useful to others:

 

*         Showing the process owner and command line in [procs]. This has
been implemented using c# code, compiled at runtime.

*         Adding Active Directory replication test, Terminal Services
sessions test

*         Ability to restart any stopped Windows service

*         Client self-update

*         Dirsize and dirtime checks (which were originally external
scripts)

 

Some things have changed slightly; for example, the local configuration
which was registry-based is now XML-based (you can still use registry
settings if you prefer).  In the SVN repository I have also uploaded a Word
document which describes how to install and the configuration options.

 

I have uploaded all the revisions we have made to SVN so there is a history
of development. Whilst we will endeavour to continue contributing changes
and improvements in coming months, this is an open source project and as
such we are not offering any formal support. If anyone wishes to bugfix,
branch or whatever, please do so!

Zak Beck
Accenture

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20150218/eb923b81/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/20150218/eb923b81/attachment.bin>


More information about the Xymon mailing list