Thank you for your help. Your previous suggestion worked OK!
Now I have another question.
When I try to use mail format for an alert a syntax error is reported!!
The code I am using is:
check host vega address 172.16.0.19
if failed host vega port 80
send "GET /imagenes/desk2.jpg"
expect "OK"
then alert address@hidden mail-format { subject: Desk2.jpg }
I also tried the example:
if failed port 80 protocol http
and request "/monit/dist/monit-4.0.tar.gz"
with checksum f9d26b8393736b5dfad837bb13780786
then alert with mail-format { subject: Aaaalarm! }
Any ideas?
Thanks again.
Best wishes,
Isabel Reolón Álvarez
Soporte Basis y DB
Área Informática
Conaprole
Montevideo
Uruguay
-----Mensaje original-----
De: Martin Pala [mailto:address@hidden
Enviado el: jueves, 11 de marzo de 2004 15:05
Para: Ma. Isabel Reolon
CC: address@hidden; address@hidden
Asunto: Re: Monit version 4.1.1
Hi,
you can use send/expect statements - you only need to add authentication
to the header:
Authorization: Basic STRING
... where "STRING" is "user:password" encoded by base64
Example:
if failed host www.sol.no port 80
send "GET / HTTP/1.0\r\nAuthorization: Basic STRING\r\n\r\n"
expect "HTTP/[0-9\.]{3} 200 .*\r\n"
then alert
You can use multiple send/expect statements, another example (taken from
monit documentation):
if failed host cave.arabia.baz port 4040
send "Open, Sesame!\r\n"
expect "Please enter the cave\r\n"
send "Shut, Sesame!\r\n"
expect "See you later [A-Za-z ]+\r\n"
then restart
Cheers,
Martin
Ma. Isabel Reolon wrote:
Hello:
I am making the first tests using this software tool and I was wondering
if you could help me answering this question:
I would like to check a web application in order to see if it behaves as
expected not just seeing if the service actually responds.
The problem is that I would like to give a user name and a password and
see if the service responds authenticating the user...
Any idea of how this could be accomplished ?
Thanks,
Best regards,
Isabel Reolón Álvarez
Soporte Basis y DB
Área Informática
Conaprole
Montevideo, Uruguay