Skip to content

Commit 5a3bd88

Browse files
etserendjelly-afk
authored andcommitted
[receiver/ciscoosreceiver] Implement interface scrapper (open-telemetry#43815)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Adds interface scraper to Cisco OS receiver with 9 network metrics following OpenTelemetry semantic conventions: <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue open-telemetry#42647 <!--Describe what testing was performed and which tests were added.--> #### Testing - Configuration validation and defaults - Factory creation and lifecycle tests - Interface parser (status, validation, formatting) - Fixed metric names to match OpenTelemetry conventions - Multi-device configuration tests - <!--Describe the documentation added.--> #### Documentation - Complete README with metric specifications and examples - All metrics defined in metadata.yaml - Generated documentation.md with attribute details <!--Please delete paragraphs that you did not use before submitting.-->
1 parent f8a57b0 commit 5a3bd88

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+3028
-32
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
7+
component: receiver/ciscoosreceiver
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: "`ciscoosreceiver`: Add new receiver for collecting metrics from Cisco network devices via SSH"
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [42647]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
Supports Cisco IOS, IOS-XE, and NX-OS devices with SSH-based metric collection.
20+
Initial implementation includes system scraper for device availability and connection metrics.
21+
22+
# If your change doesn't affect end users or the exported elements of any package,
23+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
24+
# Optional: The change log or logs in which this entry should be included.
25+
# e.g. '[user]' or '[user, api]'
26+
# Include 'user' if the change is relevant to end users.
27+
# Include 'api' if there is a change to a library API.
28+
# Default: '[user]'
29+
change_logs: [user]

.chloggen/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ components:
330330
- scraper/cpu
331331
- scraper/disk
332332
- scraper/filesystem
333+
- scraper/interfaces
333334
- scraper/load
334335
- scraper/memory
335336
- scraper/network

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ receiver/azureeventhubreceiver/ @open-telemetry
241241
receiver/azuremonitorreceiver/ @open-telemetry/collector-contrib-approvers @nslaughter @celian-garcia @ishleenk17
242242
receiver/chronyreceiver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy @jamesmoessis
243243
receiver/ciscoosreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax
244+
receiver/ciscoosreceiver/internal/scraper/interfacesscraper/ @open-telemetry/collector-contrib-approvers
244245
receiver/ciscoosreceiver/internal/scraper/systemscraper/ @open-telemetry/collector-contrib-approvers
245246
receiver/cloudflarereceiver/ @open-telemetry/collector-contrib-approvers @dehaansa
246247
receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @crobert-1

.github/ISSUE_TEMPLATE/beta_stability.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ body:
242242
- receiver/carbon
243243
- receiver/chrony
244244
- receiver/ciscoos
245+
- receiver/ciscoos/internal/scraper/interfacesscraper
245246
- receiver/ciscoos/internal/scraper/systemscraper
246247
- receiver/cloudflare
247248
- receiver/cloudfoundry

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ body:
245245
- receiver/carbon
246246
- receiver/chrony
247247
- receiver/ciscoos
248+
- receiver/ciscoos/internal/scraper/interfacesscraper
248249
- receiver/ciscoos/internal/scraper/systemscraper
249250
- receiver/cloudflare
250251
- receiver/cloudfoundry

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ body:
239239
- receiver/carbon
240240
- receiver/chrony
241241
- receiver/ciscoos
242+
- receiver/ciscoos/internal/scraper/interfacesscraper
242243
- receiver/ciscoos/internal/scraper/systemscraper
243244
- receiver/cloudflare
244245
- receiver/cloudfoundry

.github/ISSUE_TEMPLATE/other.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ body:
239239
- receiver/carbon
240240
- receiver/chrony
241241
- receiver/ciscoos
242+
- receiver/ciscoos/internal/scraper/interfacesscraper
242243
- receiver/ciscoos/internal/scraper/systemscraper
243244
- receiver/cloudflare
244245
- receiver/cloudfoundry

.github/ISSUE_TEMPLATE/unmaintained.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ body:
244244
- receiver/carbon
245245
- receiver/chrony
246246
- receiver/ciscoos
247+
- receiver/ciscoos/internal/scraper/interfacesscraper
247248
- receiver/ciscoos/internal/scraper/systemscraper
248249
- receiver/cloudflare
249250
- receiver/cloudfoundry

.github/component_labels.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ receiver/azureeventhubreceiver receiver/azureeventhub
222222
receiver/azuremonitorreceiver receiver/azuremonitor
223223
receiver/chronyreceiver receiver/chrony
224224
receiver/ciscoosreceiver receiver/ciscoos
225+
receiver/ciscoosreceiver/internal/scraper/interfacesscraper receiver/ciscoos/internal/scraper/interfaces
225226
receiver/ciscoosreceiver/internal/scraper/systemscraper receiver/ciscoos/internal/scraper/systemscraper
226227
receiver/cloudflarereceiver receiver/cloudflare
227228
receiver/cloudfoundryreceiver receiver/cloudfoundry

receiver/ciscoosreceiver/README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ The scrapers are configured as modular components. Each scraper type can be conf
5858
| Setting | Type | Description |
5959
|---------|------|-------------|
6060
| `system` | map | System metrics (device availability, CPU, memory) |
61+
| `interfaces` | map | Interface metrics (traffic, errors, status) |
6162

6263
## Metrics Collected
6364

@@ -70,8 +71,24 @@ The scrapers are configured as modular components. Each scraper type can be conf
7071
- NX-OS: Calculated from `show system resources` (used / total)
7172
- IOS/IOS XE: Calculated from `show process memory` (Processor Pool used / total)
7273

73-
### Attributes
74-
All metrics include the `target` attribute with the device's IP address for correlation with Kubernetes nodes and other resources.
74+
### Interface Metrics
75+
- `system.network.io` - Number of bytes transmitted and received (with `network.io.direction` attribute: `receive` or `transmit`)
76+
- `system.network.errors` - Number of errors encountered (with `network.io.direction` attribute: `receive` or `transmit`)
77+
- `system.network.packet.dropped` - Number of packets dropped (with `network.io.direction` attribute: `receive` or `transmit`)
78+
- `system.network.packet.count` - Number of packets transmitted or received, categorized by type (with `network.packet.type` attribute: `multicast` or `broadcast`)
79+
- `system.network.interface.status` - Interface operational status (1 = up, 0 = down)
80+
81+
Interface metrics include attributes: `network.interface.name`, `network.interface.mac`, `network.interface.description`, `network.interface.speed`
82+
83+
Metrics with direction attribute also include: `network.io.direction` (enum: `receive`, `transmit`)
84+
85+
Metrics with packet type attribute also include: `network.packet.type` (enum: `multicast`, `broadcast`)
86+
87+
### Resource Attributes
88+
All metrics include the following resource attributes following OpenTelemetry semantic conventions:
89+
- `host.ip` - Device IP address for correlation with Kubernetes nodes and other resources
90+
- `hw.type` - Hardware type, set to "network" per OpenTelemetry hardware.network conventions
91+
- `os.name` - Operating system name (e.g., "NX-OS", "IOS XE", "IOS")
7592

7693
## Example Configuration
7794

@@ -99,6 +116,18 @@ receivers:
99116
enabled: true
100117
system.memory.utilization:
101118
enabled: true
119+
interfaces:
120+
metrics:
121+
system.network.io:
122+
enabled: true
123+
system.network.errors:
124+
enabled: true
125+
system.network.packet.dropped:
126+
enabled: true
127+
system.network.packet.count:
128+
enabled: true
129+
system.network.interface.status:
130+
enabled: true
102131

103132
# Example 2: SSH key file authentication
104133
ciscoosreceiver/router01:

0 commit comments

Comments
 (0)