ratibor78 / geostat

GeoStat, Python script for parsing Nginx and Apache logs files and getting GEO data from incoming IP's.
MIT License
67 stars 20 forks source link

401 "error":"authorization failed" client side #8

Closed b4b857f6ee closed 3 years ago

b4b857f6ee commented 4 years ago

Hello,

On Ubuntu with nginx, a working telegraf and i use the same credentials for your settings as my telegraf.conf file, i get this :

root@SRV:/opt/geostat# /opt/geostat/venv/bin/python geoparser.py Traceback (most recent call last): File "geoparser.py", line 101, in main() File "geoparser.py", line 94, in main logparse(LOGPATH, INFLUXHOST, INFLUXPORT, INFLUXDBDB, INFLUXUSER, INFLUXUSERPASS, MEASUREMENT, GEOIPDB, INODE) # NOQA File "geoparser.py", line 69, in logparse CLIENT.write_points(METRICS) File "/opt/geostat/venv/local/lib/python2.7/site-packages/influxdb/client.py", line 490, in write_points tags=tags, protocol=protocol) File "/opt/geostat/venv/local/lib/python2.7/site-packages/influxdb/client.py", line 551, in _write_points protocol=protocol File "/opt/geostat/venv/local/lib/python2.7/site-packages/influxdb/client.py", line 327, in write headers=headers File "/opt/geostat/venv/local/lib/python2.7/site-packages/influxdb/client.py", line 286, in request raise InfluxDBClientError(response.content, response.status_code) influxdb.exceptions.InfluxDBClientError: 401: {"error":"authorization failed"}

but my account for influxdb setting.ini is the same as my telegraf configuration who is already work. any idea?

ratibor78 commented 3 years ago

@b4b857f6ee Do you fix this or you're still experiencing the same issue?

ratibor78 commented 3 years ago

For me, it looks like you need to check the settings.ini file and check the InfluxDB credentials, also mind that this version of the program doesn't supply the SSL connection to the InfluxDB for now.

b4b857f6ee commented 3 years ago

For me, it looks like you need to check the settings.ini file and check the InfluxDB credentials, also mind that this version of the program doesn't supply the SSL connection to the InfluxDB for now.

I think i fix it, i don't remember, let me check to night.

ratibor78 commented 3 years ago

There was a newly reworked version of the application published, I will close this issue, we can reopen it if it'll be needed.