Ad Widget

Collapse

command-line import/export facility dynamic items, triggers and graphs

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nima0102
    Senior Member
    • May 2010
    • 106

    #46
    Hi
    Thanks for your reply.
    May you give me those 64bit OIS's ? and tell us which part of script we have to change.

    Thanks in advance

    Comment

    • dima_dm
      Senior Member
      • Dec 2009
      • 2697

      #47
      Originally posted by nima0102
      Hi
      Thanks for your reply.
      May you give me those 64bit OIS's ? and tell us which part of script we have to change.

      Thanks in advance
      You must change OID 32 bit on 64 bit in code of script.
      SNMP Object Navigator:

      Example:
      ifInOctets Counter32 1.3.6.1.2.1.2.2.1.10
      On
      ifHCInOctets Counter64 1.3.6.1.2.1.31.1.1.1.6
      Code:
      print XML "\t\t\t\t\t<snmp_oid>.1.3.6.1.2.1.2.2.1.10.$port</snmp_oid>\n";
      on
      print XML "\t\t\t\t\t<snmp_oid>.1.3.6.1.2.1.31.1.1.1.6.$port</snmp_oid>\n";
      See

      Unfortunately I don’t have enough free time to modify script. I will modify script as soon as possible.
      Last edited by dima_dm; 28-02-2011, 09:57.

      Comment

      • georgew
        Member
        • Mar 2008
        • 50

        #48
        Thank you for that! Saved me the time of figuring it out...

        Comment

        • dima_dm
          Senior Member
          • Dec 2009
          • 2697

          #49
          New version cisco_xml.20110317.zip

          17.03.2011 Version 1.5
          add 64 bit counters support
          Minor bug is fixed (for symbols <>)

          Comment

          • doderlein
            Junior Member
            • Jun 2011
            • 5

            #50
            This is a great script dima_dm! It saved me a lot of work trying to add lots of cisco-switches to zabbix.

            However, i did some changes to it that you might be interested in:
            - added application-tags
            - according to cisco, ifInNUcastPkts and ifOutNUcastPkts have been deprecated and been replaced by ifOutBroadcastPkts/ifOutMulticastPkts
            - added some more MIBs that check CPU-load at 5 sec, 1 min and 5 min intervals
            - added another way of checking for available memory
            - added a description of the switch

            I attached the new file and the diff so you can see the changes.

            Hope you like the changes. :-)
            Attached Files

            Comment

            • efrain02
              Banned
              • Apr 2011
              • 81

              #51
              How do i install this script?

              Thanks in advance

              Comment

              • dima_dm
                Senior Member
                • Dec 2009
                • 2697

                #52
                Originally posted by efrain02
                How do i install this script?
                See http://www.zabbix.com/forum/showpost...8&postcount=11
                I added instruction in first post.
                Last edited by dima_dm; 21-07-2011, 11:03. Reason: I added instruction in first post.

                Comment

                • hefest
                  Junior Member
                  • Nov 2011
                  • 1

                  #53
                  Originally posted by doderlein
                  This is a great script dima_dm! It saved me a lot of work trying to add lots of cisco-switches to zabbix.

                  However, i did some changes to it that you might be interested in:
                  - added application-tags
                  - according to cisco, ifInNUcastPkts and ifOutNUcastPkts have been deprecated and been replaced by ifOutBroadcastPkts/ifOutMulticastPkts
                  - added some more MIBs that check CPU-load at 5 sec, 1 min and 5 min intervals
                  - added another way of checking for available memory
                  - added a description of the switch

                  I attached the new file and the diff so you can see the changes.

                  Hope you like the changes. :-)
                  +1
                  add this features to main stream versions.

                  PS: you have a bug, please correct that

                  --- cisco_xml.pl~ 2011-11-11 11:23:26.000000000 +0100
                  +++ cisco_xml.pl 2011-11-11 11:29:43.217829774 +0100
                  @@ -178,7 +178,7 @@
                  <multiplier>0</multiplier>
                  <delta>0</delta>
                  <formula>1</formula>
                  - <snmp_community>alboxen</snmp_community>
                  + <snmp_community>$cstring</snmp_community>
                  <snmp_oid>.1.3.6.1.2.1.1.1.0</snmp_oid>
                  <snmp_port>161</snmp_port>
                  <applications>
                  Last edited by hefest; 11-11-2011, 12:30.

                  Comment

                  • ericgearhart
                    Senior Member
                    • Jan 2009
                    • 115

                    #54
                    Originally posted by hefest
                    +1
                    add this features to main stream versions.
                    First off thanks for the script... this is brilliant, and "SNMP walking" devices and dynamically figuring out port names is the one thing I miss in Zabbix that I'd grown used to in Cacti.

                    That being said, dynamic port descriptions, adding interface descriptions to graphs, etc etc are have been added to Zabbix 2.0... check these links out:



                    http://www.zabbix.com/documentation/..._of_snmp_oid_s

                    I agree though, this script can essentially close the "ZBXNEXT-10" bug that's open if it's merged into Zabbix (specifically a command line way to add devices/items).

                    Maybe good documentation (in the wiki) along with the script would help push it into mainstream Zabbix?

                    Comment

                    • rcpilot007
                      Junior Member
                      • Feb 2012
                      • 3

                      #55
                      Error importing template

                      Originally posted by Alex_D
                      I had problems with template import in zabbix 1.8.2. At import I receive an error

                      Code:
                      Error in query [INSERT INTO items (itemid,description,key_,hostid,delay,history,status,type,snmp_community,snmp_oid,value_type,data_type,trapper_hosts,snmp_port,units,multiplier,delta,snmpv3_securityname,snmpv3_securitylevel,snmpv3_authpassphrase,snmpv3_privpassphrase,formula,trends,logtimefmt,valuemapid,delay_flex,params,ipmi_sensor,templateid,authtype,username,password,publickey,privatekey) VALUES (22680,'sysUpTime','sysUpTimeInstance',10054,180*5,5,0,4,'asiacom','1.3.6.1.2.1.1.3.0',3,0,'localhost',161,'sec',1,0,'',0,'','','0.01',Templates,'',0,'','','',0,0,'','','','')] [Unknown column 'Templates' in 'field list']
                      Internal zabbix error
                      How I can solve this problem?
                      I start a script in a following format

                      ./cisco_xml.pl Hostname HostIP 75 5 public 5 lab-cisco

                      I think that not correctly I transfer parameters to a script, because parametrs in this version of a script are:

                      Code:
                      Usage: $0 HOSTNAME IP [PORTLOAD] [MEMLOAD] [COMMUNITY] [History] [Trends] [MINUTES] [FocusOn] [FocusedPortMinutes] [NormalPortMinutes] [PortStatus] [GROUPS]\n"
                      I use last version of a script. Prompt, please that each parameter there means, except Hostname, HostIP and lab-cisco.
                      I have the same problem, help me understand ..

                      Comment

                      • r0k5t4r
                        Member
                        • Jun 2009
                        • 91

                        #56
                        Nice Script. Works great on Zabbix 1.8.10. But I have one problem where a 8Gbit Port-channels speed is shown as only 4.29Gbit. Probably I have to use a different counter?

                        Comment

                        • r0k5t4r
                          Member
                          • Jun 2009
                          • 91

                          #57
                          Fixed it. I knew there was something to the interface speed if it is above 4gbit:

                          If the bandwidth of the interface is greater than the maximum value reportable by this object then this object should report its maximum value (4,294,967,295) and ifHighSpeed must be used to report the interace's speed.



                          I changed it to HighSpeed and used custom mutliplierf 1.000.000

                          Comment

                          • dima_dm
                            Senior Member
                            • Dec 2009
                            • 2697

                            #58
                            Originally posted by r0k5t4r
                            I changed it to HighSpeed and used custom mutliplierf 1.000.000
                            See description on ifHighSpeed
                            An estimate of the interface's current bandwidth in units
                            of 1,000,000 bits per second. If this object reports a
                            value of `n' then the speed of the interface is somewhere in
                            the range of `n-500,000' to `n+499,999'
                            . For interfaces
                            which do not vary in bandwidth or for those where no
                            accurate estimation can be made, this object should contain
                            the nominal bandwidth. For a sub-layer which has no concept
                            of bandwidth, this object should be zero.

                            Comment

                            • r0k5t4r
                              Member
                              • Jun 2009
                              • 91

                              #59
                              Somehow I can't edit all items on a template created by the script. There are more than 4000 items shown but when I click on edit I can only go as for as 20 Pages.

                              Where is the rest of the items?

                              Comment

                              • dima_dm
                                Senior Member
                                • Dec 2009
                                • 2697

                                #60
                                Originally posted by r0k5t4r
                                Somehow I can't edit all items on a template created by the script. There are more than 4000 items shown but when I click on edit I can only go as for as 20 Pages.

                                Where is the rest of the items?
                                You can change:
                                Administration ->General->GUI->Max count of elements to show inside table cell
                                Administration ->General->GUI->Search/Filter elements limit
                                Profile->Rows per page
                                or
                                Modify cisco_xml.pl or generated XML file befor import operation.
                                Last edited by dima_dm; 27-02-2012, 15:29.

                                Comment

                                Working...