rom1504 / clip-retrieval

Easily compute clip embeddings and build a clip retrieval system with them
https://rom1504.github.io/clip-retrieval/
MIT License
2.37k stars 208 forks source link

How to setup grafana metrics #62

Open rvencu opened 2 years ago

rvencu commented 2 years ago

I tried to add the endpoint as a source in a Prometheus data source. When setting access to Browser I get this: Access to fetch at 'http://splunk.vra.ro/metrics/api/v1/query?query=1%2B1&time=1634007938.867' from origin 'http://splunk.vra.ro:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Setting to Server does not do much. The data source seems inactive in Grafana

rom1504 commented 2 years ago

need to add cors (like https://github.com/rom1504/clip-retrieval/blob/main/clip_retrieval/clip_back.py#L352) to the metric endpoint https://github.com/rom1504/clip-retrieval/blob/main/clip_retrieval/clip_back.py#L342