open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.95k stars 2.29k forks source link

New component:TCP Receiver #34414

Open yanfeng1992 opened 1 month ago

yanfeng1992 commented 1 month ago

The purpose and use-cases of the new component

To monitor the availability and performance of TCP endpoints. Use case: TCP network detection plug-in, usually used to monitor whether a TCP port on the local machine is listening, or whether a remote port can be connected

Example configuration for the component

receivers:
  tcpcheck:
    endpoint: 10.255.88.146:32443 # required
    collection_interval: 60s

Telemetry data types supported

attributes:
  error.message:
    description: Error message recorded during check
    type: string
  tcp.endpoint:
    description: Full TCO endpoint
    type: string

metrics:
  tcpcheck.status:
    description: 1 if the TCP client successfully connected, otherwise 0.
    enabled: true
    sum:
      value_type: int
      aggregation_temporality: cumulative
      monotonic: false
    unit: "1"
    attributes: [tcp.endpoint]
  tcpcheck.duration:
    description: Measures the duration of TCP connection.
    enabled: true
    gauge:
      value_type: int
    unit: ms
    attributes: [tcp.endpoint]
  tcpcheck.error:
    description: Records errors occurring during TCP check.
    enabled: true
    sum:
      value_type: int
      aggregation_temporality: cumulative
      monotonic: false
    unit: "{error}"
    attributes: [error.message]

Is this a vendor-specific component?

Code Owner(s)

yanfeng1992

Sponsor (optional)

No response

Additional context

No response

yanfeng1992 commented 1 month ago

If you are interested in this, please become a sponsor. Thank you. @codeboten @mx-psi

yanfeng1992 commented 2 weeks ago

Invitation to become a sponsor, is anyone interested in this? @songy23 @mwear @dmitryax @fatsheep9146