VictoriaMetrics / grafana-datasource

Grafana Plugin for VictoriaMetrics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bad gateway?

biocyberman opened this issue · comments

Hi
I a prometheus+grafana user and want to give this a try. But the documentation is still not good enough. I still can't query anything from Grafana.

This is my provisioning/datasources/victoriametrics.yml file:

apiVersion: 1

# List of data sources to insert/update depending on what's
# available in the database.
datasources:
   # <string, required> Name of the VictoriaMetrics datasource 
   # displayed in Grafana panels and queries.
   - name: VictoriaMetrics
      # <string, required> Sets the data source type.
     type: victoriametrics-datasource
      # <string, required> Sets the access mode, either
      # proxy or direct (Server or Browser in the UI).
      # Some data sources are incompatible with any setting
      # but proxy (Server).
     access: proxy
     # <string> Sets default URL of the single node version of VictoriaMetrics
     url: http://localhost:8428
     # <string> Sets the pre-selected datasource for new panels. 
     # You can set only one default data source per organization.
     isDefault: true

     # <string, required> Name of the VictoriaMetrics datasource 
     # displayed in Grafana panels and queries.
   - name: VictoriaMetrics - cluster
     # <string, required> Sets the data source type.
     type: victoriametrics-datasource
     # <string, required> Sets the access mode, either
     # proxy or direct (Server or Browser in the UI).
     # Some data sources are incompatible with any setting
     # but proxy (Server).
     access: proxy
     # <string> Sets default URL of the cluster version of VictoriaMetrics
     url: http://localhost:8481/select/0/prometheus
     # <string> Sets the pre-selected datasource for new panels. 
     # You can set only one default data source per organization.
     isDefault: false

image

I went into Grafan Datasource and hit "Test" and got "bad gateway" error

image

Hi @biocyberman ! Can you explain how you run VictoriaMetrics? And you got this issue when you choose VictoriaMetrics or Prometheus?

Hi
I ran with docker-compose -f docker-compose.yaml up -d from this repo. I got this issue when I went into the grafana instanced started by docker container grafana-datasource and choose "Configuration" --> "Datasource" and tested the default VictoriaMetrics datasource.

Furthermore, http://localhost:8428 seems to lack manythings for prometheus drop-in replacement. Manything listed in the API examples are missing: https://docs.victoriametrics.com/url-examples.html
Bellow is all what I see.

image

Can you change into your provisioning/datasources/victoriametrics.yml
url: http://localhost:8428 to url: http://victoriametrics:8428 like it described in the documentation?

Furthermore, http://localhost:8428 seems to lack many things for prometheus drop-in replacement. Manything listed in the API examples are missing: https://docs.victoriametrics.com/url-examples.html
Bellow is all what I see.

But you can check other parts of the documentation to find a lot of information about API, which is described well. This information is split into sections for valid search and reading.
For example
https://docs.victoriametrics.com/#tsdb-stats

Hey @dmitryk-dk could you please verify that datasource provisioning steps are correct and can be reproduced on clean installation?
I think, we can add the datasource integration to https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/deployment/docker so users can simply run VictoriaMetrics with all components present already.

Hi @hagen1778 , @biocyberman ! I will update the documentation to correctly describe how to run datasource with one docker-compose.yaml file

Hi @biocyberman! Please see updates to docs in the following commit c644bec.
You can try using VictoriaMetrics docker-compose environment which provides the complete set of VM components, including this datasource plugin. I hope this will simplify the quick start process.