5

Nearly for 6 days I'm trying to get over this problem .

I have 2 machines . One of them is manager 10.201 machine, and the other is agent (10.226)

I've configured manager's snmptrap.conf file like this .

authCommunity  execute  public      default  .1
traphandle  default /usr/bin/traptoemail -s localhost -f snmp@localhost root@localhost

and then I've configured agent's snmpd.conf file like this.

###########################################################################
# SECTION: Access Control Setup

rocommunity  public  
rwcommunity  private



###########################################################################
# SECTION: System Information Setup

syslocation  "Izmir, 226. machine "
syscontact  [email protected]

###########################################################################
# SECTION: Trap Destinations

trap2sink  10.0.0.201  162

authuser   read -s v2c guest_user noauth  .1
authuser   read -s usm guest_user noauth  .1
authcommunity read  public  default .1
iquerySecName guest_user
agentSecName  guest_user

monitor   -u guest_user  -r  1  "interface down" -o ifDescr ifOperStatus != 1

But I want to trap for agent machine's CPUIdle rate. For example I can get CpuIdle like this way by snmpwalk command.

# snmpwalk -v 2c  -c public 10.0.0.226 .iso.org.dod.internet.private.enterprises.ucdavis.systemStats.**ssCpuIdle**.0

I want to trap to manager host(10.0.0.201) when agent's (10.0.0.226) CPuIdle rate is over 98.

Is there anyone that can help me ? Where I've done mistakes .conf files or anywhere else ?

AReddy
  • 3,122
  • 5
  • 35
  • 75
icameto
  • 341
  • 2
  • 6

1 Answers1

2

After reading man snmpd.conf, it seems that net-snmp can not send traps about CPuIdle rate.

A simple solution would be to have cron invoke a bash script that will check the top output for CPU idle % and send trap via snmptrap if it exceeds your threshold.

L.R.
  • 293
  • 2
  • 7