Ad Widget

Collapse

How does SNMP work in Zabbix?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Niels
    Senior Member
    • May 2007
    • 239

    #1

    How does SNMP work in Zabbix?

    Hi,

    I'm monitoring a Windows machine from a Linux server -- it has a Zabbix agent on it. This works fine, with the default Windows template I'm getting results back. All items are "active agent" because of various firewalls.

    Now I want to also monitor some SNMP values on the Windows machine. I've added the SNMPv2 template to the host, but no values ever appear. The SNMP service is running on the windows machine.

    The manual doesn't help. At all.


    Thanks,
    Niels
  • Markus
    Member
    • Jan 2006
    • 39

    #2
    Have you tried to fetch values using the 'snmpwalk' command of the net-snmp tools (probably already installed on your Linux server)? Take the following command line as an example but you might have to adjust the community string ('public'), version ('2c' or '1'), IP address of the Windows server and OID ('.1') to match your setup on the Windows server.

    snmpwalk -c public -v 2c 10.1.2.3 .1

    Once that works we can have a look at your Zabbix item configuration.

    Markus

    Comment

    • Niels
      Senior Member
      • May 2007
      • 239

      #3
      Hi Markus,

      the Windows machine is behind a firewall, and I can't scan it. That's why I'm using active checks. Now I'm trying to do the same with SNMP.


      Thanks,
      Niels

      Comment

      • swaterhouse
        Senior Member
        • Apr 2006
        • 268

        #4
        Is your firewall allowing snmp data through? If not then you need some way of getting through the firewall - either continue to use active agents or put a zabbix server on the inside of the firewall.

        Comment

        • Niels
          Senior Member
          • May 2007
          • 239

          #5
          I'd much prefer to have the existing Zabbix agent transmit the SNMP data -- is that possible?

          There's a firewall in my own building, which now has a hole at 10050 routed to the zabbix server. I could make another hole for SNMP traffic, but how would that work, with many monitored machines on different adresses? The firewall at the remote location is something I'd rather not change.

          Distributed monitoring has so far not worked for me.

          Thanks,
          Niels

          Comment

          • Markus
            Member
            • Jan 2006
            • 39

            #6
            You would have to run something like 'snmpget' as a command line to a UserParameter on your Windows server, e.g.


            UserParameter=sysDescr,snmpget -c public -v 2c 127.0.0.1 SNMPv2-MIB::sysDescr.0 | cut -d' ' -f 4-


            But that's a very cumbersome way of doing it, especially if you want to monitor lots of variables. Also you would have to install the 'snmpget' and 'cut' commands on Windows first!

            I'd rather change the firewall to allow SNMP requests (port 161/udp) from the Zabbix server to all monitored devices (or from the Zabbix server to any destination to make life a bit easier) if you really(!) require SNMP. You would have to control SNMP access to the Windows server as tightly as possible though!!!!

            Markus
            Last edited by Markus; 11-09-2007, 21:24.

            Comment

            • Niels
              Senior Member
              • May 2007
              • 239

              #7
              Hi,

              that clears up things a lot for me.

              Opening 161 doesn't seem like the right thing to do in my situation, but distributed monitoring should solve these problems. In the mean time I can use the userParameter method for simple SNMP stuff.

              Thanks!
              Niels

              Comment

              Working...