How to monitor complex websites?
Rene Fertig
me at renux.de
Wed Jun 7 14:27:36 CEST 2006
Hi Richard.
> We need to monitor this website, but check_http cannot (afaik) send a
> specified User-Agent string. Is anybody aware of another solution, or
> should I create one? If the latter: I was thinking about creating a check
> based on wget, since wget is able to send User-Agent strings and can do
> something with cookies as well. Can someone with enough knowledge on this
> matter tell me if this is doable, or should I walk another path?
check_http version 1.89 (which comes with nagios-plugins 1.4.3) can set a
User-Agent-String:
-A, --useragent=STRING
String to be sent in http header as "User Agent"
But there's a problem with agent-names like "Mozilla/4.0 (compatible; MSIE
6.0; Windows NT 5.1; .NET CLR 1.1.4322)" - nagios didn't like the semicolon
';'. It seems, that everything after it is ignored (like a comment).
One solution for this can be to define a own macro (e.g. $USER3$) with the
escaped semicolon and then use this macro within the agent name, this should
help.
e.g.:
in resource.cfg:
$USER3$="\;"
in commands.cfg:
command_line $USER1$/check_http -H $HOSTADDRESS$ -A "Mozilla/4.0
(compatible$USER3$ MSIE 6.0$USER3$ Windows NT 5.1$USER3$ .NET CLR 1.1.4322)"
But probably you should make your own plugin if you need special cookie
support.
bye, Rene
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list