• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    How-to test SNMP Trap in Mango

    How-To
    6
    12
    8.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      narenblr
      last edited by

      Ensure that there is no other SNMP Trap service running on the Mango server except Mango SNMP Trap.

      You can see this on a Linux system by executing the following command.

      netstat -unatp |grep udp

      udp 0 0 :::162 :::* 18938/java

      There should be a UDP port listening on 162 and should be bound to java

      1. Create a SNMP Data Source

      2. Download TrapGen.exe from http://www.wtcs.org/informant/free_snmp_tools.htm

      3. Create Trap Gen Command and note down the OID (-v .1.3.1.4.1.2854.1.2)

      TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20

      Note : x.x.x.x ( Mango server IP Address)

      1. Configure a Data Point with a SNMP Trap OID (.1.3.1.4.1.2854.1.2)

      2. Execute the TrapGen command

      TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20

      1. You should see the Trap received in Watchlist.

      Note : Incase if the SNMP OID is not configured as in the trapgen command check the mango log file and you should see a warning like the one below.

      /mango/apache-tomcat-6.0.20/logs/mango.log:WARN 2009-10-08 09:31:24,070 (com.serotonin.mango.rt.dataSource.snmp.SnmpDataSourceRT.receivedTrap:236) - Trap not handled: 1.3.1.4.1.2854.2.2 = 200

      1 Reply Last reply Reply Quote 0
      • A
        Anonymous
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • R
          rbautomacao
          last edited by

          Hi all !

          When i enable a Data Source i got this message : 'SNMP TRAP': java.net.BindException: Permission denied.

          Somebody could help me ?

          Thanks !

          1 Reply Last reply Reply Quote 0
          • N
            narenblr
            last edited by

            Stop any other SNMP Trap service running already and you should not receive this error.

            1 Reply Last reply Reply Quote 0
            • N
              narenblr
              last edited by

              Are you running tomcat as a normal user and not as root. It will helps if you could let us know the OS on which mango is running. If you are running on a UNIX system ensure that mango runs as root to be able to accept SNMP TRAPS on UDP 162.

              1 Reply Last reply Reply Quote 0
              • A
                Anonymous
                last edited by

                Yes, when i post it here at same instant i remember that was not running as root and now it's ok. Thanks !

                1 Reply Last reply Reply Quote 0
                • ricardoR
                  ricardo
                  last edited by

                  Sorry for resurrecting an old post, but the current linux installation instructions specifically say not to run mango as root. If we follow the instruction and create a new user (e.g. mango), we will not be able to bind the snmp trap port, e.g we will get "'SNMP': Unable to bind to trap port. Permission denied.". What is the suggested work around?

                  1 Reply Last reply Reply Quote 0
                  • ricardoR
                    ricardo
                    last edited by

                    Any idea here?

                    1 Reply Last reply Reply Quote 0
                    • CraigWebC
                      CraigWeb
                      last edited by

                      Hi @ricardo you should use a program such as persistent iptables to route port 123 --> 1123. Then bind your data source to 1123.

                      1 Reply Last reply Reply Quote 0
                      • ricardoR
                        ricardo
                        last edited by

                        @CraigWeb Thank you for your reply. Sorry, can you provide more detail on how to do this?

                        1 Reply Last reply Reply Quote 0
                        • terrypackerT
                          terrypacker
                          last edited by

                          @Ricardo there is some information here as to how to use iptables. I suggest you familiarize yourself with how they work as they are useful to redirect port I/O between privileged ports and non-privileged ports.

                          https://docs-v3.mango-os.com/linux-security

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post