-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add self_monitoring connection type
- Loading branch information
1 parent
759d229
commit 8a5c97a
Showing
8 changed files
with
141 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package connections | ||
|
||
type SelfMonitoringConfig struct { | ||
enabled bool | ||
} | ||
|
||
var SelfMonitoringConnectionType = ConnectionType{ | ||
Name: "self_monitoring", | ||
ConfigFields: []CollectorConfigFragment{ | ||
{ | ||
configYAMLPath: "enabled", | ||
colConfigFilePath: "logs_and_metrics.yaml", | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
packaging/linux/etc/observe-agent/connections/self_monitoring/logs_and_metrics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
receivers: | ||
filestats/agent: | ||
include: '/etc/observe-agent/otel-collector.yaml' | ||
collection_interval: 240m | ||
initial_delay: 60s | ||
|
||
filelog/agent-config: # TODO: Add observe-agent.yaml once we can obfuscate sensitive config fields | ||
include: [/etc/observe-agent/otel-collector.yaml] | ||
start_at: beginning | ||
poll_interval: 5m | ||
multiline: | ||
line_end_pattern: ENDOFLINEPATTERN | ||
|
||
prometheus/agent: | ||
config: | ||
scrape_configs: | ||
- job_name: 'otelcol' | ||
scrape_interval: 10s | ||
static_configs: | ||
- targets: ['0.0.0.0:8888'] | ||
metric_relabel_configs: | ||
- source_labels: [__name__] | ||
regex: '.*grpc_io.*' | ||
action: drop | ||
|
||
journald/agent: | ||
units: | ||
- observe-agent | ||
priority: info | ||
|
||
service: | ||
pipelines: | ||
metrics/agent-filestats: | ||
receivers: [filestats/agent] | ||
processors: [resourcedetection, resourcedetection/cloud] | ||
exporters: [otlphttp/observe] | ||
|
||
metrics/agent-internal: | ||
receivers: [prometheus/agent, count] | ||
processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch] | ||
exporters: [otlphttp/observe] | ||
|
||
logs/agent-journald: | ||
receivers: [journald/agent] | ||
processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch] | ||
exporters: [otlphttp/observe, count] | ||
|
||
logs/agent-config: | ||
receivers: [filelog/agent-config] | ||
processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch] | ||
exporters: [otlphttp/observe] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
packaging/windows/connections/self_monitoring/logs_and_metrics.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
receivers: | ||
filestats/agent: | ||
include: 'C:\Program Files\Observe\observe-agent\config\otel-collector.yaml' | ||
collection_interval: 240m | ||
initial_delay: 60s | ||
|
||
filelog/agent-config: # TODO: Add observe-agent.yaml once we can obfuscate sensitive config fields | ||
include: ['C:\Program Files\Observe\observe-agent\config\otel-collector.yaml'] | ||
start_at: beginning | ||
poll_interval: 5m | ||
multiline: | ||
line_end_pattern: ENDOFLINEPATTERN | ||
|
||
prometheus/agent: | ||
config: | ||
scrape_configs: | ||
- job_name: 'otelcol' | ||
scrape_interval: 10s | ||
static_configs: | ||
- targets: ['0.0.0.0:8888'] | ||
metric_relabel_configs: | ||
- source_labels: [__name__] | ||
regex: '.*grpc_io.*' | ||
action: drop | ||
|
||
service: | ||
pipelines: | ||
metrics/agent-filestats: | ||
receivers: [filestats/agent] | ||
processors: [resourcedetection, resourcedetection/cloud] | ||
exporters: [otlphttp/observe] | ||
|
||
metrics/agent-internal: | ||
receivers: [prometheus/agent, count] | ||
processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch] | ||
exporters: [otlphttp/observe] | ||
|
||
logs/agent-config: | ||
receivers: [filelog/agent-config] | ||
processors: [memory_limiter, transform/truncate, resourcedetection, resourcedetection/cloud, batch] | ||
exporters: [otlphttp/observe] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters