Commit 04c95026 authored by Azat Khuziyakhmetov's avatar Azat Khuziyakhmetov
Browse files

using post API of InfluxDB to support longer queries

parent 0bf13b06
......@@ -8,7 +8,7 @@ from . import metrics
def fetch_data(query):
payload = {'db': confdb.IDB["database"], 'q': query}
query_url = "{:s}/query".format(confdb.IDB["api_url"])
r = requests.get(query_url, verify=confdb.IDB["ssl"], auth=HTTPBasicAuth(
r =, verify=confdb.IDB["ssl"], auth=HTTPBasicAuth(
confdb.IDB["username"], confdb.IDB["password"]), params=payload)
# not only status code 200 gives us results, so we need to find out which are the bad/good status codes.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment