- how do you configure signoz to pull infra metric...
# support
a
• how do you configure signoz to pull infra metrics from prometheus and not use k8s_infra • seeing cors error when calling /v1/logs, (not for traces) to send logs to signoz. This is for the frontend to send logs to signoz. I enabled cors config as documented, allowed all origins "*". Do not see any open issue for for this on github. https://github.com/SigNoz/signoz/issues/3835
n
Hey @Amit Baid, do you have a specific use case for using Prometheus instead of the k8s-infra?
Can you share your otel-collector config for CORS?
a
Hi @Nagesh Bansal 1. yes. I have prometheus running in my cluster which is scrapping infra metrics and it has integration with db as well, so planning to use that. 2. CORS config. I had individual endpoints for origin, but switched to wildcard since everyone started to report CORS when hitting /v1/logs. Primarily I had CORS when sending traces but below config had fix that error. CORS is a domain specific error, and trace and logs are being sent on the same endpoint so it should not generate CORS error. I understand that I can use k8s infra and have my EKS services send logs to Signoz but my frontend does not run on EKS.
Copy code
otelCollector:
  config:
    receivers:
      otlp:
        protocols:
          http:
            cors:
              allowed_origins:
              - "*"
I do not have k8s-infra installed in the cluster.
Hi @Nagesh Bansal were you able to check my response above.