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

SNMP TRAP command not working

Regular Advisor

SNMP TRAP command not working

this command works :

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

but this one doesnt :

snmp_trapsnd 0.0 local 0 0 0 "-v2c" -h -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 .
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.
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
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.
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 -v2c
"D" "trap sent from Sunny2 at 10:30"