デバイス状態の Twitter への投稿

メモ この例は説明のために示されているに過ぎず、実際にはサポートされていません。Ipswitch は、Context オブジェクト、SNMP API、およびスクリプティング環境については、テクニカルサポートを提供しますが、JScript、VBScript、およびアクティブスクリプトのモニタとアクションの開発とデバッグについては、サポートを提供しません。この例および自社独自のスクリプトを作成することに関する援助については、WhatsUp Gold ユーザーコミュニティにアクセスしてください。

このアクションは、マイクロブログサービスの Twitter に適用するデバイスの状態を投稿します。これは外部表示が可能な、デバイスの状態のオフサイトリストを作成する場合に便利です。

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

参照

アクティブスクリプトのアクションの例

すべてのデバイスの確認