Skip to content

Overhaul and update InfluxDB engine #60

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

Closed
wants to merge 1 commit into from

Conversation

kannibalox
Copy link
Contributor

Screwed up the previous PR by force pushing and Github isn't letting me re-open it.

@pyroscope pyroscope self-assigned this Oct 26, 2017
@pyroscope
Copy link
Owner

Remind me on the weekend to take care of this… 👴

@kannibalox
Copy link
Contributor Author

@pyroscope ping


# Push it!
try:
# TODO: Use a session
requests.post(fluxurl, data=fluxjson, timeout=self.influxdb.timeout)
r = requests.post(fluxurl, data=datastr, timeout=self.influxdb.timeout)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use response or resp (no single-letter vars outside of comprehensions).

self.config.series_prefix, hostname, pid, view_name)
vstr += ','.join(['='.join([k, str(v)]) for k, v in values.items()])
datastr += vstr + "\n"
except (error.LoggableError, xmlrpc.ERRORS), exc:
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as exc: (other places, too)

@@ -97,63 +71,61 @@ def __init__(self, config=None):
def _influxdb_url(self):
""" Return REST API URL to access time series.
"""
url = "{0}/db/{1}/series".format(self.influxdb.url.rstrip('/'), self.config.dbname)
url = "{0}/write?db={1}".format(self.influxdb.url.rstrip('/'), self.config.dbname)

if self.influxdb.user and self.influxdb.password:
url += "?u={0}&p={1}".format(self.influxdb.user, self.influxdb.password)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/?/&/

@kannibalox
Copy link
Contributor Author

I no longer use influxdb, this has been replaced by #77

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

Successfully merging this pull request may close these issues.

2 participants