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

ombi.py fails when attempting to update influxdb #9

Closed
lotek4u opened this issue May 23, 2018 · 3 comments
Closed

ombi.py fails when attempting to update influxdb #9

lotek4u opened this issue May 23, 2018 · 3 comments

Comments

@lotek4u
Copy link

lotek4u commented May 23, 2018

Here is the relevant traceback:

Traceback (most recent call last):
File "ombi.py", line 38, in
influx.write_points(influx_payload)
File "/usr/local/lib/python3.5/dist-packages/influxdb/client.py", line 468, in write_points
tags=tags, protocol=protocol)
File "/usr/local/lib/python3.5/dist-packages/influxdb/client.py", line 532, in _write_points
protocol=protocol
File "/usr/local/lib/python3.5/dist-packages/influxdb/client.py", line 312, in write
headers=headers
File "/usr/local/lib/python3.5/dist-packages/influxdb/client.py", line 271, in request
raise InfluxDBClientError(response.content, response.status_code)
influxdb.exceptions.InfluxDBClientError: 404: <!DOCTYPE html>
<html lang="en">
<head>
....<snip a lot of HTML and JSON>.....

When the HTML doc from the traceback is rendered, this is all that is there... but the rest of the json is in the source of the page:

{{alert.title}}
• Docs
• Support Plans
• Community
• Grafana v4.4.3 (commit: 54c79c5)
• New version available!

I've walked through this but I'm stuck. I get to line 271 in client.py which is complaining about a response code of 404 from a request ( response = self._session.request ) where url = {str} 'http://192.168.1.70:3000/write' This is the correct IP and port for my Grafana intance.

I think it's trying to tell me that it cannot find anything at that URL, however I have the DB configured in grafana and testing the connection works. I can also connect to the influxdb database plex via the influxdb studio windows application.

@lotek4u
Copy link
Author

lotek4u commented May 23, 2018

This was actually the first script of yours that I had tried. Upon further inspection, it appears that the same thing happens with sonarr, radarr and tautulli. It makes me thing there is something wrong with my configuration.py, or maybe I've missed something silly in the fundamentals. It looks like the py scripts gather information from the respective app and then push that to grafana where it is supposed to end up in influxdb. Is that how it's supposed to work? I don't have much experience with grafana or influxdb. I was expecting the post to go directly towards the influxdb interface, but there is no way for your scripts to know this information since it is not in configuration.py.

@lotek4u
Copy link
Author

lotek4u commented May 23, 2018

And that was it. All of the settings in configuration.py that refer to the grafana instance are actually supposed to be representative of the influxdb instance. I changed the username to the influxdb username I configured, the url to the IP address of my influxdb server and the port to the influxdb port. It was also a requirement to make sure that the name of the influxdb datasource in grafana was actually called "plex."

I like answering my own questions sometimes, thanks for your time :)

@dirtycajunrice
Copy link
Member

Been in hawaii for 2 weeks. Glad you figured it out haha.

@Boerderij Boerderij locked and limited conversation to collaborators Mar 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants