I'm curious if anyone can provide any details about the Settings parameter of the MonitorAdd and MonitorEdit methods within the ipMonitor 7.0 configuration interface?
I have been successful at requesting information from the SOAP API using PHP and NuSoap.
Below is a sample of my code:
require_once('nusoap-php5-0.9/lib/nusoap.php');
$wsdl="ipm7config.wsdl"; // local copy of wsdl with last line of wsdl updated to my IP Monitor server <soap:address location="http://[my server ip]/soap/config.asmx" />
$client=new soapclientNusoap($wsdl, true);
$result = $proxy->MonitorListDesc(null); // provides a list of all monitors
$result = $proxy->MonitorView(array('mon_id'=>'1000000')); // provides monitor details for the selected monitor id
// Here I form an array type similar to the output of MonitorView
$SETTINGS['monitor']['id'] = "1000000";
$SETTINGS['monitor']['typeid'] = "6";
$SETTINGS['monitor']['parentid'] = "300022";
$SETTINGS['monitor']['nv']['ui']['name'] = "My Monitor - HTML - ID# 999";
$SETTINGS['monitor']['nv']['addr'] = "192.168.0.1";
$SETTINGS['monitor']['nv']['port'] = "80";
$SETTINGS['monitor']['nv']['url'] = "/";
$SETTINGS['monitor']['nv']['search'] = "my search term";
$SETTINGS['monitor']['nv']['retvalue'] = "0";
$SETTINGS['monitor']['nv']['failiffound'] = "false";
$SETTINGS['monitor']['notifyfailures'] = "2";
$SETTINGS['monitor']['maxalerts'] = "65535";
$SETTINGS['monitor']['maxtest'] = "10";
$SETTINGS['monitor']['testing']['up'] = "60";
$SETTINGS['monitor']['testing']['warn'] = "2";
$SETTINGS['monitor']['testing']['down'] = "2";
$SETTINGS['monitor']['testing']['lost'] = "2";
$SETTINGS['monitor']['stats']['enabled'] = "true";
$SETTINGS['monitor']['enabled'] = "true";
$result = $proxy->MonitorEdit(array('Settings'=>$SETTINGS));
To date, I've been unable to get the MonitorAdd or MonitorEdit method call to successfully return. I'm confident it's due to the fact that I have not set up the struct Settings parameter correclty. The API documentation is weak and it lacks any details on formatting the settings parameter. I've even tried to send in an XML string for Settings to no avail like below. I've contacted Solar Winds and spoke to Chris Foley but their stand reply is we don't support the API anymore. All I need to know is how the Settings parameter needs to be passed into the MonitorAdd or MonitorEdit methods!!!!
<monitor>
<id>1000000</id>
<typeid>6</typeid>
<parentid>300022</parentid>
<nv>
<ui>
<name>My Monitor - HTML - ID# 999</name>
<server></server>
</ui>
<retvalue>0</retvalue>
<cred>
<monitoring></monitoring>
<alerting></alerting>
</cred>
<addr>192.168.0.1</addr>
<port>80</port>
<url>/</url>
<search>my search term</search>
<failiffound>false</failiffound>
<follow>false</follow>
<headrequest>false</headrequest>
<useproxy>false</useproxy>
</nv>
<testing>
<up>60</up>
<warn>2</warn>
<down>2</down>
<lost>2</lost>
</testing>
<stats>
<enabled>true</enabled>
</stats>
<enabled>true</enabled>
<maxtest>10</maxtest>
<notifyfailures>2</notifyfailures>
<maxalerts>65535</maxalerts>
</monitor>