1 May 2009

SCOM 2007: Quick and dirty agent health check script

We used a script in our MOM environment to notify us on an hourly basis of agents that have not reported in x amount of time. I modified this script this week for SCOM.

The script retrieves the agents from the database that are marked as not available by SCOM, and then pings each of them. The ping status is included in the email.

Script file is available for download here:

Update the following:

Const strMOMSQLServer = ""  - Name or IP address of your SCOM DB server

Const strMOMAdminEmail = ""  - Email address(es) of recipients, separated by a semi-colon

Const StrFromEmail = ""  - From email address

Const strMailServer = ""  - Mail server address

Const strMailUser = ""  - If required, username for sending mail

Const strMailPass = ""  - password for mail user

Const strCustomer = ""  - the name of the customer/branch. This is used in the subject line of the mail. If you only look after one customer, or don’t need any distinction, you may remove this from the .Subject field in the script.


[ETA] Save the script as a .vbs file on your RMS or DB server, and run as a scheduled task.

And, as always, no real commenting, so feel free to leave a comment should something not make sense. And if you have a better solution, please let me know!

No comments:

Related Posts with Thumbnails