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

Failed to parse datasource settings #199

Closed
Heyzi opened this issue Jan 3, 2025 · 5 comments
Closed

Failed to parse datasource settings #199

Heyzi opened this issue Jan 3, 2025 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@Heyzi
Copy link

Heyzi commented Jan 3, 2025

victorialogs_version: v1.3.2
victoriametrics-logs-datasource: v0.13.2
grafana: 11.4.0
provisioned via grafana config:

  - name: VictoriaLogs
    type: victoriametrics-logs-datasource
    access: proxy
    uid: VictoriaLogs
    url: http://localhost:9428

Getting a weird floating issue where datasource stops working.

  • Installation is clean (this is not an upgrade from an old version)
  • After some time and restarting the error goes away or reappears (but not always, wtf)
2025-01-03T06:28:29.828240431Z logger=datasources t=2025-01-03T09:28:29.828198143+03:00 level=debug msg="Querying for data source via SQL store" uid=VictoriaLogs orgId=1
2025-01-03T06:28:29.828774755Z logger=query_data t=2025-01-03T09:28:29.828682443+03:00 level=debug msg="Processed metrics query" ref_id=A from=1735882110342 to=1735885710342 interval=2000 max_data_points=1036 query="{\"datasource\":{\"type\":\"victoriametrics-logs-datasource\",\"uid\":\"VictoriaLogs\"},\"datasourceId\":2,\"editorMode\":\"builder\",\"expr\":\"unit: \\\"anacron.service\\\" \",\"intervalMs\":2000,\"legendFormat\":\"\",\"maxDataPoints\":1036,\"maxLines\":1000,\"queryType\":\"instant\",\"refId\":\"A\"}"
2025-01-03T06:28:29.833205421Z logger=id-service t=2025-01-03T09:28:29.833132434+03:00 level=debug msg="Cached token found" id=user:1
2025-01-03T06:28:29.833340253Z logger=accesscontrol t=2025-01-03T09:28:29.833282789+03:00 level=debug msg="Evaluating permissions" id=user:1 orgID=1 permissions="action:datasources:query scopes:"
2025-01-03T06:28:29.833421146Z logger=query_data t=2025-01-03T09:28:29.833370998+03:00 level=debug msg="Processed metrics query" ref_id=log-volume-A from=1735882110342 to=1735885710342 interval=2000 max_data_points=1036 query="{\"datasource\":{\"type\":\"victoriametrics-logs-datasource\",\"uid\":\"VictoriaLogs\"},\"datasourceId\":2,\"editorMode\":\"builder\",\"expr\":\"unit: \\\"anacron.service\\\" \",\"field\":\"_stream\",\"intervalMs\":2000,\"legendFormat\":\"\",\"maxDataPoints\":1036,\"maxLines\":1000,\"queryType\":\"hits\",\"refId\":\"log-volume-A\",\"step\":\"36s\",\"supportingQueryType\":\"logsVolume\"}"
2025-01-03T06:28:29.834218260Z logger=secrets.kvstore t=2025-01-03T09:28:29.834140877+03:00 level=debug msg="got secret value" orgId=1 type=datasource namespace=VictoriaLogs
2025-01-03T06:28:29.834236145Z logger=secrets.kvstore t=2025-01-03T09:28:29.834164351+03:00 level=debug msg="got secret value" orgId=1 type=datasource namespace=VictoriaLogs
2025-01-03T06:28:29.834693570Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834619284+03:00 level=debug msg="Plugin Request Started" dsName=VictoriaLogs dsUid=VictoriaLogs endpoint=queryData pluginId=victoriametrics-logs-datasource uname=admin
2025-01-03T06:28:29.834701420Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834656798+03:00 level=debug msg="Plugin Request Started" dsName=VictoriaLogs dsUid=VictoriaLogs endpoint=queryData pluginId=victoriametrics-logs-datasource uname=admin
2025-01-03T06:28:29.834704234Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834671992+03:00 level=error msg="failed to parse datasource settings: json: cannot unmarshal object into Go value of type string"
2025-01-03T06:28:29.834778735Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834721231+03:00 level=error msg="Partial data response error" status=500 dsUid=VictoriaLogs error="failed to parse datasource settings: json: cannot unmarshal object into Go value of type string" pluginId=victoriametrics-logs-datasource refID=A statusSource=plugin uname=admin dsName=VictoriaLogs endpoint=queryData
2025-01-03T06:28:29.834791570Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834756286+03:00 level=error msg="Plugin Request Completed" statusSource=plugin dsUid=VictoriaLogs endpoint=queryData pluginId=victoriametrics-logs-datasource status=error dsName=VictoriaLogs duration=158.888µs uname=admin
2025-01-03T06:28:29.834823497Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834775923+03:00 level=error msg="failed to parse datasource settings: json: cannot unmarshal object into Go value of type string"
2025-01-03T06:28:29.834836227Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834802055+03:00 level=error msg="Partial data response error" dsUid=VictoriaLogs error="failed to parse datasource settings: json: cannot unmarshal object into Go value of type string" pluginId=victoriametrics-logs-datasource refID=log-volume-A status=500 statusSource=plugin endpoint=queryData uname=admin dsName=VictoriaLogs
2025-01-03T06:28:29.834856877Z logger=plugin.victoriametrics-logs-datasource t=2025-01-03T09:28:29.834828551+03:00 level=error msg="Plugin Request Completed" status=error uname=admin endpoint=queryData duration=129.61µs pluginId=victoriametrics-logs-datasource statusSource=plugin dsName=VictoriaLogs dsUid=VictoriaLogs

but at the same time the connection test is successful:
image

@Heyzi
Copy link
Author

Heyzi commented Jan 5, 2025

after several tests, we managed to find out that version v0.13.0 does not have this error...
v0.13.2 - broken
v0.13.1 - not tested

@s5unty
Copy link

s5unty commented Jan 6, 2025

img_v3_02i2_03b15379-5849-4498-ab3b-58f87f095ddg

  • v0.13.2 - broken
  • v0.13.1 - ok
  • victorialogs: v1.4.0
  • grafana: v11.3.0 (d9455ff7db)
    image

@lostz
Copy link

lostz commented Jan 7, 2025

Same as I

@anch665
Copy link

anch665 commented Jan 17, 2025

Similar problem

Grafana 11.4.0
victorialogs v1.4.0
victoriametrics-logs-datasource v0.13.2

@dmitryk-dk dmitryk-dk self-assigned this Jan 21, 2025
@dmitryk-dk dmitryk-dk added the bug Something isn't working label Jan 21, 2025
@dmitryk-dk
Copy link
Contributor

Hi @anch665 , @Heyzi , @lostz , @s5unty ! The issue was fixed in the v0.13.3 release. Please check it. If you find any problems, feel free to reopen the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants