Table of Contents
This module exposes an API endpoint to allow users to run a check once in transient mode to return the results inline back to the client.
The check runs once however it behaves almost exactly like a /check/set
C
check_test.so
Example 5.1. Loading the check_test module.
This example loads the check_test module.
<noit>
<modules>
<generic image="check_test" name="check_test" />
</modules>
</noit>
POST/checks/testThis call accepts a document describing a check. In the same request, the check will execute and return the results back to the user. The check passes through the same validation as the /check/set PUT REST call. The check is marked as transient and won't appear in any persistent log streams.
On success, a HTTP 200 is returned and an XML documented that matches the
format of the /check/show REST command. It is a simpler set of
output as some of the results wouldn't make sense in this context.
Example 5.2. REST /checks/test XML input.
<?xml version="1.0" encoding="utf8"?>
<check>
<attributes>
<name>http</name>
<module>http</module>
<target>8.8.38.5</target>
<period>60000</period>
<timeout>5000</timeout>
<filterset>default</filterset>
</attributes>
<config>
<code>200</code>
<url>https://labs.omniti.com/</url>
</config>
</check>