Skip to content

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

@jim380

Description

@jim380

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions