Supplying arguments to a server command
By default, the server passes nine arguments to the script or program that is executed as a result of an event action launch. They are as follows:
- <rule_name>: Name of the event rule
- <time_stamp>: Time when the event occurred
- <Device_Name>: Name of the device hosting the monitor from where the event originated
- <Severity>: Severity associated with the event
- <Status>: Current status of the event
- <Description>: Description of the event
- <Event ID>: Unique ID of the event associated with the event. Event ID is different for each new event that affects the state of the event. For example, if an event transitions from high to critical, that is a new event, accompanied by its own event ID. When the event closes, that is also a new event.
- < Intelligent Event ID>: Unique ID of the intelligent event. Intelligent Event ID remains constant for the duration of the intelligent event, that is, until the intelligent event closes.
- <Device IP>: IP address of the device hosting the monitor from where the event originated. Device IP is a string denoting the 4 octets of the device IP address.
- <Source Agent IP>: IP address of the device hosting the BMC ProactiveNet Agent. For event actions triggered by SNMP-based monitors, the source agent is the IP address of the computer hosting the BMC ProactiveNet Server.
Here is an example of a script that was launched with only the default arguments:
/usr/pw/pronto/usr_apps/bin/notify.csh rule_name time_stamp
device_name severity status description eventId AlarmId DeviceID Source_AgentIP
Additional user arguments can be passed into the event scripts by appending them to the script name. Here is an example of passing value1 and value2 into the event script. Note the use of the flags parameter:
When additional user arguments are specified, they are passed into the script before the default arguments. Here is an example:
/usr/pw/pronto/usr_apps/bin/notify.csh value1 value2 rule_nametime_stamp device_name severity status description eventId AlarmId
For an example of a script that uses these parameters, see /usr/pw/pronto/bin/generic_script.pl.