3 Replies Latest reply on Nov 21, 2008 11:31 AM by djkrite

    Enable remote SNMP access?

    djkrite

      Hello,

      I'm running:

      JBoss 4.2.2 and Java 5. I've been successful in setting up Cacti to get SNMP data from JBoss via, the snmp-adaptor on my local machine (localhost). However I have been unsuccessful get the data into Cacti from a remote JBoss server. How do enable remote SNMP access for the snmp-adaptor? Here is my current managers.xml:

      <?xml version="1.0"?>
      <manager-list>
       <manager>
       <address>localhost</address>
       <port>1162</port>
       <local-address></local-address>
       <local-port></local-port>
       <version>1</version>
       </manager>
       <manager>
       <address>192.168.1.1</address>
       <port>162</port>
       <local-address></local-address>
       <local-port></local-port>
       <version>1</version>
       </manager>
      </manager-list>
      


      Thank you,

      TK

        • 1. Re: Enable remote SNMP access?
          djkrite

          I was able to get this to work with iptables and some redirecting:

          #!/bin/sh
          IPT="/sbin/iptables"
          INT="eth0"
          $IPT -F
          $IPT -F INPUT
          $IPT -F OUTPUT
          $IPT -F FORWARD
          $IPT -F -t mangle
          $IPT -F -t nat
          $IPT -X
          $IPT -P INPUT ACCEPT
          $IPT -P OUTPUT ACCEPT
          $IPT -P FORWARD ACCEPT
          $IPT -t nat -A OUTPUT -p udp -d 192.168.1.1 --dport 1161 -j REDIRECT --to-port 1161
          


          I also removed the 2nd manager attribute listing in the managers.xml file.

          TK

          • 2. Re: Enable remote SNMP access?
            dimitris

            You need to bind jboss to some visible IP, e.g.

            run -b xx.xx.xx.xx

            • 3. Re: Enable remote SNMP access?
              djkrite

              Ah, thank you. It worked! The above routing with iptables only worked for me when I was on the actual box. Seems "REDIRECT" option for iptables takes locally -generated packets and sends them to 127.0.0.1, so when I used snmpwalk from a remote box the command timed out.

              TK