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

httplib.InvalidURL #15

Open
eyaqub opened this issue Jun 14, 2016 · 1 comment
Open

httplib.InvalidURL #15

eyaqub opened this issue Jun 14, 2016 · 1 comment

Comments

@eyaqub
Copy link

eyaqub commented Jun 14, 2016

Hi, I am trying to setup grafana_alerts module. I installed python and grafana_alerts module in my docker container. After tagging the dashboard with "monitored" and adjusting the config file at /etc/grafana_alerts, I restarted containers. Running the grafanaAlerts command in the container gives a sort of error message: "httplib.InvalidURL: nonnumeric port: '3130api'"
$ grafanaAlerts
Traceback (most recent call last):
File "/usr/local/bin/grafanaAlerts", line 9, in
load_entry_point('grafana-alerts==1.0.0.dev7', 'console_scripts', 'grafanaAlerts')()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/init.py", line 12, in main
return the_launcher.launch()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/launcher.py", line 16, in launch
alert_checker.check()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/alerting.py", line 38, in check
dashboard_data_list = scanner.obtain_dashboards()
File "/usr/local/lib/python2.7/dist-packages/grafana_alerts/alerting.py", line 157, in obtain_dashboards
contents = urllib2.urlopen(request).read()
File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python2.7/urllib2.py", line 431, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 449, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(_args)
File "/usr/lib/python2.7/urllib2.py", line 1227, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1166, in do_open
h = http_class(host, timeout=req.timeout, *_http_conn_args)
File "/usr/lib/python2.7/httplib.py", line 712, in init
(self.host, self.port) = self._get_hostport(host, port)
File "/usr/lib/python2.7/httplib.py", line 754, in _get_hostport
raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: '3130api'

Any hints what might be going on here and where to fix the nonnumeric mention of port?
Thanks.

@ww9xlll
Copy link

ww9xlll commented Nov 18, 2016

@eyaqub The URL where grafana server is listening. It must finish with the character '/' (default value: http://localhost:3130)

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