This is something I spent quite a bit of time on.  I requested that IBM
include the DPISAMPL program, dpi_sample (or equivalent) with z/VM for
customers who don't have a C compiler. They accepted the request, but I'm

not sure if it is officially included yet. When I did it I had to open an

ETR and get it from them. In my case I wanted the ability to send free-fo
rm
text snmp alerts from my own Rexx exec.

Here are my notes to hopefully get someone started with setting this up. 
We
set up SNMP monitoring for z/VM messages to go to ITO.

   1. Update LPARVM## TCPIP (for all LPARs) with the following entries 


       AUTOLOG SNMPD 0 ; SNMP daemon

      PORT 
        161 UDP SNMPD ; SNMP daemon port for SNMP messages

      OBEY 
        SNMPD   

      ; Following entries are for SNMP MIB 1.3.6.1.2.1.1.      
             
      SYSCONTACT                   
                         
                
        For z/VM Support refer to SOP for contact information.    
          
      ENDSYSCONTACT                  
                         
              
      SYSLOCATION                   
                         
               
         123 Sesame Street                
                         
 
      ENDSYSLOCATION                  
                         
             
      ; -----------------------------------------------------------------
---  
        

   2. Issue the following commands from maint:

      netstat obey port 161 tcp snmpd
      rac alu snmpd resume      

   3. create SNMPTRAP DEST on TCPMAINT 198 (D).

      snmpdest1.yourcompany.com            UDP 
      snmpdest2.yourcompany.com            UDP 

   4. create PW SRC on TCPMAINT 198 (D).

      * This is a sample PW SRC file.  First we see some sample entries.
      * NetView on the mainframe passes Uppercase community names from th
e
      * command line, that is why we have the NVTEST entry as a sample.
      *
      * community_name netw_addr  netw_mask    priv_mask
      *
      mycommunity 0.0.0.0     0.0.0.0

   5. As TCPMAINT, copy MIB_DESC SDATA E MIB_DESC DATA D This file is wha
t
describes the SNMP objects that the DPISAMPLE can call. Edit this file:

      Replace this -

      # -----------------------------------------------------------------
------
      # XGMON Display Element Override follows.         
                       
      # -----------------------------------------------------------------
------
      *                      
                         
                         

      deOverride               1.3.6.1.4.1.2.2.1.5.1.  display        1 
       
      NVcmd                    1.3.6.1.4.1.2.2.1.5.2.  display        1 
       
      NVreply                  1.3.6.1.4.1.2.2.1.5.3.  display        10 
      
      NVmsgop                  1.3.6.1.4.1.2.2.1.5.4.  display        1 
       
      test                     1.3.6.1.9.1.            display        10 
        

      With this -

      # -----------------------------------------------------------------
------
      # GENERIC SNMP TRAP USING DPISAMPL.C PROGRAM. CALLED BY SNMP EXEC 
   
                         
  
      # -----------------------------------------------------------------
------
      *                      
                         
                         

      jdSnmpMsg                1.3.6.1.4.1.2.2.1.5.9.  display        5  
        

   6. Give the dpisimpl.txt MIB mapping file to the ITO Support person 

      to add into ITO. The file given is here.

   7. Get the DPISAMPLE program:

      (had to enter an etr and get it from IBM. 
       Referenced in TCPIP system programmers manual)

      download DPISAMPL.BIN (and other files) from IBM FTP site. 
      LOCSITE FIX 1024 
      BIN
      MGET DPI*

      Unpack each file:
      copyfile DPISAMPL * A1  = = = (unpack

      Copy the DPISAMPL.BIN to DPISAMPL.TEXT

      Sendfile the TEXT and LOADLIST files to TCPMAINT.


      Logon as TCPMAINT:
      DEF STOR 8M     
      i cms                     
                         
          
      GLOBAL LOADLIB SCEERUN               
                         
          
      GLOBAL TXTLIB SCEELKED               
                         
          


      TCPLOAD DPISAMPL DPISAMPL C-ONLY (XA TXTLIB DPILIB

      GENMOD DPISAMPL

      should now have dpisample module on tcpmaint.191. 

   8. Try sending a message from tcpmaint:
      dpisample -inet loopback mycommunity
      -trape 6 9 1.3.6.1.4.1.2.2.1.5.9 "JDVMQSYS01E TEST TEST TEST"

      It should come out in hex since it is EBCDIC.

   9. Create SNMP EXEC on $ALLCNT$.1. Referenced below.      

      Then try sending a msg from MAINT:
      snmp this is a test from vm02

      It should come out and look OK. 



/**************************************************************/ 
/* SNMP EXEC - Send SNMP message alerts to ITO.               */ 
/*                                                            */ 
/* Updates:                                                   */ 
/* 15Nov2006 (TS62265) - Initial Version.                     */ 
/*                                                            */ 
/* Notes:                                                     */ 
/*   1) None.                                                 */ 
/*                                                            */ 
/**************************************************************/ 
                         
                         
               
parse source xos xct xfn xft xfm xcmd xenvir .         
          
                         
                         
               
                         
                         
               
/* Parse and validate input parms */             
                
PARSE UPPER ARG msg                  
                         
   
if arg() = 0 then Call Exit 4              
                      
else do                      
                         
           
  Say "SNMP msg=       " msg               
                      
  'PIPE STRLIT /'msg'/ | XLATE *-* E2A | var msgAscii'       
    
  Say "SNMP msgAscii = " msgAscii             
                   
end                        
                         
             
                         
                         
               
    'dpisample -inet LOOPBACK mycommunity',          
               
    '-trape 6 9 1.3.6.1.4.1.2.2.1.5.9 ',           
              
    '"'msgAscii'"'                   
                         
   
                         
                         
               
exit;          

Exit:                       
                         
                
   parse arg exitrc .                  
                         
     
   If exitrc = 4 then do  /* Write out description in that case */  
 
     Say ""                     
                         
            
     Say "Syntax: snmp <message text>"            
                   
     Say ""                     
                         
            
   End                       
                         
                     
                         
                         
   
                         
                         
                   
   Exit exitrc;                    
                         
               

Reply via email to