Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

SNMP TRAP command not working

SAMI AHMAD
Regular Advisor

SNMP TRAP command not working

this command works :

snmp_trapsnd 0.0 local 0 0 0 "-v2c" -h 10.100.10.112

but this one doesnt :

snmp_trapsnd 0.0 local 0 0 0 "-v2c" -h 10.100.10.112 -D "SUNNY2 MSG"

Unexpected arguments.
#snmp_trapsnd enterprise agent-address generic specific timeticks
[-v version] [-c community] [-h host] [-p port] [-tcp] {variable [type value]}

the first command sends a trap but its filled with generic information and I wanted to send a specific msg via trap but i cant get the syntax right .
3 REPLIES
Hoff
Honored Contributor

Re: SNMP TRAP command not working

OpenVMS version and platform? IP stack and version?

Process parse style? (SHOW PROCESS /ALL shows the parse setting.)

I don't see a -D option listed for OpenVMS with TCP/IP Services. Did you intend "-d" (lowercase) instead, as I might suspect?

OpenVMS (depending on how you have process parsing set) tends to upcase stuff when then hits C which downcases stuff, which is why folks tend to use "-v2c" to get an SNMPv2 request. But if you're preserving case within your process, the -D arrives as -D and not "-d".

And yes, snmp_trapsnd is pretty cryptic. There are better MIB browsers around, if that's your goal.
SAMI AHMAD
Regular Advisor

Re: SNMP TRAP command not working

there is a prameter "-D" ,see below:
parse style=traditional , Alpha axp vms 7.3-2
as I said that i could send the trap using snmp_trapsnd but Iam looking for syntax to send the custom msg via snmp.

The snmp_request and snmp_trapsnd commands support the data types listed in
Table 4â 3. These values apply to Set requests only.
Table 4â 3 Data Types for the snmp_request and snmp_trapsnd Commands
Data Type Value
Counter -c
Counter641 -l
Display string -D
Gauge -g
Integer -i
IP address -a
NULL -N
Object identifier -d
Octet -o
Opaque string -q
Time ticks -t
1For support of trap sender program (TCPIP$SNMP_TRAPSND.EXE) only. Properly defined, MIB
variables of type Counter64 are not writable.
SAMI AHMAD
Regular Advisor

Re: SNMP TRAP command not working

from hit and trial I found the right syntax :

snmp_trapsnd 0.0 local 0 0 0 -h 10.100.10.112 -v2c 1.3.6.1.6.3.1.1.4.1.0
"D" "trap sent from Sunny2 at 10:30"