Method 2: From command line
In order to configure SNMP trap adapter from command line, you need to download and install open source net-snmp package from http://www.net-snmp.org/download.html
Once it is installed, define an environment variable SNMP_DIR pointing to net-snmp installation direcotry. For example:
set SNMP_DIR=C:\SNMPAdapter\ucd-snmp-4.2.3\usr
Then copy your MIB file to %SNMP_DIR%\mibs\ directory. Run the following command:
mib2map.pl -m ALL -M "%SNMP_DIR%\mibs;%SNMP_DIR%\share\snmp\mibs" -s %SNMP_DIR%\bin\snmptranslate.exe
Where mib2map.pl is a perl script already installed in your %MCELL_HOME%\bin\ directory as part of BMC Event Adapters.
In the current directory, you should see the following 4 files generated as the result of running the above mib2map.pl command:
mcsnmptrapdmib.dat
mcsnmptrapdmib.map
mcsnmptrapdmib.baroc
mcsnmptrapdmibe.baroc
Now you have generated the above 4 files either from GUI or command line, copy both mcsnmptrapdmib.baroc and mcsnmptrapdmibe.baroc to %MCELL_DIR%\etc\<cell_name>\kb\classes\ directory. Add mcsnmptrapdmibe followed by mcsnmptrapdmib to .load file in %MCELL_DIR%\etc\<cell_name>\kb\classes\ directory. The <cell_name> here needs to match the value of parameter ServerName in your mxca.conf file.
Copy both mcsnmptrapdmib.dat and mcsnmptrapdmib.map to %MCELL_DIR%\etc\ directory. Rename mcsnmptrapdmib.dat to mcsnmptrapd.dat. Rename mcsnmptrapdmib.map to mcsnmptrapd.map.
Recompile the cell. Restart the cell. Stop and then start SNMP trap adapter after a couple of minutes. Now you can configure your 3rd-party monitoring software to send SNMP traps to your SNMP trap adapter. You should see events with class names defined in the MIB file shown up in your cell.
Now you have generated the above 4 files either from GUI or command line, copy both mcsnmptrapdmib.baroc and mcsnmptrapdmibe.baroc to %MCELL_DIR%\etc\<cell_name>\kb\classes\ directory. Add mcsnmptrapdmibe followed by mcsnmptrapdmib to .load file in %MCELL_DIR%\etc\<cell_name>\kb\classes\ directory. The <cell_name> here needs to match the value of parameter ServerName in your mxca.conf file.
Copy both mcsnmptrapdmib.dat and mcsnmptrapdmib.map to %MCELL_DIR%\etc\ directory. Rename mcsnmptrapdmib.dat to mcsnmptrapd.dat. Rename mcsnmptrapdmib.map to mcsnmptrapd.map.
Recompile the cell. Restart the cell. Stop and then start SNMP trap adapter after a couple of minutes. Now you can configure your 3rd-party monitoring software to send SNMP traps to your SNMP trap adapter. You should see events with class names defined in the MIB file shown up in your cell.
No comments:
Post a Comment