Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated README docs and minor script update for LinuxVM to match docs #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions azure/logs/scripts/LinuxVM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@ Required arguments:

- `$vmResourceGroup` Virtual machine resource group

- `$storageAccountName` Name of the Storage account. If the SolarWinds log processing pipeline was created using [default parameters](../../template/deploy-swi-azure-logs-forwarder.ps1), the storage account name is `fnstorswilogs`.
- `$storageAccountName` Name of the Storage account that was created using [default parameters](../../template/deploy-swi-azure-logs-forwarder.ps1)

- `$storageAccountResourceGroup` Resource group where the Storage is located. If the SolarWinds log processing pipeline was created using [default parameters](../../template/deploy-swi-azure-logs-forwarder.ps1), the storage account name is `swi-logs`.

- `$eventHubUri` Event hub URI in the format `https://<Namespace>.servicebus.windows.net/<Event-Hub>`, for example `https://swi-logsns.servicebus.windows.net/swi-logs`.

- `$eventHubPolicyName` and `$eventHubAccessPolicyKey` Name of the policy and policy key for accessing the SolarWinds log processing pipeline event hub. You can copy the values from the Azure Portal. Go to "Your Event Hub" > Shared access policies.
The default policy name for the SolarWinds pipeline is `sendlogs`.
- `$eventHubPolicyName` and `$eventHubAccessPolicyKey` Name of the policy and policy key for accessing the SolarWinds log processing pipeline event hub. You can copy the values from the Azure Portal. Go to "Your Event Hub Namespace" > Shared access policies.
The default policy name for the SolarWinds pipeline is `RootManageSharedAccessKey`.

Pre-requisites:
- The Linux diagnostic extension requires Python 2. If your virtual machine uses a distribution that doesn't include Python 2, install it.
- Refer to https://learn.microsoft.com/en-us/azure/virtual-machines/extensions/diagnostics-linux-v3#python-requirement

Usage:
- `./install_linux_diag_ext.ps1 -vmName my-vm-name -vmResourceGroup <my-resource-group-name> -storageAccountName storage-account-name -storageAccountResourceGroup swi-logs -eventHubUri swi-logsns-xyz123.servicebus.windows.net/swi-logs -eventHubPolicyName RootManageSharedAccessKey -eventHubAccessPolicyKey <your-policy-key-here>`


## Additional information

Expand Down
2 changes: 1 addition & 1 deletion azure/logs/scripts/LinuxVM/install_linux_diag_ext.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $HMAC.key = [Text.Encoding]::ASCII.GetBytes($eventHubAccessPolicyKey)
$Signature = $HMAC.ComputeHash([Text.Encoding]::ASCII.GetBytes($SignatureString))
$Signature = [Convert]::ToBase64String($Signature)
$token = "sr=" + [System.Web.HttpUtility]::UrlEncode($eventHubUri) + "&sig=" + [System.Web.HttpUtility]::UrlEncode($Signature) + "&se=" + $Expires + "&skn=" + $eventHubPolicyName
$sasUrl = "https://" + $eventHubUri + '?' + $token
$sasUrl = $eventHubUri + '?' + $token

# Generate a SAS token for the agent to authenticate with the storage account
$sasToken = New-AzStorageAccountSASToken -Service Blob,Table -ResourceType Service,Container,Object -Permission "racwdlup" -Context (Get-AzStorageAccount -ResourceGroupName $storageAccountResourceGroup -AccountName $storageAccountName).Context -ExpiryTime $([System.DateTime]::Now.AddYears(2))
Expand Down
2 changes: 1 addition & 1 deletion azure/logs/scripts/WindowsVM/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Required arguments:

- `$vmResourceGroup` Virtual machine resource group

- `$storageAccountName` Name of the Storage account. If the SolarWinds log processing pipeline was created using [default parameters](../../template/deploy-swi-azure-logs-forwarder.ps1), the storage account name is `fnstorswilogs`.
- `$storageAccountName` Name of the Storage account that was created using [default parameters](../../template/deploy-swi-azure-logs-forwarder.ps1)

- `$storageAccountKey` API key for accessing storage account. You can copy its value from the Azure Portal. Go to "Your Storage Account" > "Access keys" and copy key1.

Expand Down