Ad Widget

Collapse

Export function for inventory

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tux
    Junior Member
    • Jan 2010
    • 15

    #1

    Export function for inventory

    Hi,

    for a larger system enviroment it would be cool, to have an option for export the inventory as csv or xls. also a great benefit would be, to let the customer/user choose the fields to export.
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    That could easily be done via the API or by querying the database directly.
    Anyhow, maybe you want to file a ZBXNEXT request.

    Comment

    • Pavels
      Member
      • Oct 2011
      • 83

      #3
      I wouldn't recommend querying the database directly. Using the API is a better approach. You can retrieve host inventory data using the host.get method



      Check out this blog post for a quick introduction to the zabbix API
      Zabbix API starts to play significant role especially when it comes to integration of Zabbix with third-party software like configuration and incident management systems as well as for automation of routine tasks. It is incredibly difficult to manage monitoring of thousands of hosts without some automation in place. The API was introduced in Zabbix 1.8 […]

      Comment

      • sles
        Member
        • Oct 2005
        • 80

        #4
        Hello!

        We have the same task- to export inventory data.
        May be there is already working solution?
        Thank you!

        Comment

        • rjj
          Junior Member
          • Jun 2013
          • 2

          #5
          I've posted a patch (for ver. 2.2.3) that resolves this issue here

          Comment

          • angboontiong
            Junior Member
            • Nov 2014
            • 10

            #6
            Originally posted by rjj
            I've posted a patch (for ver. 2.2.3) that resolves this issue here
            can you share how to integrate this?
            i am new user btw...

            Comment

            • BDiE8VNy
              Senior Member
              • Apr 2010
              • 680

              #7
              Originally posted by angboontiong
              can you share how to integrate this?
              i am new user btw...
              For instance like this:
              Code:
              # cd /usr/share/zabbix
              # patch < /path/to/export-inventories-to-csv.patch

              Comment

              • icarus
                Junior Member
                • Jul 2014
                • 3

                #8
                Patch Failed

                patching file hostinventories.php
                Hunk #1 FAILED at 23.
                Hunk #2 FAILED at 219.
                2 out of 2 hunks FAILED -- saving rejects to file hostinventories.php.rej
                can't find file to patch at input line 92
                Perhaps you should have used the -p or --strip option?
                The text leading up to this was:
                --------------------------
                |diff --git a/include/views/inventory.host.list.php b/include/views/inventory.host.list.php
                |index af310fb..7b0f99c 100644
                |--- a/include/views/inventory.host.list.php
                |+++ b/include/views/inventory.host.list.php
                --------------------------
                File to patch: hostinventories.php
                patching file hostinventories.php
                Hunk #1 FAILED at 23.
                1 out of 1 hunk FAILED -- saving rejects to file hostinventories.php.rej

                Comment

                Working...