Ad Widget

Collapse

Advice on making Zabbix Inventory more dynamic to each host

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • greavette
    Member
    • Jul 2015
    • 82

    #1

    Advice on making Zabbix Inventory more dynamic to each host

    Hello All,

    I've found this zabbix request - https://support.zabbix.com/plugins/s...ue/ZBXNEXT-336

    That talks about inventory already. And I can see that this is unresolved and unassigned.

    So I'm looking for suggestions from this community on other options. I'm looking to be able to use Zabbix Inventory to keep stock of all our disks for each physical server (some servers have 2 and others have 12 or more), I want to keep track of the Ram and DIMM slots in each host as well (again, servers differ in how much they have). Zabbix works pretty great for our Inventory of our virtual machines...but I want to expand what Zabbix can do for us with regards to all IT inventory (virtual and physical). I guess I could hack the php code and add in 24 fields for disks to handle any type of server...looks messy though. I'm hoping to find a more dynamic solution whereby for each Zabbix Host in Configuration I can specify the Inventory Fields I need.

    I'm not exactly looking for the core developers to take on this work. But is there a way to add functionality to Zabbix myself (modules, plugins, etc) that would give me what I need? Something I can add in myself and keep up to date?

    Thank you.
  • Linwood
    Senior Member
    • Dec 2013
    • 398

    #2
    You could just make them items that are infrequently polled and query the SQL to get their values, instead of trying to feed inventory fields.

    For disks and such you would want to use LLD anyway, and LLD item prototypes can't feed inventory either.

    Comment

    • greavette
      Member
      • Jul 2015
      • 82

      #3
      Thank you for the reply.

      I would still be monitoring my disks using LLD, this is true. But I was hoping to have the ability, even if it's a manual task, to inventory my hardware like Ram and Disk (date of install, serial number..etc) on my Inventory tab of Zabbix. One stop shopping for all things inventory in our server room by hardware host.

      As for your suggestion, I'm sorry but I don't quite understand what you are saying...So I would add each disk as an item in the host configuration. So if my server had 12 disks I would add in 12 items. Do I add these 12 to the host config, or do I add these 12 items to the template used to monitor that host? What detail would I be able to get from adding them as items? Then to get the values I want on each disk for inventory purposes I would query the SQL database for the details on each item?

      Have I understood you correctly?

      Is there no way I could extend Zabbix myself through a module or building my own plugin/addon that would allow me to modify the Inventory tab for each host so it's a custom set of items I'm capturing for that host?

      Thank you.

      Comment

      • Linwood
        Senior Member
        • Dec 2013
        • 398

        #4
        Well, first you can use the inventory fields any way you like in the actual inventory module, so if you wanted to put (makign this up) RAM configuration in one of the fields for OS Versions you could (it would be confusing obviously).

        A lot of the things you may want to monitor are accessible via SNMP or the Zabbix Agent. As two examples, consider device serial numbers - most people have some item in some template that pulls those and populates the inventory field. Easy.

        But consider disk drives. Say you wanted an inventory of all disk drives, and where installed. Low Level Discovery (LLD) is a great way to take such an inventory, and is built into lots of templates. Those will automatically populate inventory information of a sort in terms of item contents -- size of drive, space used, etc. Depending on the method of gathering it you might even get serial numbers or manufacturer. That information, however, does not "fit" into the automatically gathered inventory field, since as far as I know you cannot have an item prototype (the thing that LLD uses to create an item) populate an inventory field. Nor are the inventory field multi-valued generally.

        But... you can query item contents in the Latest Data screen, maybe (though I do not recall) the API, and certainly in SQL directly against the database (though it is a bit obscure how to query it fast, since it resides in a history table with a time key but there is no "last" value directly accessible).

        So you COULD if you wanted to write a query that found each host, and searched for the last data item in history (or history_str or history_uint) for each item that related to the information of interest, e.g. size. This could produce a simple report outside of zabbix. You could also in theory create a php program as a web page to extend zabbix and do the same, and have it appear in zabbix's UI (I've never done that myself, I usually just stop with the output of a SQL query).

        The real problem is that zabbix' inventory is a bit half-done. That's not a criticism, exactly, I do not think it is intended to be a do-it-all. That's hard. Netdisco for example does a dynamite job of cisco inventory - modules, serial numbers, IOS versions, etc. But nothing for configuration management. Rancid does a great job of that, but isn't good for telling you something like modules installed or IOS versions (in any easy to summarize way). Insight and Dell Open Manage are good for hardware inventory of HP and Dell servers, but won't do much for Sun. Then there's the whole world of SAN that might have yet different management environments. Pulling this all together without really expensive software is always a jigsaw puzzle. My suggestion is use Zabbix inventory for what it does well, query Zabbix for LLD discovered items, and use something else for other parts (including sometimes Excel ).

        Comment

        • greavette
          Member
          • Jul 2015
          • 82

          #5
          Thank you very much Linwood for taking the time to answer my questions. I very much appreciate your input and thoughts into this question.

          I was hoping for a way to dynamically add into the Inventory tab the extra fields I needed so I could, even manually, keep inventory of my physical machines.

          Very good points though on many things I would want to monitor can be captured through the Zabbix agent. Querying SQL directly would give me theses details I need. My programming skills are somewhat limited so I too would be limited to using a SQL query.

          My current Excel Spreadsheet has been doing just fine up to now. I will continue to use Zabbix for the Inventory it does provide...and as a monitoring program Zabbix is a champ so it not being able to do all my inventory needs is not a deal breaker for me.

          Thanks again for you opinions and suggestions.

          Comment

          Working...