Ad Widget

Collapse

Visible Name

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DSL
    Junior Member
    • Aug 2013
    • 2

    #1

    Visible Name

    Good morning,

    I set the Discovery of Zabbix and bringing multiple hosts being added normally.

    SNMPv2 agent ".1.3.6.1.2.1.1.1.0"
    SNMPv2 agent ".1.3.6.1.2.1.1.5.0"
    ICMP ping

    Device uniqueness criteria: IP address.
    Active.

    You can automate the Zabbix to add the host, also add the information from the Visible Name field with the OID SNMPv2-MIB :: sysName.0 = STRING: Test Client MikroTik?

    How?

    I'm not using Zabbix agent, I am collecting only via SNMP.
    I'll have to manually add the visible name of each Mikrotik router I have?

    Thank you!
  • tfqzab
    Member
    • Apr 2011
    • 51

    #2
    I also met this question,have'nt found solution yet.
    it is useful for we usually give a name to our network device,so i hope we dont need to type a name again to the host in the zabbix-frontend.

    Comment

    • sbusko
      Junior Member
      • May 2015
      • 2

      #3
      New to Zabbix and also in a similar situation with SNMP as the other two users. Looking for a solution ...

      Comment

      • JeromeB
        Junior Member
        • Nov 2014
        • 5

        #4
        Network discovery

        As of 2.2 (I'm not sure about 2.4) there were only 2 ways a network discovery process would name a discovered host.
        With the IP address.
        Zabbix does a nslookup against the ip address when doing network discover so, if it's nameserver has a enter for the IP it will use that as the host hame.

        I don't believe there is any way to use SNMP info to name a discovery host

        Comment

        • sbusko
          Junior Member
          • May 2015
          • 2

          #5
          After not finding an existing solution, I researched the API and built a script to solve my situation. Direct the SNMP output to the inventory->name field. With a little modification, it hopefully can help others too.

          Enjoy - Steve
          - - - - - - 8< - - - - - - 8< - - - - - - 8< - - - - - - 8< - - - - - -

          #!/usr/bin/python

          from pyzabbix import ZabbixAPI

          URL = 'http://zabbix.com/zabbix/api_jsonrpc.php'

          # init the API and Authenticate
          zapi = ZabbixAPI(URL,timeout=5)
          zapi.login(USER, PSWD)

          # Get all hosts in a specific Template
          for hosts in zapi.host.get(
          output=['extend'],
          templateids=[11111],
          selectInventory=['name']
          ):
          print hosts['hostid'], "-", hosts['inventory']['name'] # For testing
          # Update the host's visible name as taken from the inventory
          zapi.host.update(
          hostid=hosts['hostid'],
          name=hosts['inventory']['name']
          )

          Comment

          • syntax53
            Member
            • Mar 2018
            • 40

            #6
            FYI, here is the script I wrote for updating the visible name from the inventory and a couple other things via the API and python: https://pastebin.com/DvcWyC5r

            Comment

            Working...