Server Management - Systems Insight Manager
1833420 Members
3179 Online
110052 Solutions
New Discussion

Re: how to send a snmp trap manualy by command line to HPSIM

 
tintin31
Advisor

how to send a snmp trap manualy by command line to HPSIM

Hello all,

I have tried to send a trap to HPSIM using trapgen :
trapgen
-c xxxxx
-d x.x.x.x -s 11003
-v system.sysName.0 STRING XXXXX
-v 1.3.6.1.4.1.232.11.2.11.1.0 INTEGER 0
-v 1.3.6.1.4.1.232.11.2.8.1.0 STRING "Management Agents Test Trap sent"

Here is the result using snmputil trap:
snmputil:
trap generic=6 specific=11003
from -> x.x.x.x
Variable = .0.0.0
Value = OCTET STRING - XXXXX
Variable = .iso.org.dod.internet.private.enterprises.232.11.2.11.1.0
Value = INTEGER - 0
Variable = .iso.org.dod.internet.private.enterprises.232.11.2.8.1.0
Value = OCTET STRING - Management Agents Test Trap sent
Here is the result using the HP snmp test trap button (I search the executable but I think it is encapsulated into the host agent):
snmputil: trap generic=6 specific=11003
from -> x.x.x.x
Variable = system.sysName.0
Value = OCTET STRING - xxxxx
Variable = .iso.org.dod.internet.private.enterprises.232.11.2.11.1.0
Value = INTEGER - 0
Variable = .iso.org.dod.internet.private.enterprises.232.11.2.8.1.0
Value = OCTET STRING - Management Agents Test Trap sent - Friday, January 18, 2008
1:31:18 PM

So, I have 2 differences :
system.sysName.0 and the timestamp
Does anyone know how to get the timestamp or the sysname?
But I am not sure if I can send a trap to HPSIM using tragen, I never received a manualy trap within HPSIM.

I have started to read the Compiling and customizing SNMP MIBs with HPSIM but I don't understand the mecanisum of the sender.
Since each client has the hpsim client, any trap would be able to be send to HPSIM but what is the link?

If anybody can help me, I would really appreciated, please. I just want to be able to send a trap manualy to the console.

Jean-Yves
2 REPLIES 2
jfranciskay
Advisor

Re: how to send a snmp trap manualy by command line to HPSIM

Do you need to do this on the command line? If not you can go into Control Panel/HP Management Agents. On the second tab (SNMP Settings), there is a "Send Test Trap".
tintin31
Advisor

Re: how to send a snmp trap manualy by command line to HPSIM

Thank you, I know this button. But I really need to do it manually.
For example, I would send a trap after an execution of a script; if the script run successfuly then send an information trap else a warning trap.