-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* prerequisites * installer * fix comment * fix comment * fix log * add windows localhost config * bool required test * installer * add supportedOs * remove required * logs * installer * metrics * logs * add title * fix connection tests * fix appdata dir * fix log sources empty * fix log sources empty * add script before vars * add if * fix using var * fix selected logs * fix yq appenders * fix yq appenders * fix yq appenders * fix yq appenders * fix yq * fix yq * fix yq * fix file * use otel distro * service * add information * delete existing otel bin * otel logs * otel logs * add title * update dashboards * remove batch
- Loading branch information
1 parent
20884d4
commit 7a3f0bd
Showing
22 changed files
with
1,080 additions
and
10 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
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
81 changes: 81 additions & 0 deletions
81
Localhost/Windows/System/prerequisites/windows/functions.ps1
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,81 @@ | ||
################################################################################################################################# | ||
############################################### Prerequisites Windows Functions ################################################# | ||
################################################################################################################################# | ||
|
||
# Installs yq | ||
# Error: | ||
# Exit Code 1 | ||
function Install-YQ { | ||
. $using:logzioTempDir\utils_functions.ps1 | ||
$local:logFile = $using:logFile | ||
$local:runFile = $using:runFile | ||
$local:taskErrorFile = $using:taskErrorFile | ||
|
||
Write-Log "INFO" "Checking if yq is installed ..." | ||
|
||
Get-Command yq 2>&1 | Out-Null | ||
if ($?) { | ||
return | ||
} | ||
|
||
$local:result = Install-Chocolatey | ||
if (-Not [string]::IsNullOrEmpty($result) -and $result -gt 0) { | ||
return 1 | ||
} | ||
|
||
Write-Log "INFO" "Installing yq ..." | ||
choco install yq -y 2>$using:taskErrorFile | Out-Null | ||
if ($?) { | ||
return | ||
} | ||
|
||
$local:err = Get-TaskError | ||
Write-Run "Write-Error `"prerequisites.ps1 (1): failed to install yq.`n $err`"" | ||
return 1 | ||
} | ||
|
||
# Checks if localhost can connect to Logz.io logs (port 8071) | ||
# Error: | ||
# Exit Code 2 | ||
function Test-CanLocalhostConnectToLogzioLogs { | ||
. $using:logzioTempDir\utils_functions.ps1 | ||
$local:logFile = $using:logFile | ||
$local:runFile = $using:runFile | ||
|
||
Write-Log "INFO" "Checking if localhost can connect to Logz.io logs (port 8071) ..." | ||
|
||
$ProgressPreference = "SilentlyContinue" | ||
$WarningPreference = "SilentlyContinue" | ||
$local:result = Test-NetConnection -ComputerName listener.logz.io -Port 8071 -InformationLevel Quiet | ||
$ProgressPreference = "Continue" | ||
$WarningPreference = "Continue" | ||
if ($result) { | ||
return | ||
} | ||
|
||
Write-Run "Write-Error `"prerequisites.ps1 (2): localhost cannot connect to Logz.io logs. please check your network for port 8071`"" | ||
return 2 | ||
} | ||
|
||
# Checks if localhost can connect to Logz.io metrics (port 8053) | ||
# Error: | ||
# Exit Code 2 | ||
function Test-CanLocalhostConnectToLogzioMetrics { | ||
. $using:logzioTempDir\utils_functions.ps1 | ||
$local:logFile = $using:logFile | ||
$local:runFile = $using:runFile | ||
|
||
Write-Log "INFO" "Checking if localhost can connect to Logz.io metrics (port 8053) ..." | ||
|
||
$ProgressPreference = "SilentlyContinue" | ||
$WarningPreference = "SilentlyContinue" | ||
$local:result = Test-NetConnection -ComputerName listener.logz.io -Port 8053 -InformationLevel Quiet | ||
$ProgressPreference = "Continue" | ||
$WarningPreference = "Continue" | ||
if ($result) { | ||
return | ||
} | ||
|
||
Write-Run "Write-Error `"prerequisites.ps1 (2): localhost cannot connect to Logz.io logs. please check your network for port 8053`"" | ||
return 2 | ||
} |
19 changes: 19 additions & 0 deletions
19
Localhost/Windows/System/prerequisites/windows/prerequisites.ps1
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,19 @@ | ||
################################################################################################################################# | ||
################################################# Prerequisites Windows Script ################################################## | ||
################################################################################################################################# | ||
|
||
# Load functions | ||
Write-Log "INFO" "Loading prerequisites functions ..." | ||
. $logzioTempDir\prerequisites_functions.ps1 | ||
|
||
# Install yq | ||
Invoke-Task "Install-YQ" "installing yq" | ||
|
||
# Check if localhost can connect to Logz.io logs (port 8071) | ||
Invoke-Task "Test-CanLocalhostConnectToLogzioLogs" "checking if localhost can connect to Logz.io logs" | ||
|
||
# Check if localhost can connect to Logz.io metrics (port 8053) | ||
Invoke-Task "Test-CanLocalhostConnectToLogzioMetrics" "checking if localhost can connect to Logz.io metrics" | ||
|
||
# Finished successfully | ||
Exit 0 |
21 changes: 21 additions & 0 deletions
21
Localhost/Windows/System/telemetry/installer/otel_config.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,21 @@ | ||
receivers: | ||
processors: | ||
resourcedetection/system: | ||
detectors: ["system"] | ||
system: | ||
hostname_sources: ["os"] | ||
exporters: | ||
logging: | ||
service: | ||
pipelines: | ||
logs: | ||
receivers: [] | ||
processors: [resourcedetection/system] | ||
exporters: [] | ||
metrics: | ||
receivers: [] | ||
processors: [resourcedetection/system] | ||
exporters: [] | ||
telemetry: | ||
logs: | ||
level: "debug" |
Oops, something went wrong.