Ad Widget

Collapse

Zabbix and SNMP with cisco 2960

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thanassis
    Junior Member
    • Jan 2014
    • 2

    #1

    Zabbix and SNMP with cisco 2960

    Hello and Happy New Year's Eve to all members.
    I am trying to monitor a cisco catalyst switch 2960 but I am stuck. I found here: https://www.zabbix.com/wiki/templates/start
    the 2960 template and I have already inserted it.
    Also created a host, in which added SNMP interface with the right IP and Port. I have chosen the template and also created an item as snmp agent v2 with the right properties.
    Do I have to do anything else?
    I followed this: http://www.youtube.com/watch?v=Wygx6...iw5Paw&index=1
    (I do not speek Russian but I understood what he clicked)
    and it shows a red sign SNMP (not green) and says
    Code:
    Timeout while connecting to "192.168.102.244"

    Do you know if there is something else that I forgot to do?
    Also with running the following I am getting response and I see the SNMP details
    Code:
     snmpwalk -c public -v 2c 192.168.102.244:161
  • steveboyson
    Senior Member
    • Jul 2013
    • 582

    #2
    Did you "snmpwalk" from your zabbix server to your Cisco? The details you mentioned let me think that your zabbix server is not allowed to connect via SNMP to your Cisco.

    Possibly you may also need to increment the "Timeout" value in your zabbix_server.conf

    Comment

    • thanassis
      Junior Member
      • Jan 2014
      • 2

      #3
      Hello,
      I "smnpwalk"-ed from the server to cisco, that's right.

      I found that the problem was in xml template that I downloaded from here:


      I changed this to one:
      <hosts>
      <host name="Template_Cisco_2960">
      <ip>0.0.0.0</ip>
      <port>10050</port>
      <status>3</status>

      To this:
      <hosts>
      <host name="Template_Cisco_2960_port161">
      <ip>192.168.102.244</ip>
      <port>161</port>
      <status>3</status>

      And Worked!
      The problem is that I cannot with that way to use this template with other 2960 switches.
      I tried to use <ip>0.0.0.0</ip> or to delete this line but I got the previous error.

      Do you have any idea for that?
      Thank you very much for your time!

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #4
        You must not change the IP address in the template but rather assign that template to your hosts (that is: your Cisco devices).

        Just make sure they all have a SNMP interface defined. Everything else is done via the template.

        Comment

        • syndeysider
          Senior Member
          • Oct 2013
          • 115

          #5
          Hi Thannisis

          Zabbix has multiple ways to pull/push information from Hosts.

          If you use the discovery method to discover your SNMP Devices and Action their addition into Zabbix than Zabbix automatically adds a SNMP Interface for the Host into the Host Definition with the correct Port and IP Address of the host.

          In your instance, when you import your stated template and assign it to the existing Host, the Template assignment and Host configuration assumes that the newly Templated Items are obtainable (fetched) via the Hosts SNMP Interface.



          Lastly, if the above is configured correctly, turn up the logging level of the Zabbix Server to 4 and grep the output for SNMP information to see if Zabbix is polling via SNMP and what response it's getting? Post output here?

          Comment

          • Network-Engineer
            Junior Member
            • Nov 2014
            • 2

            #6
            Dears,

            I am trying to monitor the same switch with the same tmplate.
            However, i'm getting the following output when I'm trying to import the template:

            st groups | Templates | Hosts | Maintenance | Actions | Screens | Slide shows | Maps | Discovery | IT services

            History: Configuration of host groups » Configuration of templates » Configuration import » Configuration of templates » Configuration import
            Details
            ERROR: Import failed

            Created: Item "FastEthernet0/2-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/3-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/4-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/5-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/6-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/7-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/8-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/9-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/13-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/14-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/15-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/16-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/17-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/18-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/19-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/20-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/21-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/22-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/23-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/24-IN" on "Template_Cisco_2960".
            Created: Item "GigabitEthernet0/1-IN" on "Template_Cisco_2960".
            Created: Item "GigabitEthernet0/2-IN" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/1-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/2-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/3-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/4-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/5-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/6-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/7-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/8-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/9-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/10-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/11-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/13-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/14-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/15-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/16-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/17-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/18-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/19-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/20-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/21-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/22-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/23-OUT" on "Template_Cisco_2960".
            Created: Item "FastEthernet0/24-OUT" on "Template_Cisco_2960".
            Created: Item "GigabitEthernet0/1-OUT" on "Template_Cisco_2960".
            Created: Item "GigabitEthernet0/2-OUT" on "Template_Cisco_2960".
            Created: Item "Uptime" on "Template_Cisco_2960".
            No permission for item "ifInOctets.10013".




            Do you have any suggestions regarding the above error??

            many thanks!

            Comment

            • zabbixei
              Junior Member
              • Dec 2014
              • 24

              #7
              i had the same problem with cisco 2960 then i had to modify the template. the modification was just to change port numbers according to my switch so i suggest you do not change anything else just the port numbers according to your switches.

              if you want to use my template let me know i will post it somewhere or give me email add i will send it to you.

              do not forget to change the community name as well.

              John

              Comment

              • zabbixei
                Junior Member
                • Dec 2014
                • 24

                #8
                Originally posted by thanassis
                Hello and Happy New Year's Eve to all members.
                I am trying to monitor a cisco catalyst switch 2960 but I am stuck. I found here: https://www.zabbix.com/wiki/templates/start
                the 2960 template and I have already inserted it.
                Also created a host, in which added SNMP interface with the right IP and Port. I have chosen the template and also created an item as snmp agent v2 with the right properties.
                Do I have to do anything else?
                I followed this: http://www.youtube.com/watch?v=Wygx6...iw5Paw&index=1
                (I do not speek Russian but I understood what he clicked)
                and it shows a red sign SNMP (not green) and says
                Code:
                Timeout while connecting to "192.168.102.244"

                Do you know if there is something else that I forgot to do?
                Also with running the following I am getting response and I see the SNMP details
                Code:
                 snmpwalk -c public -v 2c 192.168.102.244:161
                Dude,

                i had this problem with same switch you have and figured out. the problem was with port numbers, every cisco switch use different port numbers so i am going to send you my template and just upload it and it will for you.

                my template is for 48 port switch if you have less or more just update it. do not forget to change the snmp_community if it is not public.

                cheers!
                Last edited by zabbixei; 14-03-2017, 11:54.

                Comment

                Working...