Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

301/302 redirections and http_body_healthy_match #100

Open
sparanoid opened this issue Sep 25, 2021 · 1 comment
Open

301/302 redirections and http_body_healthy_match #100

sparanoid opened this issue Sep 25, 2021 · 1 comment

Comments

@sparanoid
Copy link

sparanoid commented Sep 25, 2021

When dealing with replica that has redirections:

curl -I https://experiments-alicdn.sparanoid.net/algolia.js
HTTP/1.1 302 Moved Temporarily
Date: Sat, 25 Sep 2021 13:28:37 GMT
Location: https://cdn.jsdelivr.net/algoliasearch/latest/algoliasearch.min.js
...

In Vigil config:

[[probe.service.node]]
id = "algolia-search"
label = "Algolia Search"
mode = "poll"
replicas = [
  "https://experiments-alicdn.sparanoid.net/algolia.js",
]
http_body_healthy_match = "algoliasearch"

The http_body_healthy_match will fall since the body are changed:

<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

That would be great if there's an option to follow directions.

@valeriansaliou
Copy link
Owner

Hello there!

Since Vigil is a monitoring system, was not built to follow redirections, rather to poll for an HTTP status code at the URL provided, and perform direct matching of this status code.

In that case you'd need either to monitor for 302 as a valid code, or configure your Vigil to monitor the new URL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants