[Reconnoiter-users] adding checks with the rest interface

Theo Schlossnagle jesus at omniti.com
Fri Mar 25 16:08:16 EDT 2011


The "xml parse error" only happens with libxml2 fails to parse the input.

I believe (speculating here) that -d treats your input as POST data...
so it gets encoded.

What you need to do it script it (in a libcurl accessibly language) or
put the xml in a file and use -T with your -X PUT.

On Fri, Mar 25, 2011 at 2:17 PM, Thom May <thom at clearairturbulence.org> wrote:
> Hi,
> I'm trying to add checks via the rest interface, but I can't seem to
> make it work, and I can't find any logging for the rest interface
> either. (I'll admit I've not delved into the source, nor have I got to
> stracing noit).
>
> Trying with curl:
> curl -k -E stratcon.crt --key stratcon.key -H "Accept: text/xml" -d
> "<?xml version="1.0"
> encoding="utf8"?><check><attributes><module>http</module><name>http</name><target>1.2.3.4</target><period>60000</period><timeout>5000</timeout><filterset>default</filterset></attributes><config><url>https://some.url/</url><code>200</code></config></check>"
> -X PUT https://my.server:43191/checks/set/eu-west-1b/web/E98E865B-0946-4BB6-81E1-9E259FC14425
>
> I simply get the response:
>
> <?xml version="1.0" encoding="utf8"?>
> <error>xml parse error</error>
>
> as far as I can tell, that xml is valid.
> Any clues greatly appreciated!
> Cheers,
> -Thom
> _______________________________________________
> Reconnoiter-users mailing list
> Reconnoiter-users at lists.omniti.com
> http://lists.omniti.com/mailman/listinfo/reconnoiter-users
>



-- 
Theo Schlossnagle

http://omniti.com/is/theo-schlossnagle


More information about the Reconnoiter-users mailing list