Skip to content

Conversation

@etserend
Copy link
Contributor

@etserend etserend commented Sep 16, 2025

Description

Introduce a new Cisco OS receiver to collect metrics from Cisco network devices via SSH, enabling native OpenTelemetry pipelines without external bridges or exporters.

This first PR includes structure only (no scraping implementation yet), following contrib “new component” guidelines:

  • README.md with In Development stability
  • config.go with validation for devices/auth and scraper toggles
  • factory.go using helper factory APIs (returns a no-op metrics receiver for lifecycle tests)
  • doc.go with //go:generate mdatagen metadata.yaml
  • metadata.yaml and generated code under internal/metadata/
  • Basic unit tests (config, factory, lifecycle)

Link to tracking issue

#42647

Testing

  • Unit tests included and passing:
    • Config validation tests in receiver/ciscoosreceiver/config_test.go
    • Factory defaults and lifecycle in receiver/ciscoosreceiver/factory_test.go
    • Generated lifecycle tests via mdatagen
  • Local repository checks run:
    • make checkdoc, make checkmetadata, make checkapi
    • make goporto, make crosslink, make gotidy
    • make genotelcontribcol, make genoteltestbedcol, make generate

Documentation

  • receiver/ciscoosreceiver/README.md with:
    • In Development stability notation
    • Basic configuration schema and example
    • Planned scrapers (BGP, Environment, Facts, Interfaces, Optics) for future PRs
  • metadata.yaml with development stability and initial metric scaffolding
  • doc.go enabling mdatagen code generation

@dmitryax - Component sponsor

- Implements modular receiver for Cisco devices via SSH
- Supports BGP, Environment, Facts, Interfaces, and Optics collectors
- Provides cisco_exporter-compatible metrics
- Includes comprehensive authentication (password/SSH keys)
- Features built-in observability metrics
- Supports IOS XE, NX-OS, and IOS operating systems

Fixes open-telemetry#42647
@etserend etserend requested a review from a team as a code owner September 16, 2025 21:09
@etserend etserend requested a review from pjanotti September 16, 2025 21:09
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Sep 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions github-actions bot added the first-time contributor PRs made by new contributors label Sep 16, 2025
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@dmitryax
Copy link
Member

Please make the first PR according to the guidelines, just skeleton, no implementation

@atoulme atoulme added the Accepted Component New component has been sponsored label Sep 17, 2025
@atoulme atoulme marked this pull request as draft September 17, 2025 05:48
@github-actions
Copy link
Contributor

Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib.

Important reminders:

A maintainer will review your pull request soon. Thank you for helping make OpenTelemetry better!

@dmitryax dmitryax marked this pull request as ready for review September 18, 2025 00:34
@github-actions github-actions bot added the cmd/otelcontribcol otelcontribcol command label Sep 18, 2025

| Name | Description | Values | Optional |
| ---- | ----------- | ------ | -------- |
| host | The Cisco device hostname or IP address | Any Str | false |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there potential to use host.name/host.ip as defined in semconv?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@thompson-tomo You're right about the semantic conventions. Since Cisco devices usually have one management interface, using the connection endpoint works well here. That said, happy to adjust toward host.name/host.ip if it helps with overall consistency. What do you think?

Comment on lines 90 to 92
| Metric | Type | Description | Attributes |
|--------|------|-------------|------------|
| `cisco.device.connected` | Gauge | Device connectivity status (1=connected, 0=disconnected) | `host` | No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this metric be generic device.connected & add the device.manufacturer attribute?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the receiver is called ciscoosreceiver, so maybe to align to semconv if there is an effort. Otherwise, no point.

@dmitryax
Copy link
Member

Please run make gotidy to fix the CI

Copy link
Member

@dmitryax dmitryax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing. Something is wrong wit the generated metrics part. I'd suggest removing attributes and metrics section from metadata.yaml for this PR and add that later

@dmitryax
Copy link
Member

dmitryax commented Oct 1, 2025

Couple of CI check are still failing. make checks should help

@dmitryax dmitryax merged commit 9266926 into open-telemetry:main Oct 1, 2025
186 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 1, 2025
@otelbot
Copy link
Contributor

otelbot bot commented Oct 1, 2025

Thank you for your contribution @etserend! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Accepted Component New component has been sponsored cmd/otelcontribcol otelcontribcol command first-time contributor PRs made by new contributors

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants