Skip to content

Commit

Permalink
Localhost mac otel distro (#24)
Browse files Browse the repository at this point in the history
* change to otel logzio

* change to otel logzio

* add scrapers

* change interval

* change argument
  • Loading branch information
ShiranAvidov authored Aug 10, 2022
1 parent ace53cd commit 20884d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<key>ProgramArguments</key>
<array>
<string>/opt/logzio-otel-collector/otelcol-contrib</string>
<string>/opt/logzio-otel-collector/otelcol-logzio-darwin_amd64</string>
<string>--config</string>
<string>/opt/logzio-otel-collector/otel_config.yaml</string>
</array>
Expand Down
8 changes: 4 additions & 4 deletions Localhost/Mac/System/telemetry/installer/mac/functions.bash
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,15 @@ function create_logzio_opt_dir () {
# Exit Code 2
function get_otel_collector_binary () {
write_log "INFO" "Getting OTEL collector binary ..."
curl -fsSL https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.55.0/otelcol-contrib_0.55.0_darwin_amd64.tar.gz > $logzio_temp_dir/otelcol-contrib.tar.gz 2>$task_error_file
curl -fsSL https://github.com/logzio/otel-collector-distro/releases/download/v0.56.1/otelcol-logzio-darwin_amd64.tar.gz > $logzio_temp_dir/otelcol-logzio.tar.gz 2>$task_error_file
if [[ $? -ne 0 ]]; then
local err=$(cat $task_error_file)
write_run "print_error \"instalelr.bash (2): failed to get OTEL collector binary file from open-telemetry repo.\n $err\""
write_run "print_error \"instalelr.bash (2): failed to get OTEL collector binary file from Logz.io repo.\n $err\""
return 2
fi

otel_bin="$logzio_opt_dir/otelcol-contrib"
tar -zxf $logzio_temp_dir/otelcol-contrib.tar.gz --directory $logzio_opt_dir otelcol-contrib
otel_bin="$logzio_opt_dir/otelcol-logzio-darwin_amd64"
tar -zxf $logzio_temp_dir/otelcol-logzio.tar.gz --directory $logzio_opt_dir
write_run "otel_bin=\"$otel_bin\""
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
hostmetrics:
collection_interval: 30s
collection_interval: 15s
scrapers:
cpu:
disk:
load:
filesystem:
memory:
Expand Down

0 comments on commit 20884d4

Please sign in to comment.