Post device status to Twitter

Note: This example is provided as an illustration only and is not supported. Technical support is available for the Context object, SNMP API, and scripting environment, but Ipswitch does not provide support for JScript, VBScript, or developing and debugging Active Script monitors or actions. For assistance with this example or with writing your own scripts, visit the WhatsUp Gold user community.

This action posts the status of the device to which it's applied to the microblogging service Twitter. This is useful for creating an externally viewable and off-site list of device status.

Dim xml
Set xml = createObject("Microsoft.XMLHTTP")

'Update to include your account's username and password.
sUser = "username"
sPass = "password"

sStatus = "WhatsUp Gold says, '%Device.DisplayName %Device.State at %System.Time on %System.Date'"

xml.Open "POST", "http://" & sUser & ":" & sPass & "@twitter.com/statuses/update.xml?status=" & sStatus, False
xml.setRequestHeader "Content-Type", "content=text/html; charset=iso-8859-1"
xml.Send

Context.SetResult 0, xml.responseText
Set xml = Nothing

See Also

Example active script actions

Acknowledge all devices