Quantcast
Channel: THWACK: All Content - Orion SDK
Viewing all articles
Browse latest Browse all 2677

How to use API to connect agents

$
0
0

I'm trying to automate the creation of agents.  The following successfully creates an agent:

 

 

  #!/bin/bash

 

  data='{

  "Name"                 : "ahost",

  "Hostname"             : "ahost",

  "DNSName"               : "ahost.internal.qorvo.com",

  "IP"                   : "10.1.2.3",

  "OSVersion"             : "6.6",

  "PollingEngineId"       : 9,

  "ConnectionStatus"     : 0,

  "ConnectionStatusMessage"  : "Initial API insertion - connection pending",

  "AgentStatus"              : 0,

  "AgentStatusMessage"       : "Unknown",

  "Mode"                     : 0,

  "AutoUpdateEnabled"        : true

  }'

  curl --netrc --insecure -H "Content-Type: application/json" -d "$data" 'https://solarwinds.internal.qorvo.com:17778/SolarWinds/InformationService/v3/Json/Create/Orion.AgentManagement.Agent'

 

I've a vague feeling that I now need to use the "Deploy" verb where "Create" is above, but I can't find the data that needs to be posted (if I'm even guessing correctly).  Where should I look?  I started trying to read the powershell and C# code, but I don't speak either language, and it may take me a long time to learn both.


Viewing all articles
Browse latest Browse all 2677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>