# SNMP traps via monitor in snmpd.conf - Help needed

## msalerno

net-analyzer/net-snmp-5.4.2.1-r1

I am trying to figure out how to send a trap when disk space falls below a specific level.  At this point I am working with a very basic config on 1 machine for testing purposes.  With the below settings in the snmpd.conf my disk space is fine.  Then I execute a "dd if=/dev/zero of=file_to-create bs=1k count=100000" which is just enough to cause the dskErrorFlag to be set.  The problem is that I want my system to send out a trap with the about the low disk space.  I have been reading around on how to do this, but any combination I have tried has failed.  I am hoping that someone here has a little more experience with snmp and can shed some light one this.

Thanks

snmpwalk -v 2c -c public 10.10.10.5 .1.3.6.1.4.1.2021.9

Pre dd command:

...

UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: noError(0)

...

Post dd command:

...

UCD-SNMP-MIB::dskErrorFlag.1 = INTEGER: error(1)

...

 *snmpd.conf wrote:*   

> rocommunity public
> 
> disk  / 10250000
> 
> trapsink  10.10.10.5 public 
> ...

 

 *snmptrapd.conf wrote:*   

> authCommunity log,execute,net public

 

----------

## msalerno

I believe that all I needed to do was add a user:

# Set up the credentials to retrieve monitored values

createUser    _internal MD5 "cac0610a7e6fd1126892d816a5006266"

iquerySecName _internal

rouser        _internal

----------

