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

[http_check] Fix status type err. in service check #1644

Merged
merged 1 commit into from
May 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion checks.d/http_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _load_conf(self, instance):
tags = instance.get('tags', [])
username = instance.get('username')
password = instance.get('password')
http_response_status_code = instance.get('http_response_status_code', "(1|2|3)\d\d")
http_response_status_code = str(instance.get('http_response_status_code', "(1|2|3)\d\d"))
timeout = int(instance.get('timeout', 10))
config_headers = instance.get('headers', {})
headers = agent_headers(self.agentConfig)
Expand Down
3 changes: 2 additions & 1 deletion conf.d/http_check.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ instances:
# password: pass

# The (optional) http_response_status_code parameter will instruct the check
# to look for a particular HTTP response status code.
# to look for a particular HTTP response status code or a Regex identifying
# a set of possible status codes.
# The check will report as DOWN if status code returned differs.
# This defaults to 1xx, 2xx and 3xx HTTP status code: (1|2|3)\d\d.
# http_response_status_code: 401
Expand Down