Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Create agent list for instance discovery?

Create agent list for instance discovery?

Scheduled Pinned Locked Moved Support
4 Posts 2 Posters 19.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    J
    jeffreyz
    wrote on last edited by
    #1

    I need to monitor a value that can be extracted from a database on a database server. This is easy to do with a DCI that uses a custom shell script that queries the database for the value to be monitored.

    However, the database server has, in fact, not one but approximately 60 databases. Each database has the same schema, so the same script can be used to monitor the value in question for each database. But I do not want to create 60 different DCIs manually, one for each database to be monitored. I would rather use instance discovery so that they can be created automagically for me.

    However, in order to use instance discovery for this case, it would appear to be necessary to do two things:

    1. Create a DCI based on my shell script that contains an {instance} parameter that accepts the name of a database on the server.
    2. Create an agent list that contains the names of all of the databases on the database server.

    Are both of these things possible? I am new to NetXMS and so far I have only come across built-in DCIs that accept {instance} parameters, as well as only pre-defined agent lists. I would be willing to code something up in Java, but I would need a few pointers on how to get started.

    I would appreciate any help to point me in the right direction, even if the answer is that this is not possible.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      You can create your own list on agent using ExternalList configuration option. Agent will execute command given and return all it's output as list elements. For example, to add list which will return all files in /tmp, add the following to nxagentd.conf:

      ExternalList = TemporaryFiles:/bin/ls /tmp
      

      Best regards,
      Victor

      1 Reply Last reply
      0
      • J
        J
        jeffreyz
        wrote on last edited by
        #3

        @victor said in Create agent list for instance discovery?:

        You can create your own list on agent using ExternalList configuration option. Agent will execute command given and return all it's output as list elements. For example, to add list which will return all files in /tmp, add the following to nxagentd.conf:

        ExternalList = TemporaryFiles:/bin/ls /tmp
        

        Bingo! It works like a charm. Thank you very much.

        Is "ExternalList" documented somewhere? It is not that I need more info, but I have not seen documentation that mentions this parameter and neither did a web search find anything. I would love to read more documentation, even if it were just source code.

        1 Reply Last reply
        0
        • V
          V
          Victor Kirhenshtein
          wrote on last edited by
          #4

          We implement it just recently, in 1.2.12, and it is not documented yet.

          Best regards,
          Victor

          1 Reply Last reply
          0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          Powered by NodeBB Contributors
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups