Show Table of Contents
21.3. Setting up an SNMP Agent for Directory Server
To query information from Directory Server using the SNMP protocol, set up an SNMP agent:
- Install the 389-ds-base-snmp and net-snmp packages:
# yum install 389-ds-base-snmp net-snmp
- To configure the SNMP master agent, edit the
/etc/snmp/snmpd.conffile, adding the following entry to enable the agent extensibility (AgentX) protocol:master agentx
For further details about the AgentX protocol, see RFC 2741. - To configure the SNMP subagent, edit the
/etc/dirsrv/config/ldap-agent.conffile, adding a server parameter for each Directory Server instance you want to monitor. For example:server slapd-instance_name
- Optionally, create an SNMP user account:
- Stop the
snmpdservice:# systemctl stop snmpd
- Create the SNMP user account. For example:
# net-snmp-create-v3-user -A authentication_password -a SHA \ -X private_password -x AES user_nameFor details about the parameters used in the command, see the net-snmp-create-v3-user(1) man page. - Start the
snmpdservice:# systemctl start snmpd
- Optionally, set the Directory Server descriptive properties. For details, see Section 21.2, “Configuring the Directory Server for SNMP”.
- Start the
dirsrv-snmpservice:# systemctl start dirsrv-snmp
- Optionally, to verify the configuration:
- Install the net-snmp-utils package:
# yum install net-snmp-utils
- Query the Directory Server Object Identifiers (OID). For example:
# snmpwalk -v3 -u user_name -M /usr/share/snmp/mibs:/usr/share/dirsrv/mibs/ \ -l AuthPriv -m +RHDS-MIB -A authentication_password -a SHA -X private_password -x AES server.example.com .1.3.6.1.4.1.2312.6.1.1
For further details about SNMP, see the Monitoring Performance with Net-SNMP section in the Red Hat System Administrator's Guide.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.