monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

check URL with basic auth


From: Gerrit Kühn
Subject: check URL with basic auth
Date: Tue, 25 Aug 2015 16:48:18 +0200

Hi all,

I need to check the availability of a web page that requires basic auth.
The best thing I could come up with so far looks like this:

---
if failed url http://user:address@hidden:80/doc/Main_Display.html
then alert
---


This would probably work, but in my case both the username and the
password are empty (yes, I know that's stupid, but I cannot change it).
However, when using

---
if failed url http://:@192.168.160.111:80/doc/Main_Display.html then alert
---

monit complains about the syntax:

---
fe1 # monit -t
/etc/monit.d/host.conf:3: syntax error ':'
---

Please note that curl with --user set to ":" fetches this page just fine,
so I could go for an external script. However, it looks like this is merely
some kind of parsing issue. Is there a way to make the URL work inside
monit? My monit version is 5.12.2 (if that matters).


cu
  Gerrit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]