Dear All,
Does anyone have a way to run VBS External scripts via Windows Schedule Tasks, and send the results directly back to the Xymon Server?
Martin.
----- Forwarded by Martin Wojak/DSE/VICGOV1 on 30/04/2015 03:06 PM -----
From: Brandon Dale <BDale at kitchengroup.com.au> To: "martin.wojak at delwp.vic.gov.au" <martin.wojak at delwp.vic.gov.au>, Cc: "stef.coene at docum.org" <stef.coene at docum.org> Date: 30/04/2015 01:44 PM Subject: RE: Xymon PS Client and External VBS scripts
Hey Martin,
I’m also just a sysadmin, this is something I have wanted to do as well as there are some vbscripts I could use as externals but haven’t worked out an easy way yet. I don’t really know vbscript either which doesn’t help L
These are the options I can think of:
Use bbwin just for these external tests.
need from the output of those scripts and send that to xymon using xymonsendUse Get-Content somehow in powershell to get the information you
you could possibly put it inside a powershell script and send directly to xymon.I “think” there is a way to run vbscript code inside powershell,
The last and ideal option is rewrite them in powershell, I know there are some similar scripts already out there but they would need to be modified to work with xymon. For example https://gallery.technet.microsoft.com/scriptcenter/Get-PendingReboot-Query-b... and there are some nagios scripts that do similar things.
Option 1 is the easiest if you don’t have the time to play around with PowerShell especially if you already have bbwin on all those servers. You should be able to just disable all the normal tests for the bbwin client by commenting out something in the .cfg file and use it only to send these externals.
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 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: martin.wojak at delwp.vic.gov.au [mailto:martin.wojak at delwp.vic.gov.au]
Sent: Tuesday, 28 April 2015 4:02 PM To: Brandon Dale Cc: stef.coene at docum.org Subject: Xymon PS Client and External VBS scripts
Hi Brandon,
I'm trying to migrate our 300 VMs from bbwin to PS-client. I love some of the new functionality of the PS client, that bbwin doesn't have (eg. dirtime, dirsize, restart failed service). But I have 2 External VBS scripts that I would like to keep using.
I had a look at converting our 2 VBS scripts that are currently called from BBwin, to be able to use xymonsend.ps1 (or some other way), to talk directly to our Xymon server. I couldn't work out how to do it. I'm just a SysAdmin, not a programmer or developer, so not very good with VB or PS.
If you have time, and would be easy to do, can you work out how I can make these 2 scripts operate as Windows Scheduled tasks and send data directly to our Xymon server.
Ta.
Martin.
Martin Wojak | Senior Infrastructure Support Officer (Fire) |Information Services Division Corporate Services | Department of Environment, Land, Water & Planning Level 9, 8 Nicholson St, East Melbourne, Victoria 3002 T: 03 9637 8470 | M: 0421 445 529 | E: martin.wojak at delwp.vic.gov.au
----- Forwarded by Martin Wojak/DSE/VICGOV1 on 23/04/2015 02:00 PM -----
From: Brandon Dale <BDale at kitchengroup.com.au> To: Stef Coene <stef.coene at docum.org>, "xymon at xymon.com" < xymon at xymon.com>, Date: 08/04/2015 12:57 PM Subject: Re: [Xymon] Xymon PS Client Sent by: "Xymon" <xymon-bounces at xymon.com>
Might be a better way but this is how I do it (my external scripts are written in PowerShell however)
- I put http://sourceforge.net/p/xymon/code/HEAD/tree/sandbox/WinPSClient/xymonsend.... onto each server inside the same directory as the PowerShell client
- I dot source this into my external scripts (which I normally store in c:\xymon\ext to keep it simple) and use it to send the status messages to xymon.
- Run these as scheduled tasks in windows.