DeployJob - setDefaultSNMPNotifier
DeployJob - setDefaultSNMPNotifier
Description :
This command adds new SNMP Notification to the Default notification list.
The argument recipient is the email receiver, and the statusType argument determines the statuses for which you want to issue a notification. The possible statuses each have a value as follows:
- Success=2
- Failure=4
- Cancel=8
For statusType, add the values representing the statuses for which you want to issue notifications. For example, if you want to issue notifications when the job status is Failure or Cancel, then statusType=12.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
groupName | String | Name of the job folder containing the job. |
jobName | String | Name of the Deploy Job. |
recipient | String | Receiver of the SNMP Trap |
statusType | Integer | Sum of all statuses for which you want to issue notification. For more detailed information, see the description above. |
Example
The following example specifies that an SNMP Trap gets sent to snmp.company.com on this jobs Failures or if it's canceled.
Script
SNMP_NOTIFIER="snmp.company.com"
DeployJob setDefaultSNMPNotifier /Applications/Apache/Deploy DeployApache $SNMP_NOTIFIER 12