Submitting a passive check using a curl command
Posted: Tue Apr 25, 2017 4:14 pm
I am trying to test submitting a check to NRDP using a curl command. Here is what I constructed and ran manually as a test:
curl -X POST --data-urlencode 'token=wspwebfarm&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\''><hostname>VHLPNWSAS001</hostname><servicename>GWS_Timeouts</servicename><state>0</state><output>Ok|timeouts=0</output></checkresult></checkresults>' http://vhlgnngxi001.tvlport.net/nrdp
Here is a reply back:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://vhlgnngxi001.tvlport.net/nrdp/">here</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at vhlgnngxi001.tvlport.net Port 80</address>
</body></html>
What am I doing wrong? Please help.
curl -X POST --data-urlencode 'token=wspwebfarm&cmd=submitcheck&XMLDATA=<?xml version='\''1.0'\''?><checkresults><checkresult type='\''service'\''><hostname>VHLPNWSAS001</hostname><servicename>GWS_Timeouts</servicename><state>0</state><output>Ok|timeouts=0</output></checkresult></checkresults>' http://vhlgnngxi001.tvlport.net/nrdp
Here is a reply back:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://vhlgnngxi001.tvlport.net/nrdp/">here</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at vhlgnngxi001.tvlport.net Port 80</address>
</body></html>
What am I doing wrong? Please help.