-
Notifications
You must be signed in to change notification settings - Fork 48
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
The URL is unreachable #20
Comments
I'm not sure why it's not working for you. How are you running it? If you're running through docker, could you please try this and send me the output?
Otherwise, could you please send me the command you're using to run it? |
I'm not running docker but debian. $ source bin/activate The script is running but got no positive result. |
I know this is a stupid question, but what do you get when you run this?
Also could you please send me the output of the following:
|
Here we go: $ curl -v google.com
$ source bin/activate: No output $ pip install -r requirements.txt:
$ python -c 'import requests; print requests.get("http://www.google.com").status_code':
|
What do you have in your configuration file? It should be working as you can clearly hit google. |
@mtakaki I am also getting the same issue"The URL is unreachable".Any solution .Also how can we pass parameters along with POST request ? |
@kirtiranjan not sure why it's failing for both of you. I just tested it and it's working fine. Could you please share your configuration file? |
@mtakaki here is my config file endpoint: |
@kirtiranjan I would start with a simple configuration and you add more criteria as you clear them off. For example, your timeout is 50ms. Is it enough? The HTTP status that google returns is I'll update the sample configuration to something that works right away. It seems that it's confusing and that may be leading you guys to this problem. |
Irrespective of what I do I am always getting "The URL is unreachable" |
If you look at the source code, an |
Howdy, I am also getting this issue. I am running the container pulled from dockerhub. I also tried doing a docker compose from the github and am getting the same thing. Config.yaml
If I docker exec into the container and curl -v www.google.com:
< HTTP/1.1 200 OK (there is some more junk after this that is just the web page) On the plus side, the container is correctly talking to the Cachet API and changing the status when I get the error: WARNING [2016-11-29 22:43:34,997] cachet_url_monitor.configuration.Configuration - The URL is unreachable: GET http://www.google.com |
I'm really not sure what's going on for you guys. I just pulled the docker image and it's working fine for me. Lemme do more tests here. |
Further information that might help, I have tested this both inside and outside of my companies VPN. Same results both ways. Lemme know if you need anything else, this seems like a pretty rad tool that'll save me a whole lot of time. |
Thanks, @waltrinehart! Could you please try removing the REGEX expectation? Also, could you please try going with a super simple configuration and then adding more things? For example, just HTTP status, then you add latency, etc. |
This should help isolating what exactly is failing for you. |
Here is the output when I just do HTTP_Status: Here is the when I add latency: |
Maybe it might be a good idea to copy/pasta your config you are using? Maybe something is awry with the format of the config file I have. |
Ok, my config looks like this: endpoint:
url: http://www.google.com
method: GET
timeout: 10
expectation:
- type: HTTP_STATUS
status: 200
- type: LATENCY
threshold: 10
cachet:
api_url: http://localhost/api/v1
token: my_token
component_id: 1
create_incident: true
frequency: 15 And this is my output:
|
That worked! There must be a discrepancy between the config included and the config you posted here. Maybe a formatting issue or a variable that it just doesn't like. Is there anyway to get a list of the possible Expectations the config will accept? |
How are you creating your config file? Are you using the The possible expectations are:
|
The one I got working was the copy you posted above. |
Sorry, I meant the original one, the one that didn't work. |
Ah, I also posted that one in my first post. I -believe- I got that config from the README, but I also could have gotten it from the sample included in the git repo. |
I noticed the indentation was incorrect, but I thought it was just a pasting issue. Would you mind editing it and putting it into a code block? You will need to wrap it with ```, on the top and on the bottom. |
I just created #21 to have better validation and to list the available expectations. |
|
I can't see anything wrong with it. Could you please try increasing the timeout? Maybe you're not getting a response in 10ms. |
I took the above config and adjusted the timeout to 10 (like in your config). It is working correctly. 0.01 (which is in the sample) must be far too low. I swear at one point when I was dicking with this I increased the timeout and got "the url is unreachable", I must not have adjusted it enough. |
Well, the interesting thing is that you should get this message, instead:
So it still doesn't explain what's happening... |
If this is not happening anymore for you guys @Hfroese @kirtiranjan @waltrinehart, I'll close this issue. But I'd like some action items to prevent it from happening to other people. Still not sure what's going on, to be honest. |
@mtakaki I also had this issue, then had a "Regex did not match anything in the body". I've since removed the regex, upp'ed the timeout and latency to 10 and now i don't receive any updates to the monitor, it's just stuck at "starting monitor agent" with no other logs for 5minutes. I'll assume this code isn't stable enough to use :( |
What's in your frequency, @shaun-ba ? This code is stable enough to me, but nonetheless you should use it at your own risk. |
30seconds, i've not managed to get it to work at all unfortunately, very strange and different results on each run as other above reported |
after copying the config.yml from this thread, I no longer get the site unreachable error. Cool thanks for the code. Much appreciation from Austin, Tx |
Glad to hear it, @moodhairboy! |
Exposing the configuration to avoid the current parsing problems. #20
I've changed the code to print out the parsed configuration yaml. @shaun-ba would you mind trying it again with the latest code? And could you please post here the output? |
I'm closing this issue as there has not been any question popping up anymore. If anyone has still any question, please feel free to reopen this issue. |
Doesn't work to me. Got always "The URL is unreachable" no matter what URL I use - even with google.com. Any ideas?
The text was updated successfully, but these errors were encountered: