I am trying to bring sine wave in my Grafana dashboard.
I am following instruction in this link InfluxDB+Grafana persistence and graphing and I have run sample sine.py.
$ python sine.py
Traceback (most recent call last):
File “sine.py”, line 27, in
r = requests.post(“http://%s:8086/write?db=%s” %(IP, DB), auth=(USER, PASSWORD), data=v)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/api.py”, line 116, in post
return request(‘post’, url, data=data, json=json, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/api.py”, line 60, in request
return session.request(method=method, url=url, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/sessions.py”, line 533, in request
resp = self.send(prep, **send_kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/sessions.py”, line 646, in send
r = adapter.send(request, **kwargs)
File “/home/ananth/.local/lib/python2.7/site-packages/requests-2.20.0-py2.7.egg/requests/adapters.py”, line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host=‘192.168.0.2’, port=8086): Max retries exceeded with url: /write?db=test (Caused by NewConnectionError(’<urllib3.connection.HTTPConnection object at 0x7f3631961590>: Failed to establish a new connection: [Errno 110] Connection timed out’,))
While creating “Data Sources” in Grafana, When I select any of the below access type and after selecting “save and test”, I am getting below errors.
1. Access = Server (default) -----> Error : Bad Gateway (502)
2. Access = NetworkError: undefined (undefined).
Please help me to solve this issue and get the sine wave in Grafana dashboard.