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

URLs always reporting down #39

Closed
sethryder opened this issue Jul 3, 2016 · 9 comments
Closed

URLs always reporting down #39

sethryder opened this issue Jul 3, 2016 · 9 comments

Comments

@sethryder
Copy link

sethryder commented Jul 3, 2016

Hello,

I am attempting to setup a check and it seems no matter what URL I give it it fails.

Here is my config:

{
        "api_url": "http://status.redacted-domain.com/api/v1",
        "api_token": "redacted-token",
        "insecure_api": true,
        "monitors": [{
                "name": "Google",
                "url": "http://www.google.com",
                "method": "get",
                "strict_tls": true,
                "interval": 60,
                "timeout": 10,
                "metric_id": 1,
                "component_id": 12,
                "threshold": 80,
                "expected_status_code": 200
        }],
        "system_name": "Node-1",
        "log_path": ""
}

If I CURL the address I do get a 200 back:

root@phobos:~/temp# curl -I http://www.google.com
HTTP/1.1 200 OK
Date: Sun, 03 Jul 2016 04:36:35 GMT
Expires: -1

Server output:

root@phobos:~/temp# ./cachet-monitor_linux_amd64 -c cachet.json
2016/07/03 00:36:20 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/cli/main.go:52: System: Node-1
API: http://status.redacted-domain.com/api/v1
Monitors: 1

2016/07/03 00:36:20 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:53:  Starting Google: 60 seconds check interval
 - GET http://www.google.com
2016/07/03 00:36:20 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:57:  - Expect HTTP 200
2016/07/03 00:36:20 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:63:  - Log lag to metric id 1
2016/07/03 00:36:20 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:66:  - Update component id 12

2016/07/03 00:36:21 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:175: Google 0.00%/80.00% down at 1467520581

Also when it reports down it reports:

Get http://www.google.com.com: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

Thanks for the help.

@sethryder
Copy link
Author

Ok, I was able to get it working with some pages, but it still has issues with a URL like this:

http://www.domain.com/catalogsearch/result/?q=test

Could it have something to do with the query string?

@gardner
Copy link

gardner commented Oct 25, 2016

I am getting the same error: Client.Timeout exceeded while awaiting headers

@gardner
Copy link

gardner commented Oct 25, 2016

Looks like a bug in go: golang/go#16094

@gardner
Copy link

gardner commented Oct 26, 2016

EDIT: I was using the 2.0 release binary

I have go version go1.7.3 darwin/amd64 locally

@nico01f
Copy link

nico01f commented Dec 7, 2016

Hi everyone.

The same issue it's happening to me.

2016/12/07 09:25:18 /Users/m/p/gospace/src/github.com/castawaylabs/cachet-monitor/monitor.go:175: DEC 5 0.00%/80.00% down at 1481113518

Any advice?

@moodhairboy
Copy link

does anyone have an answer for this issue? I also see the same thing on my install.

@moodhairboy
Copy link

Gardner - does this mean you downgraded to

EDIT: I was using the 2.0 release binary 1.7.3 from 2.0 to fix the problem?

I have go version go1.7.3 darwin/amd64 locally

@shaun-ba
Copy link

Also seeing this, thought it was because i had IP/port in my URL but i've tried various that all give 200 via cURL yet i'm always seeing "down" log.

@matejkramny
Copy link
Member

Latest release may have fixed this

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

6 participants