opentelemetry-collector-contrib icon indicating copy to clipboard operation
opentelemetry-collector-contrib copied to clipboard

New component: SSH Receiver

Open nslaughter opened this issue 2 years ago • 2 comments

The purpose and use-cases of the new component

Purpose: To monitor the availability and performance of SSH endpoints. Use case: Methods of monitoring SSH host availability can either use the programs on the host or run as clients. This proposal is for monitoring as a client which can provide less information, but it doesn't require ownership of the host or any additional permissions. It performs simple checks by connecting to the host to validate it's available. Additionally, a common use of SSH is for file transfer over SFTP, which can be checked in the same way.

Example configuration for the component

receivers:
  ssh:
    collection_interval: 60s     # default: 60s
    endpoint: eg.host.str:2222   # required - port defaults to 22 if not included
    user: otelu                  # required
    password: otelp              # required unless key_file is provided
    key_type: ECDSA              # default: RSA (enum: RSA|ECDSA|EDDSA|Ed25519)
    key_file: /path/to/key_id    # required unless password is provided
    sftp: true                   # default: false

Telemetry data types supported

Gauges ssh_availability: 1/0 (up/down) ssh_connection_time: (ms)

sftp_availability: 1/0 (up/down) sftp_connection_time: (ms)

Is this a vendor-specific component?

  • [ ] This is a vendor-specific component
  • [ ] If this is a vendor-specific component, I am proposing to contribute this as a representative of the vendor.

Sponsor (optional)

@codeboten

Additional context

No response

nslaughter avatar Sep 19 '22 20:09 nslaughter

@nslaughter thanks for proposing the component, i'm happy to sponsor it.

Instead of a separate host/port configuration, it would be more consistent w/ other receivers to use endpoint to include both host and port.

How does the test for sftp work? Does it require a file transfer to confirm it works?

codeboten avatar Sep 20 '22 16:09 codeboten

Thanks, @codeboten.

  1. I'll make the change to reference endpoint.
  2. For the sftp check (beyond SSH)... I have planned to use pwd. I believe that either pwd or ls (aka dir) are appropriate for testing SFTP response as they're read only, but use remote file system access. If info only commands work then other candidates would be help and version.

nslaughter avatar Sep 20 '22 17:09 nslaughter

The goals and capabilities have remained the same. However, the implementation changed (a) to fit the networking patterns of the collector and (b) provide metrics in a way more fit with latest views of maintainers.

nslaughter avatar Oct 19 '22 21:10 nslaughter

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

github-actions[bot] avatar Dec 19 '22 03:12 github-actions[bot]