Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SNMP traps via monitor in snmpd.conf - Help needed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Mar 24, 2010 3:34 pm    Post subject: SNMP traps via monitor in snmpd.conf - Help needed Reply with quote

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
trap2sink 10.10.10.5 public
authtrapenable 1
sysservices 8
monitor -r 10 -o dskPath -o dskAvail -o dskTotal "dskTable " dskErrorFlag 0 1


snmptrapd.conf wrote:
authCommunity log,execute,net public
Back to top
View user's profile Send private message
msalerno
Veteran
Veteran


Joined: 17 Dec 2002
Posts: 1338
Location: Sweating in South Florida

PostPosted: Wed Mar 24, 2010 7:31 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum