Hello! I'm having some issues in sending metrics t...
# signoz-cloud
n
Hello! I'm having some issues in sending metrics to Signoz Cloud, the prometheus instance is able to collect metrics from otel-collector and a custom job, but the collector isn't sending these metrics to signoz cloud.
s
Please share more details. What is the config? Do you see any errors? Did you confirm the collection is working?
n
Thanks for the help Srikanth, it's resolved now. I actually created a new ingestion key and was using it instead of the default token provided to me. It's working only with the default one.
c
@Nishchay Veer can you provide more detail about what you’re trying to do ? Ideally you should be able to send data with a new ingestion key. cc: @Vibhu Pandey
n
okay so instead of installing open telemetry binary as an agent as mentioned here https://prepared-warthog.in.signoz.cloud/get-started/infrastructure-monitoring , I tried to set it up as a docker container via docker-compose and mounted my config.yaml to container's config along with my prometheus instance to enable a prometheus receiver to collect metrics.
Copy code
services:
  otel-collector:
    image: otel/opentelemetry-collector-contrib:latest
    container_name: otel-collector
    command: [ "--config=/etc/otel-collector-config.yaml" ]
    volumes:
      - ./otel-local-collector.yaml:/etc/otel-collector-config.yaml
    ports:
      - "4317:4317" # OTLP gRPC receiver
      - "4318:4318" # OTLP http receiver
      - "8888:8888" # Prometheus metrics exposed by the collector
      - "8889:8889" # Prometheus exporter metrics
    networks:
      - monitoring
    restart: unless-stopped

  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/etc/prometheus/console_libraries'
      - '--web.console.templates=/etc/prometheus/consoles'
      - '--web.enable-lifecycle'
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - prometheus_data:/prometheus
    depends_on:
      - otel-collector
    networks:
      - monitoring
    restart: unless-stopped

networks:
  monitoring:
    name: monitoring-network
    driver: bridge

volumes:
  prometheus_data:
But it wasn't working. So I'm not sure whether it's possible with docker container