Solved

whatsup gold powershell script

Posted on 2014-01-13
2
1,288 Views
Last Modified: 2014-02-20
Hello,

Im using whatsup gold v16 , i am trying to make a active monitor via powershell that will run a command called sipsak from the command line, and if it returns "SIP ok" then the monitor is up, and if it reports back "SIP failure" then the monitor is down. here is the command running in powershell. i just dont know how to script it in whatsup gold. can someone help?

PS C:\> & "C:\sipsak-0.9.5.exe"  -s sip:1234567890@173.251.68.100 -N -D 1
SIP ok
PS C:\> & "C:\sipsak-0.9.5.exe"  -s sip:1234567890@173.251.68.2 -N -D 1
nothing received, select returned error
SIP failure
PS C:\>

i cant seem to find online how to do this, and i dont know powershell at all.

Thanks in advance,
Dave
0
Comment
Question by:WCGS_Operations
2 Comments
 
LVL 68

Accepted Solution

by:
Qlemo earned 500 total points
Comment Utility
I don't have any clue about Active Scripting in WUG, but from the examples I've seen you need to use $Context to get and set values from/to WUG. So your script would look like this:
$result = C:\sipsak-0.9.5.exe -s sip:1234567890@173.251.68.100 -N -D 1
if ($result -eq "SIP ok") {
  $Context.SetResult(0,"SIP ok")
} else {
  $Context.SetResult(1, "SIP failure: $($result -join ""`n"")"
}

Open in new window

Store that into a .ps1 file, and provide that script with full path to the action for monitoring  in WUG.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Synchronize a new Active Directory domain with an existing Office 365 tenant
A procedure for exporting installed hotfix details of remote computers using powershell
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now