1753 |
the moment only the HTTP protocol supports the request option. |
the moment only the HTTP protocol supports the request option. |
1754 |
See also below for an example. |
See also below for an example. |
1755 |
|
|
|
|
|
1756 |
In addition to the standard protocols, the I<APACHE-STATUS> |
In addition to the standard protocols, the I<APACHE-STATUS> |
1757 |
protocol is a test of a specific server type, rather than a |
protocol is a test of a specific server type, rather than a |
1758 |
generic protocol. Server performance is examined using the status |
generic protocol. Server performance is examined using the status |
1807 |
|
|
1808 |
|
|
1809 |
B<send/expect: {SEND|EXPECT} "string" ...>. If monit does not |
B<send/expect: {SEND|EXPECT} "string" ...>. If monit does not |
1810 |
support the protocol spoken by the server, you can write your own |
support the protocol spoken by the server, you can write your |
1811 |
protocol-test using I<send> and I<expect> strings. The I<SEND> |
own protocol-test using I<send> and I<expect> strings. The |
1812 |
statement sends a string to the server port and the I<EXPECT> |
I<SEND> statement sends a string to the server port and the |
1813 |
statement compares a newline terminated string read from the |
I<EXPECT> statement compares a string read from the server |
1814 |
server with the string given in the expect statement. If your |
with the string given in the expect statement. If your system |
1815 |
system supports POSIX regular expressions, you can use regular |
supports POSIX regular expressions, you can use regular |
1816 |
expressions in the expect string, see regex(7) to learn more |
expressions in the expect string, see regex(7) to learn more |
1817 |
about the types of regular expressions you can use in an expect |
about the types of regular expressions you can use in an expect |
1818 |
string. Otherwise the string is used as it is. The send/expect |
string. Otherwise the string is used as it is. The send/expect |
1821 |
[{SEND|EXPECT} "string"]+ |
[{SEND|EXPECT} "string"]+ |
1822 |
|
|
1823 |
Note that monit will send a string as it is, and you B<must> |
Note that monit will send a string as it is, and you B<must> |
1824 |
remember to include CR and LF in the string sent to the server if |
remember to include CR and LF in the string sent to the server |
1825 |
the protocol expect such characters to terminate a string (most |
if the protocol expect such characters to terminate a string |
1826 |
text based protocols used over Internet does). Likewise monit |
(most text based protocols used over Internet does). Likewise |
1827 |
will read newline terminated strings from the server or up to 256 |
monit will read up to 256 bytes from the server and use this |
1828 |
bytes from the server and use this string when comparing the |
string when comparing the expect string. If the server sends |
1829 |
expect string. If the server sends strings terminated by CRLF, |
strings terminated by CRLF, (i.e. "\r\n") you I<may> remember |
1830 |
(i.e. "\r\n") you I<must> also remember to add the same |
to add the same terminating characters to the string you expect |
1831 |
terminating characters to the string you expect from the |
from the server. |
1832 |
server. Finally, send/expect can be used with TCP stream sockets |
|
1833 |
and UNIX sockets but B<not> with TCP udp sockets. |
You can use non-printable charachters in a send and an expect |
1834 |
|
string if needed. This option can be useful when testing some |
1835 |
|
protocols. To send a non-printable char, use the hex notation |
1836 |
|
such as \x0A in the string. |
1837 |
|
|
1838 |
|
Finally, send/expect can be used with any |
1839 |
|
socket type, such as TCP sockets, UNIX sockets and UDP sockets. |
1840 |
|
|
1841 |
|
|
1842 |
|
|
1843 |
B<timeout:with TIMEOUT x SECONDS>. Optionally specifies the |
B<timeout:with TIMEOUT x SECONDS>. Optionally specifies the |
1844 |
connect and read timeout for the connection. If monit cannot |
connect and read timeout for the connection. If monit cannot |