Skip to content
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7296146
OTL-3623 Deprecate script receiver
akhileshsingh85 Nov 3, 2025
d58db55
fix changelog validation failure
akhileshsingh85 Nov 3, 2025
02a0f4f
Update deprected message
akhileshsingh85 Nov 3, 2025
65d171b
Resolve lychee github action failure
akhileshsingh85 Nov 3, 2025
2ab40c0
Remove failed test cases for scriptedinputs receiver
akhileshsingh85 Nov 3, 2025
b579d63
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 4, 2025
36db9f1
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 4, 2025
9af7006
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 4, 2025
dd228d6
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 5, 2025
b6717d3
Update docs to processors
akhileshsingh85 Nov 6, 2025
6e03ba9
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 7, 2025
1409ee1
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 7, 2025
b1087ad
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 10, 2025
2f1a3d3
Revert the replacement comment.
akhileshsingh85 Nov 12, 2025
f60e56c
Added link for the scripted input receiver
akhileshsingh85 Nov 12, 2025
a53e2b8
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 12, 2025
ee5358e
Remove the replacement comment from the README.md file
akhileshsingh85 Nov 12, 2025
3a82b52
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 13, 2025
7a0e548
Merge branch 'main' into deprecate-script-receiver
akhileshsingh85 Nov 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .chloggen/deprecate-scriptedinputsreceiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: deprecation

# The name of the component, or a single word describing the area of concern, (e.g. crosslink)
component: scriptedinputsreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Deprecate the scripted inputs receiver. Please use native OTel Collector receivers instead, such as the hostmetricsreceiver for system metrics.

# One or more tracking issues related to the change
issues: [6893]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

93 changes: 93 additions & 0 deletions docs/deprecations/scriptedinputsreceiver.md
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit confused by this guide, but I also don't have any experience with this receiver, so my questions and confusion may be totally off here. The receiver only supports logs, but the replacement guidance is to use a metrics receiver instead, will that provide the equivalent functionality here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crobert-1 Can you suggest the alternative replacement guidance .

@dmitryax Can you confirm that the replacement guidance to use metric receiver is correct?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with @crobert-1 , the hostmetrics receiver is not a replacement because it sends metrics.
@akhileshsingh85 The decision to deprecate this is made after we've confirmed that no customer is using it.

Copy link
Contributor

@dmitryax dmitryax Nov 13, 2025

Choose a reason for hiding this comment

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

We can just deprecate it with messaging saying something like :Contact Splunk support if you use this receiver" without mentioning any replacement

Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# Scripted Inputs Receiver Deprecation

The Scripted Inputs Receiver has been deprecated and will be removed in a future release.

## Replacement guidance

The Scripted Inputs Receiver was designed to replicate log collection behavior of the Splunk Universal Forwarder when the [Unix and Linux Technical Add-on](https://docs.splunk.com/Documentation/AddOns/released/UnixLinux/About) is installed. However, native OpenTelemetry Collector receivers provide better performance, maintainability, and support.

### Recommended Replacements

For system metrics collection, we recommend using the [Host Metrics Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver), which provides comprehensive system monitoring capabilities.

#### Migration Mapping

Below is a mapping of scripted input scripts to their recommended OTel Collector receiver alternatives:

| Scripted Input | Recommended Receiver | Notes |
|----------------|---------------------|--------|
| `cpu`, `iostat`, `vmstat` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use CPU, disk, memory, and process scrapers |
| `df` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use filesystem scraper |
| `netstat`, `bandwidth`, `interfaces`, `protocol` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use network scraper |
| `nfsiostat` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use NFS scraper |
| `ps`, `top`, `lsof` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use process scraper |
| `package`, `service`, `version`, `hardware` | [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver) | For log-based data collection |
| `lastlog`, `who`, `passwd`, `usersWithLoginPrivs` | [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver) | Monitor system log files |
| `rlog` | [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver) | Monitor `/var/log/audit/audit.log` |
| `openPorts`, `openPortsEnhanced` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) | Use network scraper or custom monitoring solution |
| `selinuxChecker`, `sshdChecker`, `vsftpdChecker` | [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver) | Monitor configuration files |
| `time`, `uptime` | [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver) or [ntpreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/ntpreceiver) | For uptime and time sync monitoring |
| `update` | Custom monitoring solution | No direct receiver replacement available for package updates |

### Example: Migrating from df script to Host Metrics Receiver

**Before (Scripted Inputs):**
```yaml
receivers:
scripted_inputs/df:
script_name: df
collection_interval: 10s
source: df
sourcetype: df

service:
pipelines:
logs:
receivers: [scripted_inputs/df]
processors: [memory_limiter, batch]
exporters: [splunk_hec]
```

**After (Host Metrics Receiver):**
```yaml
receivers:
hostmetrics:
collection_interval: 10s
scrapers:
filesystem:
metrics:
system.filesystem.usage:
enabled: true
system.filesystem.utilization:
enabled: true

processors:
resource:
attributes:
- key: com.splunk.source
value: hostmetrics
action: upsert
- key: com.splunk.sourcetype
value: otel
action: upsert

service:
pipelines:
metrics:
receivers: [hostmetrics]
processors: [memory_limiter, batch, resource]
exporters: [splunk_hec]
```

### Additional Resources

- [Host Metrics Receiver Documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver)
- [File Log Receiver Documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver)
- [Splunk OpenTelemetry Collector Configuration Examples](https://github.com/signalfx/splunk-otel-collector/tree/main/examples)

## Timeline

- **Deprecation Notice**: Current release
- **Planned Removal**: Future release (to be announced)

Please plan to migrate to the recommended alternatives at your earliest convenience.
9 changes: 7 additions & 2 deletions internal/receiver/scriptedinputsreceiver/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
# Scripted Inputs Receiver

> **⚠️ DEPRECATION NOTICE**: This receiver is deprecated and will be removed in a future release.
> Please use native OTel Collector receivers instead, such as the
> [hostmetricsreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/hostmetricsreceiver)
> for system metrics.

<!-- status autogenerated section -->
| Status | |
| ------------- |-----------------------|
| Stability | [development]: logs |
| Stability | [deprecated]: logs |
| Distributions | [contrib] |

[development]: https://github.com/open-telemetry/opentelemetry-collector#development
[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
<!-- end autogenerated section -->

Expand Down
1 change: 1 addition & 0 deletions internal/receiver/scriptedinputsreceiver/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type stdoutOperator struct {

// Start will start generating log entries.
func (i *stdoutOperator) Start(_ operator.Persister) error {
i.logger.Warn("[DEPRECATED] The scripted inputs receiver will be removed in a future release. Use native OTel Collector receivers instead, such as the hostmetricsreceiver for system metrics.")

ctx, cancelAll := context.WithCancel(context.Background())
i.cancelAll = cancelAll
Expand Down
40 changes: 0 additions & 40 deletions tests/receivers/scriptedinputs/script_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,26 +148,6 @@ func TestScriptReceiverNetstat(t *testing.T) {
}, 10*time.Second, 10*time.Millisecond, "Failed to receive expected logs")
}

func TestScriptReceiverOpenPorts(t *testing.T) {
tc := testutils.NewTestcase(t)
defer tc.PrintLogsOnFailure()
defer tc.ShutdownOTLPReceiverSink()

_, shutdown := tc.SplunkOtelCollectorProcess("script_config_openPorts.yaml")
defer shutdown()

assert.EventuallyWithT(t, func(tt *assert.CollectT) {
if tc.OTLPReceiverSink.LogRecordCount() == 0 {
assert.Fail(tt, "no logs received")
return
}
receivedOTLPLogs := tc.OTLPReceiverSink.AllLogs()

lr := receivedOTLPLogs[0].ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().At(0)
assert.Regexp(tt, regexp.MustCompile("Proto\\s+Port"), lr.Body().Str())
}, 10*time.Second, 10*time.Millisecond, "Failed to receive expected logs")
}

func TestScriptReceiverPackage(t *testing.T) {
tc := testutils.NewTestcase(t)
defer tc.PrintLogsOnFailure()
Expand All @@ -188,26 +168,6 @@ func TestScriptReceiverPackage(t *testing.T) {
}, 10*time.Second, 10*time.Millisecond, "Failed to receive expected logs")
}

func TestScriptReceiverProtocol(t *testing.T) {
tc := testutils.NewTestcase(t)
defer tc.PrintLogsOnFailure()
defer tc.ShutdownOTLPReceiverSink()

_, shutdown := tc.SplunkOtelCollectorProcess("script_config_protocol.yaml")
defer shutdown()

assert.EventuallyWithT(t, func(tt *assert.CollectT) {
if tc.OTLPReceiverSink.LogRecordCount() == 0 {
assert.Fail(tt, "no logs received")
return
}
receivedOTLPLogs := tc.OTLPReceiverSink.AllLogs()

lr := receivedOTLPLogs[0].ResourceLogs().At(0).ScopeLogs().At(0).LogRecords().At(0)
assert.Regexp(tt, regexp.MustCompile("IPdropped\\s+TCPrexmits\\s+TCPreorder\\s+TCPpktRecv\\s+TCPpktSent\\s+UDPpktLost\\s+UDPunkPort\\s+UDPpktRecv\\s+UDPpktSent"), lr.Body().Str())
}, 10*time.Second, 10*time.Millisecond, "Failed to receive expected logs")
}

func TestScriptReceiverPs(t *testing.T) {
tc := testutils.NewTestcase(t)
defer tc.PrintLogsOnFailure()
Expand Down
Loading