Windows Xymon PS Client 1.98
Hi
I've just committed version 1.98 to the project repository - http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/.
This update has a number of fixes and additions thanks to the suggestions and reaction to the previous patches, thanks to Gavin, Brandon and others for your feedback.
List of changes:
Mount points are now shown in the disk section, similar to BBWin.The drive label has been added and the column alignment adjusted to suit drives up to 999TB.
The eventlogswanted directive now supports wildcards in the listof event logs field. So you can now return all event logs like this:
eventlogswanted:*:250000
field to specify which levels of event should be returned - critical, error, warning, information, verbose. By default, all are returned. Values in the field should be comma-delimited, e.g.:The eventlogswanted directive also supports an optional fourth
eventlogswanted:*:250000:error,warning,critical
The dirsize directive now works for files as well as directories.
Thanks to everyone, I really appreciate your feedback.
Regards
Zak
I've just committed version 1.98 to the project repository
Great work Zak! Good to see all this improvement so soon.
I see you are still using something like:
[uint32]$diskusedKB = (uint32) - (uint32) # PS ver 1 doesnt support subtraction uint64's However, there was a report, see attached, about an integer overflow on large filesystems using this, seemingly fixed by removing the [uint32] casts on those lines.
As only PS 1 appears to have that issue, I handled this in my own local mod (reverted to 1.98 now), by simplistically checking the Powershell version before performing the calculation:
if (($PSVersionTable.PSVersion.Major) -gt 1 ) {
$diskusedKB = ($d.Capacity/1KB) - ($d.FreeSpace/1KB)
$disksizeKB = ($d.Capacity/1KB)
}
else {
[uint32]$diskusedKB = ([uint32]($d.Capacity/1KB)) - ([uint32]($d.FreeSpace/1KB)) # PS ver 1 doesnt support subtraction uint64's
[uint32]$disksizeKB = [uint32]($d.Capacity/1KB)
}
Maybe you could do something similar, or think of a better approach?
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: g.stone-tolcher at its.uq.edu.au<mailto:g.stone-tolcher at its.uq.edu.au> W: www.its.uq.edu.au<http://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 Sent: Tuesday, 24 February 2015 11:07 PM To: xymon at xymon.com Subject: [Xymon] Windows Xymon PS Client 1.98
Hi
I've just committed version 1.98 to the project repository - http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/.
This update has a number of fixes and additions thanks to the suggestions and reaction to the previous patches, thanks to Gavin, Brandon and others for your feedback.
List of changes:
Mount points are now shown in the disk section, similar to BBWin. The drive label has been added and the column alignment adjusted to suit drives up to 999TB.The eventlogswanted directive now supports wildcards in the list of event logs field. So you can now return all event logs like this:
eventlogswanted:*:250000
The eventlogswanted directive also supports an optional fourth field to specify which levels of event should be returned - critical, error, warning, information, verbose. By default, all are returned. Values in the field should be comma-delimited, e.g.:
eventlogswanted:*:250000:error,warning,critical
The dirsize directive now works for files as well as directories.
Thanks to everyone, I really appreciate your feedback.
Regards Zak
Oh, I forgot to mention I had a failure during the attempt to auto update the client from a share:
2015-02-25 10:31:59 Executing XymonCheckUpdate 2015-02-25 10:31:59 Running version 1.97; config version 1.98; attempting upgrade 2015-02-25 10:32:00 New version \\GST\WinPSClient\xymonclient_xymonclient_1.98.ps1.ps1 cannot be found - aborting upgrade 2015-02-25 10:32:00 Delaying until next run: 30 seconds
The share is just a local share on the test machine running the client with read access to everyone. Manually mounting \\GST\WinPSClient\<file:///\\GST\WinPSClient\> on the machine:
C:\Users\ccgavin>net use U: \\GST\WinPSClient The command completed successfully.
C:\Users\ccgavin>dir U:
Volume in drive U is SYSTEM
Volume Serial Number is E0FB-17E1
Directory of U:\
25/02/2015 09:58 AM <DIR> . 25/02/2015 09:58 AM <DIR> .. 25/02/2015 09:55 AM 100,532 xymonclient_1.98.ps1 1 File(s) 100,532 bytes 2 Dir(s) 64,899,543,040 bytes free
Am I doing something wrong?
I have manually put the new version in place for now.
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: g.stone-tolcher at its.uq.edu.au<mailto:g.stone-tolcher at its.uq.edu.au> W: www.its.uq.edu.au<http://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 Sent: Tuesday, 24 February 2015 11:07 PM To: xymon at xymon.com Subject: [Xymon] Windows Xymon PS Client 1.98
Hi
I've just committed version 1.98 to the project repository - http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/.
This update has a number of fixes and additions thanks to the suggestions and reaction to the previous patches, thanks to Gavin, Brandon and others for your feedback.
List of changes:
Mount points are now shown in the disk section, similar to BBWin. The drive label has been added and the column alignment adjusted to suit drives up to 999TB.The eventlogswanted directive now supports wildcards in the list of event logs field. So you can now return all event logs like this:
eventlogswanted:*:250000
The eventlogswanted directive also supports an optional fourth field to specify which levels of event should be returned - critical, error, warning, information, verbose. By default, all are returned. Values in the field should be comma-delimited, e.g.:
eventlogswanted:*:250000:error,warning,critical
The dirsize directive now works for files as well as directories.
Thanks to everyone, I really appreciate your feedback.
Regards Zak
I haven't used this before but I just tested and had the same problem.
I had this in my clientconfigfile clientversion:1.98:\\testserver01\test\
It looks like its inserting the file name into the path rather than just the version number.
Regards,
Brandon Dale Network Administrator
Kitchen | Group
1 Wella Way Somersby, NSW, 2250 T (02) 4343 6000 | D (02) 4343 6052 | F (02) 4343 6080 E BDale at kitchengroup.com.au<mailto:%20BDale at kitchengroup.com.au> [cid:image001.jpg at 01D050FC.497A8010] please consider the environment before printing this e-mail
Disclaimer: This communication is confidential and intended only for the addressee. It may contain legally privileged information. By the use of email over the Internet, Kitchen Group is not waiving either confidentiality of, or legal privilege in, the contents of this email and any attachments. If you are not the addressee you may not use, disseminate or copy this information. If you have received this information in error please notify us immediately. Whilst we have taken all reasonable care to ensure that neither our system, this email nor any attachments has a virus, it is impossible to guard against every possible virus. We advise you to scan the email and any attachments with your anti virus software prior to use. We do not accept liability for any loss or damage which may arise from receipt of this email or any attachments.
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Gavin Stone-Tolcher Sent: Wednesday, 25 February 2015 11:44 AM To: 'zak.beck at accenture.com'; xymon at xymon.com Subject: Re: [Xymon] Windows Xymon PS Client 1.98
Oh, I forgot to mention I had a failure during the attempt to auto update the client from a share:
2015-02-25 10:31:59 Executing XymonCheckUpdate 2015-02-25 10:31:59 Running version 1.97; config version 1.98; attempting upgrade 2015-02-25 10:32:00 New version \\GST\WinPSClient\xymonclient_xymonclient_1.98.ps1.ps1<file:///\\GST\WinPSClient\xymonclient_xymonclient_1.98.ps1.ps1> cannot be found - aborting upgrade 2015-02-25 10:32:00 Delaying until next run: 30 seconds
The share is just a local share on the test machine running the client with read access to everyone. Manually mounting \\GST\WinPSClient\<file:///\\GST\WinPSClient\> on the machine:
C:\Users\ccgavin>net use U: \\GST\WinPSClient<file:///\\GST\WinPSClient> The command completed successfully.
C:\Users\ccgavin>dir U:
Volume in drive U is SYSTEM
Volume Serial Number is E0FB-17E1
Directory of U:\
25/02/2015 09:58 AM <DIR> . 25/02/2015 09:58 AM <DIR> .. 25/02/2015 09:55 AM 100,532 xymonclient_1.98.ps1 1 File(s) 100,532 bytes 2 Dir(s) 64,899,543,040 bytes free
Am I doing something wrong?
I have manually put the new version in place for now.
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: g.stone-tolcher at its.uq.edu.au<mailto:g.stone-tolcher at its.uq.edu.au> W: www.its.uq.edu.au<http://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
Hi
Hmm, yes, I can replicate that.
Also, for the Powershell v1 thing, I've moved the arithmetic into the c# code so we should avoid this. I don't really have a way of testing against PS v1 at the moment but v2 and v4 seem to be OK.
I've committed an update for both of these issues (and the RRD bug, see other message).
Thanks
Zak
From: Brandon Dale [mailto:BDale at kitchengroup.com.au] Sent: 25 February 2015 02:09 To: Gavin Stone-Tolcher; Beck, Zak; xymon at xymon.com Subject: RE: Windows Xymon PS Client 1.98
I haven't used this before but I just tested and had the same problem.
I had this in my clientconfigfile clientversion:1.98:\\testserver01\test\
It looks like its inserting the file name into the path rather than just the version number.
Regards,
Brandon Dale
Network Administrator
Kitchen | Group
1 Wella Way Somersby, NSW, 2250
T (02) 4343 6000 | D (02) 4343 6052 | F (02) 4343 6080
E <mailto:%20BDale at kitchengroup.com.au> BDale at kitchengroup.com.au
please consider the environment before printing this e-mail
Disclaimer: This communication is confidential and intended only for the addressee. It may contain legally privileged information. By the use of email over the Internet, Kitchen Group is not waiving either confidentiality of, or legal privilege in, the contents of this email and any attachments. If you are not the addressee you may not use, disseminate or copy this information. If you have received this information in error please notify us immediately. Whilst we have taken all reasonable care to ensure that neither our system, this email nor any attachments has a virus, it is impossible to guard against every possible virus. We advise you to scan the email and any attachments with your anti virus software prior to use. We do not accept liability for any loss or damage which may arise from receipt of this email or any attachments.
From: Xymon [ <mailto:xymon-bounces at xymon.com> mailto:xymon-bounces at xymon.com] On Behalf Of Gavin Stone-Tolcher Sent: Wednesday, 25 February 2015 11:44 AM To: 'zak.beck at accenture.com'; <mailto:xymon at xymon.com> xymon at xymon.com Subject: Re: [Xymon] Windows Xymon PS Client 1.98
Oh, I forgot to mention I had a failure during the attempt to auto update the client from a share:
2015-02-25 10:31:59 Executing XymonCheckUpdate
2015-02-25 10:31:59 Running version 1.97; config version 1.98; attempting upgrade
2015-02-25 10:32:00 New version <file:///\\GST\WinPSClient\xymonclient_xymonclient_1.98.ps1.ps1> \\GST\WinPSClient\xymonclient_xymonclient_1.98.ps1.ps1 cannot be found - aborting upgrade
2015-02-25 10:32:00 Delaying until next run: 30 seconds
The share is just a local share on the test machine running the client with read access to everyone. Manually mounting <file:///\\GST\WinPSClient\> \\GST\WinPSClient\ on the machine:
C:\Users\ccgavin>net use U: <file:///\\GST\WinPSClient> \\GST\WinPSClient
The command completed successfully.
C:\Users\ccgavin>dir U:\
Volume in drive U is SYSTEM
Volume Serial Number is E0FB-17E1
Directory of U:\
25/02/2015 09:58 AM <DIR> .
25/02/2015 09:58 AM <DIR> ..
25/02/2015 09:55 AM 100,532 xymonclient_1.98.ps1
1 File(s) 100,532 bytes
2 Dir(s) 64,899,543,040 bytes free
Am I doing something wrong?
I have manually put the new version in place for now.
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
And one final one for the list. If this is the final output of "disk" for the new powershell client, then it would be nice if the Xymon server module
xymond/rrd/do_disk.c
could be trained to graph the mountpoints in addition to the driveletter. I am running server v4.3.18 and the mountpoint is not being RRD collected or graphed. I should point out that the BBWIN collected mountpoints were also not being graphed either, so it that sense it is the same situation.
I see we have a couple of windows client types handled in that module, DT_NT and DT_BBWIN. Both of these clients are getting on a bit and it appears that the powershell client might be the way to go for the future with Windows platforms, so maybe DT_PS is needed?
For reference, an example chunk from client message from my test system is:
[disk] Filesystem 1K-blocks Used Avail Capacity Mounted Label Summary(Total\Avail GB) C 104753148 41374564 63378584 39% C:\ SYSTEM 99.90\60.44 MountPointTest 104753148 41374564 63378584 39% C:\MountPointTest\ SYSTEM 99.90\60.44
The module looks to be treating this as BB_NT output as we begin with "Filesystem" like the BB_NT client.
I think this is the codethat might be causing an issue:
if ( (dsystype == DT_NT) && (*(columns[5])) && (strchr(columns[0], '/')) )
where BBNT client would have something like "/FIXED/C" being evaluated?
I attach a previous email to the list where the same issue was seen. In that case modifying the poweshell client to display something like "/FIXED/F:\ORAARCHIVE" for a mountpoint caused the mountpoints to be collected/graphed.
If someone could look into this for a future update it would be appreciated, as my windows guys would like to see graphs for their mountpoints.
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: g.stone-tolcher at its.uq.edu.au<mailto:g.stone-tolcher at its.uq.edu.au> W: www.its.uq.edu.au<http://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 Sent: Tuesday, 24 February 2015 11:07 PM To: xymon at xymon.com Subject: [Xymon] Windows Xymon PS Client 1.98
Hi
I've just committed version 1.98 to the project repository - http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/.
This update has a number of fixes and additions thanks to the suggestions and reaction to the previous patches, thanks to Gavin, Brandon and others for your feedback.
List of changes:
Mount points are now shown in the disk section, similar to BBWin. The drive label has been added and the column alignment adjusted to suit drives up to 999TB.The eventlogswanted directive now supports wildcards in the list of event logs field. So you can now return all event logs like this:
eventlogswanted:*:250000
The eventlogswanted directive also supports an optional fourth field to specify which levels of event should be returned - critical, error, warning, information, verbose. By default, all are returned. Values in the field should be comma-delimited, e.g.:
eventlogswanted:*:250000:error,warning,critical
The dirsize directive now works for files as well as directories.
Thanks to everyone, I really appreciate your feedback.
Regards Zak
participants (3)
-
BDale@kitchengroup.com.au
-
g.stone-tolcher@its.uq.edu.au
-
zak.beck@accenture.com