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. API IN C for agent communication

API IN C for agent communication

Scheduled Pinned Locked Moved Support
8 Posts 3 Posters 28.9k 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.
  • O
    O
    ophelie6989
    wrote on last edited by
    #1

    Hello,

    I want to know if there is an API in C to develop our own communication channel with the agents. I mean, without using the dashboard. We have a custom application (for customer use) which does snmp requests to collect information on servers/workstations and we want to use the data collected by GFI Max agents to get more detailed informations that we cannot collect with snmp (like hard drive usage, services running, etc...). Is there a way to do that ? Will there be a way to do that in the future ?

    Thanks,

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

      Hello!

      API is available, but for C++, not plain C. You will need libnxsrv and all it dependencies to use it. API is not documented, but is very straightforward:

      1. You should create object if class AgentConnection;
      2. Call Connect() method for it;
      3. Call GetParameter() method to retrieve data from agent (you can call GetParameter multiple times to retrieve multiple parameters);
      4. Destroy connection object.

      There are command line tool called nxget which can be used to retrieve data from agents. You can use nxget's source code as a reference to build your own communication tool.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • O
        O
        ophelie6989
        wrote on last edited by
        #3

        Ok thanks.

        Do you know if we can use this libnxsrv library on openBSD ? If so, i guess we can download it. It would be great.

        Thank you

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

          Yes, it should work on OpenBSD.

          Best regards,
          Victor

          1 Reply Last reply
          0
          • O
            O
            ophelie6989
            wrote on last edited by
            #5

            Ok, i'll look into it. The thing is, when we install agents, for example agent for Windows x86, during setup it asks for IP address of NetXMS server. But I just want to install the agent and communicate with it, without going through any NetXMS server. Is it possible ?

            1 Reply Last reply
            0
            • A
              A
              Alex Kirhenshtein
              wrote on last edited by
              #6

              It's required to generate initial configuration file for an agent, to set access control settings - basically it's an address which is allowed to get data from the agent.

              Check nxagentd.conf sample (provided in distribution, you can take a look at https://svn.netxms.org/public/netxms/trunk/contrib/nxagentd.conf-dist), especially parameters: Server, ControlServers, and MasterServers.

              1 Reply Last reply
              0
              • O
                O
                ophelie6989
                wrote on last edited by
                #7

                Ok. Sorry for my misunderstanding. I just installed the agent and my (last) question is : if I configured the nxagentd.conf by myself, will I be able to communicate with the agent without installing the NetXMS Server and Console ?
                (for example I will put the IP address of the server running my own application in Servers and ControlServers fields).
                (I can see the agent running as a Windows Service and during the setup, I left the NetXMS Server field blank, so I guess I should be able to talk to the agent now..)

                Thank you again,

                1 Reply Last reply
                0
                • A
                  A
                  Alex Kirhenshtein
                  wrote on last edited by
                  #8

                  Yes, you do not need server or console in this case.

                  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