The goal is for the enterprise monitoring platform at 192.0.2.10 to receive an immediate SNMP notification-without polling-whenever no httpd processes are running. Which additional configuration change on the web server will BEST achieve this?
Add view all included .1 to snmpd.conf so the entire MIB tree is readable.
Add trap2sink 192.0.2.10 public to snmpd.conf and restart the SNMP agent.
Change the monitor line to monitor -r 5 -o hrSWRunName "Apache stopped" proc httpd 1 1 to shorten the polling interval.
Launch snmptrapd on the web server listening on UDP port 161 to forward the trap.
The monitor directive raises a DisMan Event-MIB notification when its Boolean test is true, but the agent still needs to know where to send that notification. Adding a trap2sink (or trapsink/informsink) line designates the management station that should receive SNMPv2c trap PDUs, which are delivered on UDP 162 without requiring a response. Once the Net-SNMP service is reloaded, the agent will transmit a trap as soon as the condition is detected.
The view directive only controls which portions of the MIB tree are readable with GET/GETNEXT requests; it has no effect on trap delivery. Running snmptrapd on the monitored host is unnecessary for sending traps (it is a receiver) and the default listener port is 162, not 161. Changing the sampling interval from 15 s to 5 s might detect the fault sooner, but it still would not send a trap without a defined sink, so the manager would remain unaware.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a trap2sink in SNMP?
Open an interactive chat with Bash
What is the difference between polling and traps in SNMP?
Open an interactive chat with Bash
What is DisMan Event-MIB and how does it relate to the monitor directive?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access