Line 68: |
Line 68: |
| ---- | | ---- |
| ===Loading MIB file=== | | ===Loading MIB file=== |
− | MIB file will be used to translate OID codes to more readable format | + | MIB file will be used to translate OID codes to more readable format. |
| + | |
| + | If you dont have the MIB file download it from SNMP packge WebUI window [[SNMP configuration example#SNMP Configuration]] |
| + | |
| + | After downloading the MIB file, place it in ''' ''/usr/share/snmp/mib'' ''' directory, you can use this command: |
| + | |
| + | $ sudo cp Downloads\TLT-MIB.txt /usr/share/snmp/mibs/TLT-MIB.txt |
| + | |
| + | Now edit file ''' '' /etc/snmp/snmp.conf'' '''. Example of the command: |
| + | |
| + | $ sudo nano /etc/snmp/snmp.conf |
| + | |
| + | Find this line: |
| + | '''mibs :''' |
| + | and change it to: |
| + | '''mibs +ALL''' |
| + | to load all existing MIB files in ''/usr/share/snmp/mibs'' directory. |
| + | |
| + | [[File:Network device configurationexample traps with terminal snmp config v1.png]] |
| + | |
| + | ---- |
| + | ===Launching Trap listening service=== |
| + | To launch SNMP Trap listening service use this command: |
| + | |
| + | $ sudo /etc/init.d/snmptrapd start |
| + | |
| + | [[File:Networking device configurationexample traps with terminal snmptarpd start v1.png]] |
| + | |
| + | To restart or launch it you can use this command: |
| + | |
| + | $ sudo /etc/init.d/snmptrapd restart |
| + | |
| + | [[File:Networking device configurationexample traps with terminal snmptarpd restart v1.png]] |
| + | |
| + | To stop the service use this command: |
| + | |
| + | $ sudo /etc/init.d/snmptrapd stop |
| + | |
| + | [[File:Networking device configurationexample traps with terminal snmptarpd stop v1.png]] |
| + | |
| + | To read service status use this command: |
| + | |
| + | $ sudo /etc/init.d/snmptrapd status |
| + | |
| + | [[File:Networking device configurationexample traps with terminal)snmptrapd status v1.png]] |
| + | |
| + | If SNMP manager caught any traps, connection information can be represented with service status. |
| + | |
| + | ===Testing if SNMP Trap listening service works=== |
| + | Firs make sure that SNMP Trap package has Trap rules configured in order to test if listening service works correctly. More information here [[SNMP configuration example#Trap Configuration]] |
| + | |
| + | If any Trap was triggered you can check if Trap message was caught and logged. Check service '''status''' to see if any connections were esablished. |
| + | |
| + | Open ''' ''/var/log/snmptrapd.log'' '''. If you specified different directory and file name, open it. Example commands: |
| + | $ sudo cat /var/log/snmptrapd.log |
| + | $ sudo more /var/log/snmptrapd.log |
| + | $ sudo nano /var/log/snmptrapd.log |
| + | |
| + | |
| + | snmptrapd.log file after triggering ''' ''trapDigitalRelayOutputStatus'' ''' by changing '''Digital relay output''' value in WebUI (Services -> Input/Output, Output tab -> ON/OFF tab using RUT955). |
| + | |
| + | [[File:Networking device configurationexample traps with terminal log file after catching trap v1.png]] |