|
Have you ever tried to use a command other than net.exe send when configuring a status filter rule?
They don't work do they! However this VbScript provides just that functionality.
Use this to execute any valid command such as emailing, sending a
text messages to your mobile phone, starting a remote control session and
so on.
You can run it from anywhere but you must have access to WMI on the SMS provider server.
The script runs a standard WMI intrinsic event query which polls at
regular intervals. Once the status message condition has been
detected and the command run, the script exits. Through
a series of input boxes you define:
-
What is the name of the SMS provider
server?
This will probably be your SQL Database server. e.g.
"Server1"
-
What is the site code?
Your 3 character site code. e.g. "S00"
-
What is the SMS component ?
- The name of the component that generates the message e.g.
"SMS_DISCOVERY_DATA_MANAGER". Whatever you enter here
will be checked against SMS and rejected if there is no match.
Case is not sensitive.
-
What is the message id ?
This is the number identifying the message. You will
probably need an existing message in the database in order to find
what the number is. Some numbers are generic e.g. 502 component
has stopped, 500 component has started.
-
What is the name of the machine where the message was
generated?
This is the machine where the component you configured in
step 3 above, is running.
-
What is the full path of the program you want to
run?
e.g. C:\Program Files\doThis.exe
-
How frequently do you want to poll
WMI?
This is a value
expressed in seconds for how often WMI will check to see if the status
message has arrived. If you poll too often it will impose an overhead
on WMI. The default
polling interval is set at 120 seconds.
-
For how many minutes do you want to filter
messages?
This is a value
expressed in minutes. At the end of this time, if there have
been no status messages that meet your definition, the script
terminates. This
version of the script deliberately prevents configuring it to poll
forever.
Finally you will be asked to verify your
settings, the filter will be created and after a pause you click OK to
start polling.
Please accept this script as is. Any
feedback will be gratefully accepted at Debug@huntland.co.uk
|