Ad Widget

Collapse

Create Template for 1.4.5

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kanour
    Senior Member
    • May 2006
    • 105

    #1

    Create Template for 1.4.5

    Hi.

    I would like to share my script which creates templates which then can be imported in Zabbix.
    I am not professional programmer, however the script is tested and will include more error checking shortly.

    This script will create template in no time.


    Just run the script READ!!! (make sure you have properly configured the end devices for snmp view and community string)

    # Features
    ####################################
    # Simple user input just run the script and it will ask you for everything.
    # Scans for MIB and creates Zabbix Template in /tmp/zabbix-template dir
    # User can scan for more OIDs which are added to one template.
    # Automatically assigns some Value types to item in zabbix.
    # Some items are automatically assigned (see function "f_formatItemVariables"):
    # ifInOctets (bps,delta speed/s)
    # ifSpeed (bps)
    # *UpTime* (uptime, multiplier 0.01)
    # -->more to follow

    Requirements:
    net-snmp and standard Linux distribution (I will clarify later)

    Comments welcome. Especially in regards to bash scripting. I am more beginner and I will be improving the script.

    Have a good day.

    Anyway, here is md5sum - just in case.
    63427d6d708cfc034e7d8c2c25b9f250
    (snmpwalk-to-template-v4.sh.gz)
    Attached Files
    Last edited by kanour; 14-07-2008, 14:06. Reason: adding md5sum on the attachement
  • just2blue4u
    Senior Member
    • Apr 2006
    • 347

    #2
    Hmm... I just flew over your code, looks really good on first sight!

    Just one (really) little thing that catched my eyes:
    Maybe you want to change "reply" to "replies" on line 224.
    That would make it grammatically correct )
    Big ZABBIX is watching you!
    (... and my 48 hosts, 4513 items, 1280 triggers via zabbix v1.6 on CentOS 5.0)

    Comment

    • kanour
      Senior Member
      • May 2006
      • 105

      #3
      Thanks - md5sum on the file

      Hi.

      Thanks. I will do changes tomorrow, so I will fix it.
      Please let me know how the script worked for you. I am using it on all devices on our network and I am very happy with it. It let me create any combinations of MIB which I can quickly upload to Zabbix. More over if I enter same template name as I already have, then the import adds new items to current template.

      Anyway, here is md5sum - just in case.
      63427d6d708cfc034e7d8c2c25b9f250
      (snmpwalk-to-template-v4.sh.gz)

      Comment

      Working...