I have only been using solarwinds for a short time and I am not a great programmer, but I have successfully added new nodes into solarwinds, I'm feeling pretty confident about adding pollers and discovering / adding interfaces.
However I need some help adding a node into NCM.
I am trying to use the following request to add Node ID 11985 into NCM.
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_PORT => "17778",
CURLOPT_URL => "https://SERVERIP:17778/SolarWinds/InformationService/v3/Json/Invoke/Cirrus.Nodes.AddNodeToNCM",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "\"11985\"",
CURLOPT_HTTPHEADER => array(
"authorization: Basic REMOVED",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
This was processed from the Insomnia REST client.
I receive the following error:
"Expecting state 'Element'.. Encountered 'Text' with name '', namespace ''. "
Please help me understand how to use this API method.
Thanks,
Matt