I am confused about the instructions for sending h...
# support
m
I am confused about the instructions for sending host metrics from an external linux host to Signoz. Do I need to enable the prometheus configuration on both the signoz server and the linux host, then configure the signoz server to scrape the available endpoint? Or is is possible to send the metrics via the OTLP connections (GRPC or HTTP)? [10:17 AM] Rajeev https://signoz.io/docs/userguide/send-metrics/#metrics-from-hostmetrics-receiver SigNoz Send Metrics to SigNoz (Self Hosted) Learn how to send metrics to self-hosted SigNoz using OpenTelemetry. Follow detailed steps to enable and configure metric receivers. [10:17 AM] Rajeev Can someone please advise?
r
If you have a signoz server running, you should install otelcol (or otelcol-contrib) on your external linux host. on the external linux host, configure otelcol to have an otlp exporter pointed towards signoz instance
m
Thanks @Ryan Ziegler I have this configured as you described, I can get logs from the linux host but no host metrics. I also updated the dashboard json to reference the linux host by name, but still no metrics.
r
can you share your otelcol config yaml?
does the linux host show up in the infra monitoring tab?
m
Copy code
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: 0.0.0.0:4317
      http:
        endpoint: 0.0.0.0:4318
  hostmetrics:
    collection_interval: 30s
    scrapers:
      cpu: {}
      disk: {}
      load: {}
      filesystem: {}
      memory: {}
      network: {}
      paging: {}
      process:
        mute_process_name_error: true
        mute_process_exe_error: true
        mute_process_io_error: true
      processes: {}
  prometheus:
    config:
      global:
        scrape_interval: 30s
      scrape_configs:
        - job_name: otel-collector-binary
          static_configs:
            - targets: ['localhost:8888']
  filelog:
    include: [ /var/log/*log ]
    start_at: end
processors:
  batch:
    send_batch_size: 1000
    timeout: 10s
  # Ref: <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md>
  resourcedetection:
    detectors: [env, system] # include ec2 for AWS, gcp for GCP and azure for Azure.
    # Using OTEL_RESOURCE_ATTRIBUTES envvar, env detector adds custom labels.
    timeout: 2s
    system:
      hostname_sources: [os] # alternatively, use [dns,os] for setting FQDN as host.name and os as fallback
extensions:
  health_check: {}
  zpages: {}
exporters:
  otlp:
    endpoint: "signoz-host:4317"
    tls:
      insecure: true
  debug:
    # verbosity of the logging export: detailed, normal, basic
    verbosity: detailed
service:
  telemetry:
    metrics:
      address: 0.0.0.0:8888
  extensions: [health_check, zpages]
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    metrics/hostmetrics:
      receivers: [hostmetrics]
      processors: [resourcedetection, batch]
      exporters: [otlp]
    metrics/prometheus:
      receivers: [prometheus]
      processors: [resourcedetection, batch]
      exporters: [otlp]
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp]
    logs:
      receivers: [filelog]
      processors: [batch, resourcedetection]
      exporters: [otlp]
Thanks @Ryan Ziegler The linux host does not show up in the Infra monitoring tab, please see the linux otel config above.