Skip to content

Commit

Permalink
try to output to file
Browse files Browse the repository at this point in the history
  • Loading branch information
bragi92 committed Oct 31, 2023
1 parent bffe4ef commit 5efc2ed
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00
version: 6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa

# This is the version number of the application being deployed (basically, imagetag for the image built/compatible with this chart semver above). This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00"
appVersion: "6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa"
# dependencies:
# - name: prometheus-node-exporter
# version: "4.21.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ AzureMonitorMetrics:
- validatingwebhookconfigurations
- volumeattachments
ImageRepository: "/azuremonitor/containerinsights/cidev/prometheus-collector/images"
ImageTag: "6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00"
ImageTagWin: "6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00-win"
ImageTagTargetAllocator: "6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00-targetallocator"
ImageTagCfgReader: "6.8.0-ccp-shell-removal-branch-10-31-2023-ca2c7b00-cfg"
ImageTag: "6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa"
ImageTagWin: "6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa-win"
ImageTagTargetAllocator: "6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa-targetallocator"
ImageTagCfgReader: "6.8.0-ccp-shell-removal-branch-10-31-2023-bffe4efa-cfg"
TargetAllocatorEnabled: false
DeploymentReplicas: 1
# The below 2 settings are not Azure Monitor Metrics adapter chart. They are substituted in a different manner.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ exporters:
retry_on_failure:
enabled: false
timeout: 12s
file:
path: "/opt/microsoft/otelcollector/collector-log.json"
processors:
batch:
send_batch_size: 7000
Expand All @@ -39,8 +37,8 @@ service:
pipelines:
metrics:
receivers: [prometheus]
exporters: [otlp, file] # Include the "file" exporter in the list
processors: [batch, resource]
exporters: [otlp]
processors: [batch,resource]
telemetry:
logs:
level: warn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exporters:
const_labels:
cluster: $AZMON_CLUSTER_LABEL
file:
path: /opt/microsoft/otelcollector/collector-log.json
path: /opt/microsoft/otelcollector/promotel.json
otlp:
endpoint: 127.0.0.1:55680
tls:
Expand Down Expand Up @@ -36,7 +36,7 @@ service:
pipelines:
metrics:
receivers: [prometheus]
exporters: [otlp, file]
exporters: [otlp]
processors: [batch, resource]
telemetry:
logs:
Expand Down
4 changes: 2 additions & 2 deletions otelcollector/prometheuscollector/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ func main(){
// fmt.Printf("Error starting otelcollector: %v\n", err)
// }
fmt.Println("startCommand otelcollector")
startCommand("/opt/microsoft/otelcollector/otelcollector", "--config", collectorConfig)
startCommand("/opt/microsoft/otelcollector/otelcollector", "--config", collectorConfig, "&>", "/opt/microsoft/otelcollector/collector-log.txt")

otelCollectorVersion, err := exec.Command("/opt/microsoft/otelcollector/otelcollector", "--version").Output()
otelCollectorVersion, err := exec.Command("/opt/microsoft/otelcollector/otelcollector", "--version", "").Output()
if err != nil {
fmt.Printf("Error getting otelcollector version: %v\n", err)
} else {
Expand Down

0 comments on commit 5efc2ed

Please sign in to comment.