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:

/usr/pw/pronto/usr_apps/bin/notifycce.csh&flags=value1&flags=value2
Warning

Note

Separating the values using the ampersand and the term flags (&flags) is optional.

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

Warning

Note

Default arguments are passed into the script regardless of whether the event scripts intend to use them or not. The scripts can simply ignore these arguments if they are not needed.
User-defined arguments are passed first to the server, followed by the default arguments. The default arguments are passed in the order given previously.

For an example of a script that uses these parameters, see /usr/pw/pronto/bin/generic_script.pl.

Warning

Note

While passing arguments to command on server, do not pass the "+" character as an argument. The character "+" is used as a keyword internally by the BMC ProactiveNet Server. For example, if the Command on Server is specified as chmod +x abc.sh, ProactiveNet Server executes the command chmod x abc.sh. This may lead to unexpected results. The workaround is to write the command in a script file and execute the script by using Command On Server Action.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC ProactiveNet 9.6