https://signoz.io logo
#support
Title
# support
g

George James

01/29/2024, 7:19 AM
Hey guys, Prometheus config is not working, I have the below
values.yaml
override, but whatever I do it doesn't pick up the data from the endpoint. How do I fix this?
Copy code
frontend:
  ingress:
    enabled: true
    className: "nginx"
    hosts:
      - host: signoz.mid.app
        paths:
          - path: /
            pathType: ImplementationSpecific
            port: 3301
    tls:
      - hosts:
          - signoz.mid.app
        secretName: tls.mid.app


clickhouse:
  coldStorage:
    enabled: true
    defaultKeepFreeSpaceBytes: "10485760" # 10MiB
    type: s3
    endpoint: <hidden>
    accessKey: <hidden>
    secretAccess: <hidden>

k8s-infra:
  enabled: false


otelCollector:
  config:
    receivers:
      prometheus:
        config:
          scrape_configs:
            - job_name: keycloak
              scheme: https
              scrape_interval: 15s
              static_configs:
                - targets: ["accounts.midcloud.app"]
r

Raj Kamal

01/29/2024, 7:38 AM
Hi George 🙂 There doesn't seem to be anything wrong with your config. Is "accounts.midcloud.app" reachable from your collector instance? Your collector logs should contain more details. Please take a look at them and if you don't mind please share the logs with us
g

George James

01/29/2024, 7:53 AM
it is reachable, even publicly, i am stressed
is the job_name supposed to be arbitrary or should it be a specific value? Or else how do I specify the otel exporter ?
can someone please help me with this, I have been battling this issue for 2 days
r

Raj Kamal

01/29/2024, 8:26 AM
You should be able to use any job_name you like - see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config for more details around prometheus config
Please share your collector logs with us. We can not help much without seeing some logs
s

Srikanth Chekuri

01/29/2024, 9:35 AM
What is the port where metrics are being exported? Do you see any error logs with failed scrape message?
r

Raj Kamal

01/29/2024, 9:37 AM
Metrics are being exported to where the config points based on prometheus defaults - https://accounts.midcloud.app/metrics
@George James apart from sharing collector logs, please try using the following updated config to ensure you are using that receiver in some collector pipeline
Copy code
otelCollector:
  config:
    receivers:
      prometheus:
        config:
          scrape_configs:
            - job_name: keycloak
              scheme: https
              scrape_interval: 15s
              static_configs:
                - targets: ["<http://accounts.midcloud.app|accounts.midcloud.app>"]
    service:
      pipelines:
        metrics/prom:
          receivers: [prometheus]
          processors: [batch]
          exporters: [clickhousemetricswrite]
g

George James

01/29/2024, 7:18 PM
@Raj Kamal that configuration worked for me. Is there somewhere where this is documented ?
r

Raj Kamal

01/30/2024, 5:44 AM
great! So you had updated the config to define a new receiver for collecting prometheus metrics, but receivers need to be used in a collector pipeline for them to actually get used. I would highly recommend that you should go through https://opentelemetry.io/docs/collector/configuration/ to understand the details of working with otel collector configuration
3 Views