Hi, everybody

Happy new year!

I am using NET-SNMP 5.2.2. I want to implement some traps in my agent. For
example, as soon as CPU is overload or the fan is out of work, the agent
should send notifications to manager. I already have some MIBs definitions
for those traps. But I have no idea how to implement it.

These are my problems:
1.How can agent detemine when it should send notification to manager?
  In "
http://net-snmp.sourceforge.net/docs/FAQ.html#How_can_I_get_the_agent_to_generate_a_trap__or_inform__";,
I can find there are two ways to determine *when* to generate the trap:
i):use DisMan Event MIB ii): use the routines documented in 'snmp_alarm(3)'
to regularly invoke a monitoring routine.
  Since there are no MIB files for the CPU and fan in my example, I have to
choose the second way.
  But I can not find any description on how to regularly invoke a
monitoring routine. I wonder if this regularly invoke is a program which
should be implemented by myself. And the program must get the CPU overload
value and check if the fan is work well or not?

2. If I have to implement a program to get the CPU overload value and check
the fan by myself, then this program is included in agent or not? If not,
how can it inform agent and send notification to manager by using
"send_v2trap"?

Further more, can you give me some websites or information on the steps of
implementing a trap with net-snmp? Maybe it will include make a MIB file,
use mib2c to generate code, how to change the code, how to detemine when
will agent send notification, how to connect the detemine conditions with
"send_v2trap" function in agent ....

Sorry for ask so many primary questions. But I have been puzzled for many
days and it is very important to me and all the beginners.

Thank you!

Peter

--
you jump, I jump,she jump 3
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to