Ad Widget

Collapse

Inventory in Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rogernms
    Junior Member
    • Apr 2010
    • 4

    #1

    Inventory in Zabbix

    Hi all

    I need to know if there is a way to zabbix create automatic informations in inventory.

    Thanks!!
  • alixen
    Senior Member
    • Apr 2006
    • 474

    #2
    Hi,
    Originally posted by rogernms
    I need to know if there is a way to zabbix create automatic informations in inventory.

    The only way would be to use the API introduced in 1.8.
    See the documentation for details http://www.zabbix.com/documentation/1.8/api
    You can also search the forum, there are a few threads on client libraries based on this API written in Ruby or PHP.

    Regards,
    Alixen
    http://www.alixen.fr/zabbix.html

    Comment

    • rogernms
      Junior Member
      • Apr 2010
      • 4

      #3
      Originally posted by alixen
      Hi,



      The only way would be to use the API introduced in 1.8.
      See the documentation for details http://www.zabbix.com/documentation/1.8/api
      You can also search the forum, there are a few threads on client libraries based on this API written in Ruby or PHP.

      Regards,
      Alixen
      Thanks Alixen

      But one of my questions is, how to make this? i'm not a developer, i need something simple, if this solution is simple please help me.

      I don't want use another solution, as Zabbix can do so much things, i want to use his inventory too, but automatically.

      Thanks.

      Comment

      • nelsonab
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2006
        • 1233

        #4
        Presently there is no documented way to manipulate inventory information with the API. I agree that in time this would be fantastic to have available via the API. When that happens the Ruby library and Zabcon will support it, there might be some feature lag however.
        RHCE, author of zbxapi
        Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
        Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

        Comment

        • rogernms
          Junior Member
          • Apr 2010
          • 4

          #5
          Originally posted by nelsonab
          Presently there is no documented way to manipulate inventory information with the API. I agree that in time this would be fantastic to have available via the API. When that happens the Ruby library and Zabcon will support it, there might be some feature lag however.

          OK, so do i have to enter manually the information in Zabbix Inventory? the agent doesn't collect this?

          i just want only this.

          Thanks for the informations.

          Comment

          • nelsonab
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Sep 2006
            • 1233

            #6
            All is not lost, just a little more... challenging. :-D

            The agent cannot gather inventory data at this time, plus gathering such information can be challenging from a programming perspective sometimes, though things have improved over the last few years.

            You might want to see if import/export may be able to handle the inventory data, my guess is no, but it's possible my hunch is wrong. You can also write some of your own scripts and pump the data directly into the DB. If you go that route you will need to study up on the schema to make sure the data is inserted properly.
            RHCE, author of zbxapi
            Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
            Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

            Comment

            • alixen
              Senior Member
              • Apr 2006
              • 474

              #7
              Hi,

              Originally posted by nelsonab
              All is not lost, just a little more... challenging. :-D

              The agent cannot gather inventory data at this time, plus gathering such information can be challenging from a programming perspective sometimes, though things have improved over the last few years.
              There are other open source projects that have agents that know how to collect inventory information. http://www.ocsinventory-ng.org/ is one of them.

              If Zabbix agent had a way to forward to Zabbix server data collected by OCS-Inventory agent, it could be a way to automatically populate inventory data in Zabbix.

              However, right now, there is no way to automatically populate inventory even when data is available as an item (machine type or serial number are often available using SNMP or some Zabbix agent user parameter).

              Originally posted by nelsonab
              You might want to see if import/export may be able to handle the inventory data, my guess is no, but it's possible my hunch is wrong. You can also write some of your own scripts and pump the data directly into the DB. If you go that route you will need to study up on the schema to make sure the data is inserted properly.
              After checking it, the only way to automate inventory management is to directly access the DB.

              In fact, inventory management in Zabbix needs to be vastly improved:
              - There are two types of inventory ("standard profile" and "extended profile") that don't mix together : "extended" profile doesn't extend "standard" one, you need to choose which one to use.
              - You can't choose what information is visible in inventory reports
              - As said before, you can't automatically populate inventory with collected information
              - You can't access inventory information as an item and use it in triggers (I have done it for HW maintenance expiration through external scripts, it could be easier)
              - You can't import/export inventory via XML
              - You can't import/export inventory via API
              - Inventory is not documented
              (I'll stop here, that's enough ranting...)

              Regards,
              Alixen
              http://www.alixen.fr/zabbix.html

              Comment

              • nelsonab
                Senior Member
                Zabbix Certified SpecialistZabbix Certified Professional
                • Sep 2006
                • 1233

                #8
                OCS Inventory is a pretty good program. I'm using GLPI which is a derivative of OCS and am finding it quite useful. I would love to see GLPI and Zabbix integrate together in the future.
                RHCE, author of zbxapi
                Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
                Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

                Comment

                • Murilex
                  Senior Member
                  • Nov 2009
                  • 124

                  #9
                  Another very good open source program that address the inventory management process is CMDBuild (http://www.cmdbuild.org/), but it doesn't have agents to update inventory db automatically. Following the same idea of OCS inventory (including the agents) there is a Brazilian governmental project named Cacic (http://www.softwarepublico.gov.br/ver-comunidade?community_id=3585).
                  I think this is not part of CIA goals, but would be very interesting if zabbix agents collected inventory information on hosts, forwarded these data to zabbix server and the zabbix server populated an external CMDB (like OCS, CMDBuild, Cacic...) or a more improved internal CMDB.

                  Comment

                  Working...