Chapter 21: SNMP Jobs
SNMP Jobs
The agent supports a built-in SNMP manager capability. You can enable the agent to act
as an SNMP manager to emit and listen for SNMP traps in addition to its other roles. The
agent supports SNMP v1, v2, and v3. After the agent is configured, you can define and
run SNMP job types on the agent.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or
Windows.
You can define the following types of SNMP jobs:
■ Simple Network Management Protocol Value Get (SNMPGET)
■ Simple Network Management Protocol Value Set (SNMPSET)
The SNMP Value Get job queries a network device for the value of a variable that is
assigned to a Management Information Base (MIB) address. You can use the SNMP
Value Get job to retrieve information about a network device to determine whether an
administrator is required to be notified.
The SNMP Value Set job modifies a variable on a network device. The variable is
assigned to the MIB address that you specify. You can use the SNMP Value Set job to
update a variable that reports on the failure or success of a mission-critical policy.
Define an SNMP Value Get Job
You can define a Simple Network Management Protocol Value Get (SNMPGET) job to
retrieve the value of an SNMP variable.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or
Windows. Your agent administrator must configure the agent as an SNMP manager. For
more information about configuring the agent as an SNMP manager, see the CA
Workload Automation Agent for UNIX, Linux, or Windows Implementation Guide.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: SNMPGET
Specifies that the job type is SNMP Value Get.
Specifies the name of the machine on which the job runs.
snmp_host
Specifies the host name or IP address of the network device.
snmp_oid
Specifies the SNMP OID (object identifier) in numeric or string format.
Note: If you specify the snmp_oid attribute in string format, you must also
specify the snmp_mib attribute for the job to complete successfully.
2. If your SNMP version is v3, you must specify the following attribute:
snmp_privacy_user
Specifies the user name whose credentials are used for authentication.
3. (Optional) If your SNMP version is v1 or v2, specify the following attribute:
snmp_comm_string
Specifies the community string that is used to authenticate against the network
device.
Define an SNMP Value Get Job
4. (Optional) If your SNMP version is v3, you can specify the following attributes:
snmp_auth_protocol
Specifies the SNMP v3 authentication protocol to use when connecting with
the user specified in the snmp_privacy_user attribute.
snmp_context_engine_id
Specifies the context engine ID in hexadecimal format.
snmp_context_name
Specifies the name of the context that the variable belongs to.
snmp_privacy
Specifies the SNMP v3 privacy protocol to use.
5. (Optional) Specify optional SNMP Value Get attributes:
■ job_class
■ destination_file
■ port
■ snmp_mib
■ snmp_subtree
■ snmp_table_view
■ snmp_version
6. (Optional) Specify common attributes that apply to all job types.
The SNMP Value Get job is defined. When the job runs, it retrieves the value of the
SNMP variable specified in the snmp_oid attribute.
Define an SNMP Value Get Job
452 User Guide
Notes:
■ Attributes that have a default value automatically apply to the job definition.
Therefore, you do not have to specify those attributes in the definition. If you
specify the attribute, it overrides the default.
■ For the SNMP job to complete successfully, the SNMP attribute values specified in
the job definition must match the SNMP configuration parameter values in the
agentparm.txt file. For example, if the value of the
management.snmp.agent.version parameter in the agentparm.txt file is set to 2,
you must set the value of the snmp_version attribute in the job definition to 2.
Similarly, if the value of the management.snmp.agent.port parameter in the
agentparm.txt file is set to 161, you must set the port attribute in the job definition
to 161.
■ If your network does not support Internet Protocol version 6 (IPv6), but the IPv6
stack is active on the Windows computer where the agent is running, the IPv6 stack
must be disabled. For more information about disabling IPv6 on Windows, see the
Microsoft Knowledge Base.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Example: Query a Network Device for the Value of an SNMP Variable using SNMP v2
Suppose that you want to know the value of the agentVersion variable hosted by a
network device. In this example, the host name of the network device is
host.example.com and its port is 161. The SNMP version is v2 and the read community
string is public. The name of the MIB file is cybermation.mib, which is located in the
agent installation directory.
insert_job: getvarv2
job_type: SNMPGET
machine: snmpagent
snmp_mib: cybermation.mib
snmp_host: host.example.com
snmp_oid: agentVersion
port: 161
snmp_version: 2
snmp_comm_string: public Define an SNMP Value Set Job
Example: Query a Network Device for the Value of an SNMP Variable using SNMP v3
Suppose that you want to know the value of a variable hosted by a network device using
SNMP v3. In this example, the job specifies the OID in numeric format, the AES privacy
protocol, and the SHA authentication protocol.
Note: The owner attribute value is the user ID associated with the authentication
password. The snmp_privacy_user attribute value is the user ID associated with the
privacy password. The owner and snmp_privacy_user users and their corresponding
passwords are specified using the autosys_secure command.
insert_job: getvarv3
job_type: SNMPGET
machine: localhost
owner: Administrator@localhost
snmp_oid: .1.3.1.1.3.1.0.0
snmp_host: snmp
snmp_version: 3
snmp_auth_protocol: SHA
snmp_privacy: AES
snmp_privacy_user: user1
More information:
Insert a Job Definition (see page 88)
Define an SNMP Value Set Job
You can define a Simple Network Management Protocol Value Set (SNMPSET) job to set
the value of an SNMP variable.
Note: To run these jobs, your system requires CA WA Agent for UNIX, Linux, or
Windows. Your agent administrator must configure the agent as an SNMP manager. For
more information about configuring the agent as an SNMP manager, see the CA
Workload Automation Agent for UNIX, Linux, or Windows Implementation Guide.
Follow these steps:
1. Insert a job and specify the following attributes in the definition:
job_type: SNMPSET
Specifies that the job type is SNMP Value Set.
machine
Specifies the name of the machine on which the job runs.
Define an SNMP Value Set Job
454 User Guide
snmp_host
Specifies the host name or IP address of the network device.
snmp_oid
Specifies the SNMP OID (object identifier) in numeric or string format.
Note: If you specify the snmp_oid attribute in string format, you must also
specify the snmp_mib attribute for the job to complete successfully.
snmp_value
Specifies the type and value of the variable that you are changing.
2. If your SNMP version is v3, you must specify the following attribute:
snmp_privacy_user
Specifies the user name whose credentials are used for authentication.
3. (Optional) If your SNMP version is v1 or v2, specify the following attribute:
snmp_comm_string
Specifies the community string that is used to authenticate against the network
device.
4. (Optional) If your SNMP version is v3, you can specify the following attributes:
snmp_auth_protocol
Specifies the SNMP v3 authentication protocol to use when connecting with
the user specified in the snmp_privacy_user attribute.
snmp_context_engine_id
Specifies the context engine ID in hexadecimal format.
snmp_context_name
Specifies the name of the context that the variable belongs to.
snmp_privacy
Specifies the SNMP v3 privacy protocol to use.
5. (Optional) Specify optional SNMP Value Set attributes:
■ job_class
■ destination_file
■ port
■ snmp_mib
■ snmp_version
Define an SNMP Value Set Job
6. (Optional) Specify common attributes that apply to all job types.
The SNMP Value Set job is defined. When the job runs, it sets the SNMP variable
specified in the snmp_oid attribute to the value specified in the snmp_value
attribute.
Notes:
■ Attributes that have a default value automatically apply to the job definition.
Therefore, you do not have to specify those attributes in the definition. If you
specify the attribute, it overrides the default.
■ For the SNMP job to complete successfully, the SNMP attribute values specified in
the job definition must match the SNMP configuration parameter values in the
agentparm.txt file. For example, if the value of the
management.snmp.agent.version parameter in the agentparm.txt file is set to 2,
you must set the value of the snmp_version attribute in the job definition to 2.
Similarly, if the value of the management.snmp.agent.port parameter in the
agentparm.txt file is set to 161, you must set the port attribute in the job definition
to 161.
■ If your network does not support Internet Protocol version 6 (IPv6), but the IPv6
stack is active on the Windows computer where the agent is running, the IPv6 stack
must be disabled. For more information about disabling IPv6 on Windows, see the
Microsoft Knowledge Base.
■ This guide provides instructions for defining jobs interactively. You also create job
definitions in script files and then import them using the jil command or use CA
WCC to define them. For more information about the JIL command and JIL syntax,
see the Reference Guide. For more information about using CA WCC to define the
job, see the CA Workload Control Center Workload Scheduling Guide.
Example: Change the Value of an SNMP Variable Using an Integer Value
Suppose that you want to set the value of the agentLogLevel variable to its highest level
to diagnose a problem. In this example, the host name of the network device is
host.example.com and its port is 161. The SNMP version is v2 and the write community
string is public. The name of the MIB file is cybermation.mib, which is located in the
agent installation directory.
insert_job: setvarint
job_type: SNMPSET
machine: snmpagent
snmp_mib: cybermation.mib
snmp_host: host.example.com
snmp_oid: agentLogLevel
port: 161
snmp_version: 2
snmp_comm_string: public
snmp_value: int=8 Attributes with Default Values
456 User Guide
Example: Change the Value of an SNMP Variable Using an IP Address Value
Suppose that you want to set the value of a variable to an IP address. In this example,
the job specifies the OID in numeric format, the DES privacy protocol, and the MD5
authentication protocol. The credentials of user user1 are used for authorization.
insert_job: setvarip
job_type: SNMPSET
machine: localhost
owner: Administrator@localhost
snmp_oid: .1.3.1.1.2.1.9.3
snmp_host: snmp
snmp_value: addr=172.24.2.20
snmp_version: 3
snmp_auth_protocol: MD5
snmp_privacy: DES
snmp_privacy_user: user1
More information:
Insert a Job Definition (see page 88)
Attributes with Default Values
Attributes that have a default value automatically apply to the job definition. Therefore,
you do not have to specify those attributes in the definition. Your agent administrator
can define some default values on the agent in the agentparm.txt file.
If you specify the attribute in a job definition, it overrides the default.
The following SNMP job attributes have default values:
port
Specifies the port of the network device.
Default: 161
snmp_auth_protocol (SNMP v3 only)
Specifies the SNMP v3 authentication protocol to use when connecting with the
user specified in the snmp_privacy_user attribute.
Default: MD5 (The job uses the Message Digest 5 authentication protocol.)
snmp_comm_string (SNMP v1 and v2 only)
Specifies the community string that is used to authenticate against the network
device.
Default: public
Attributes with Default Values
snmp_privacy (SNMP v3 only)
Specifies the SNMP v3 privacy protocol to use.
Default: DES (The job uses the Data Encryption Standard privacy protocol.)
snmp_subtree
Specifies that the job walks the SNMP subtree.
Default: n (The job does not walk the SNMP subtree.)
snmp_table_view
Specifies that the job retrieves the MIB data in table format.
Default: n (The job retrieves the MIB data in the oid=value format.)
snmp_version
Specifies the SNMP version used when connecting to the network device.
Default: 1
Note: For more information about JIL job types and other job definition attributes, the
values that you can specify for those attributes, and JIL syntax, see the Reference Guide.
Example: Override the Privacy Protocol and the SNMP Version in an SNMP Value Set
Job
The snmp_privacy and snmp_version attributes in the following job definition override
the default values.
Suppose that you want to set the value of the out456789 variable using SNMP v3. In this
example, the job uses the AES privacy protocol and the MD5 authentication protocol.
The credentials of user user1 are used for authorization.
insert_job: setvarv3
job_type: SNMPSET
machine: snmpagent
snmp_mib: cybermation.mib
snmp_host: host.example.com
snmp_oid: out456789
snmp_version: 3
snmp_privacy: AES
snmp_privacy_user: user1
snmp_auth_protocol: MD5
snmp_value: int=8 Attributes with Default Values
458 User Guide
Example: Use Defaults in an SNMP Value Get Job
The port and snmp_version attributes are not specified in the following job definition,
so default values are used. The port is set to 161 and snmp_version is set to 1. Since
snmp_version is set to 1, snmp_comm_string is also set to public (the default read
community string).
Note: The snmp_auth_protocol, snmp_privacy, and snmp_privacy_user attributes are
not specified because they only apply to SNMP v3.
insert_job: getvarv1
job_type: SNMPGET
machine:localhost
owner: Administrator@localhost
snmp_oid: .1.3.6.1.2.1.1.6.0
snmp_host: snmp
No comments:
Post a Comment
Note: only a member of this blog may post a comment.