-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: split out agent self-monitoring into connection (#55)
### Description OB-34551 feat: split out agent self-monitoring into connection ### Checklist - [ ] Created tests which fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
- Loading branch information
1 parent
cb66b59
commit 2c9e2e7
Showing
29 changed files
with
1,790 additions
and
91 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ dist/ | |
agent.exe | ||
agent.exe~ | ||
.DS_Store | ||
observe-agent/ | ||
ocb-build/ | ||
|
||
#integration | ||
*.pem | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
Oops, something went wrong.