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

Pushing Metric Data to InfluxDB OSS 2.0 No Longer Works #22646

Closed
jim380 opened this issue Apr 10, 2021 · 6 comments
Closed

Pushing Metric Data to InfluxDB OSS 2.0 No Longer Works #22646

jim380 opened this issue Apr 10, 2021 · 6 comments

Comments

@jim380
Copy link

jim380 commented Apr 10, 2021

System information

Geth version: 1.10.2-stable
OS & Version: Linux
Commit hash : 97d11b0187b4695ccf44e3b71b54155fe405a36f

Expected behaviour

As mentioned here in the official guide, the following command would allow geth to push metrics data to InfluxDB.

$ geth --metrics --metrics.influxdb --metrics.influxdb.endpoint "http://0.0.0.0:8086" --metrics.influxdb.username "geth" --metrics.influxdb.password "chosenpassword"

Actual behaviour

The flags combo above no longer works as intended with InfluxDB OSS 2.0. Now to get authorized you need to pass in a custom http header with your InfluxDB authentication token as the value and Authorization as the key. A simple auth with user/password doesn't work, even though it should according to the official InfluxDB documentation here.

WARN [04-10|15:36:57.636] Unable to send to InfluxDB               err="{\"code\":\"unauthorized\",\"message\":\"Unauthorized\"}"

Steps to reproduce the behaviour

Start off geth with the flags above and you will see the warnings come up. No geth metrics are shown in Measurements either, which only confirms the issue.

$ curl --get http://localhost:8086/query?db=geth --header "Authorization: Token <your_token>" --data-urlencode "q=SHOW MEASUREMENTS"

{"results":[{"statement_id":0,"series":[{"name":"measurements","columns":["name"],"values":[["boltdb_reads_total"],["boltdb_writes_total"],["go_gc_duration_seconds"],["go_goroutines"],["go_info"],["go_memstats_alloc_bytes"],["go_memstats_alloc_bytes_total"],["go_memstats_buck_hash_sys_bytes"],["go_memstats_frees_total"],["go_memstats_gc_cpu_fraction"],["go_memstats_gc_sys_bytes"],["go_memstats_heap_alloc_bytes"],["go_memstats_heap_idle_bytes"],["go_memstats_heap_inuse_bytes"],["go_memstats_heap_objects"],["go_memstats_heap_released_bytes"],["go_memstats_heap_sys_bytes"],["go_memstats_last_gc_time_seconds"],["go_memstats_lookups_total"],["go_memstats_mallocs_total"],["go_memstats_mcache_inuse_bytes"],["go_memstats_mcache_sys_bytes"],["go_memstats_mspan_inuse_bytes"],["go_memstats_mspan_sys_bytes"],["go_memstats_next_gc_bytes"],["go_memstats_other_sys_bytes"],["go_memstats_stack_inuse_bytes"],["go_memstats_stack_sys_bytes"],["go_memstats_sys_bytes"],["go_threads"],["http_api_request_duration_seconds"],["http_api_requests_total"],["http_query_request_bytes"],["http_query_request_count"],["http_query_response_bytes"],["influxdb_buckets_total"],["influxdb_dashboards_total"],["influxdb_info"],["influxdb_organizations_total"],["influxdb_scrapers_total"],["influxdb_telegrafs_total"],["influxdb_tokens_total"],["influxdb_uptime_seconds"],["influxdb_users_total"],["influxql_service_executing_duration_seconds"],["influxql_service_requests_total"],["query_control_all_active"],["query_control_all_duration_seconds"],["query_control_compiling_active"],["query_control_compiling_duration_seconds"],["query_control_executing_active"],["query_control_executing_duration_seconds"],["query_control_memory_unused_bytes"],["query_control_queueing_active"],["query_control_queueing_duration_seconds"],["query_control_requests_total"],["query_influxdb_source_read_request_duration_seconds"],["service_bucket_new_call_total"],["service_bucket_new_duration"],["service_bucket_new_error_total"],["service_onboard_new_call_total"],["service_onboard_new_duration"],["service_org_call_total"],["service_org_duration"],["service_org_new_call_total"],["service_org_new_duration"],["service_password_new_call_total"],["service_password_new_duration"],["service_session_call_total"],["service_session_duration"],["service_token_call_total"],["service_token_duration"],["service_urm_new_call_total"],["service_urm_new_duration"],["service_user_new_call_total"],["service_user_new_duration"],["task_executor_promise_queue_usage"],["task_executor_total_runs_active"],["task_executor_workers_busy"],["task_scheduler_current_execution"],["task_scheduler_execute_delta"],["task_scheduler_schedule_delay"],["task_scheduler_total_execute_failure"],["task_scheduler_total_execution_calls"],["task_scheduler_total_release_calls"],["task_scheduler_total_schedule_calls"],["task_scheduler_total_schedule_fails"]]}]}]}

Backtrace

N/A

@bisakhmondal
Copy link

Hii, can I give it a go? :)

@vishaljhala
Copy link

I just tried out with influx ver 2.0.6 and I was able to connect username & password without any issues. Is this still an issue?

@litsegaard
Copy link

litsegaard commented Jun 23, 2021

Hi!

Any news on this? I'm trying to get this to work but still stumble on the "unauthorized" issue mentioned above.

Images:

  • geth: ethereum/client-go:v1.10.2
  • influxdb: influxdb:2.0.6 & influxdb:2.0.7 (tried both)

geth "flags":
-metrics.influxdb.endpoint http://influxdb:8086 --metrics.influxdb.username (username) --metrics.influxdb.password (password)

Many thanks in advance!

@ethereum ethereum deleted a comment Jul 5, 2021
@min-xu-ai
Copy link

min-xu-ai commented Jul 26, 2021

I just tried out with influx ver 2.0.6 and I was able to connect username & password without any issues. Is this still an issue?

I just tried with 2.0.7 on arch linux and it didn't work:

WARN [07-25|17:09:59.094] Unable to send to InfluxDB               err="{\"code\":\"unauthorized\",\"message\":\"Unauthorized\"}"

@grtcoder
Copy link

Hi, I would like to start contributing. Can I work on this issue?

@holiman
Copy link
Contributor

holiman commented Oct 11, 2021

Support for InfluxDB V2 was merged in #23194, closing this

@holiman holiman closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants