Skip to content

Commit

Permalink
updates per PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
dgkanatsios committed Feb 29, 2024
1 parent 754e009 commit 1d8f07c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ A lot of these samples require an [Azure subscription, click here to get started
| [Linux metrics with Telegraf and Azure Monitor](linux_metrics_telegraf_azuremonitor) | This script installs and configures [Telegraf](https://github.com/influxdata/telegraf) to send VM performance metrics (CPU/memory/disk/network) to [Azure Monitor](https://learn.microsoft.com/en-us/azure/azure-monitor/overview). |
| [Linux logs with Fluent Bit and Azure Data Explorer (Kusto)](linux_logs_fluentbit_kusto) | This script installs and configures [Fluent Bit](https://github.com/fluent/fluent-bit) to capture real-time logs from your game servers and send them to [Azure Data Explorer (Kusto)](https://learn.microsoft.com/en-us/azure/data-explorer/data-explorer-overview). |
| [Linux logs with Fluent Bit and Azure Blob Storage](linux_logs_fluentbit_azurestorage) | This script installs and configures [Fluent Bit](https://github.com/fluent/fluent-bit) to capture real-time logs from your game servers and send them to [Azure Blob Storage](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction). |
| [Linux custom game server metrics](windows_linux_custom_gameserver_metrics) | This script shows you how to send metrics from your game server to [Telegraf](https://github.com/influxdata/telegraf) and then to the backend of your choice |

### Windows

Expand All @@ -30,6 +31,7 @@ A lot of these samples require an [Azure subscription, click here to get started
| [Windows metrics with Telegraf and Application Insights](windows_metrics_telegraf_applicationinsights) | This script installs and configures [Telegraf](https://github.com/influxdata/telegraf) to send VM performance metrics (CPU/memory/disk/network) to [Application Insights](https://learn.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview). |
| [Windows logs with Telegraf and PlayFab](windows_logs_telegraf_playfab) | This script installs and configures [Telegraf](https://github.com/influxdata/telegraf) to grab game server logs and send them to [PlayFab](https://learn.microsoft.com/en-us/gaming/playfab/). |
| [Windows enable optional diagnostics](windows_enable_optional_diagnostics) | This script enables sending diagnostic data notify Microsoft of application faults, kernel faults, unresponsive applications, and other application specific problems. |
| [Windows custom game server metrics](windows_linux_custom_gameserver_metrics) | This script shows you how to send metrics from your game server to [Telegraf](https://github.com/influxdata/telegraf) and then to the backend of your choice |

## Debugging

Expand Down
6 changes: 6 additions & 0 deletions windows_linux_custom_gameserver_metrics/PF_StartupScript.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ echo "PlayFab Virtual Machine ID is $env:PF_VM_ID" # e.g. vmss:SouthCentralUs:24
echo "Region where the VM is deployed is $env:PF_REGION" # e.g. SouthCentralUs
echo "Shared content folder is $env:PF_SHARED_CONTENT_FOLDER_VM" # e.g. D:\sharedcontentfolder (All servers running on this VM have access to this folder through the PF_SHARED_CONTENT_FOLDER env variable.)

# configure the telegraf configuration file with proper dimensions (title ID/build ID/vm ID)
$telegrafConfPath = "$scriptPath\telegraf.conf"
((Get-Content -path $telegrafConfPath -Raw) -replace '_%PF_TITLE_ID%_', "$env:PF_TITLE_ID") | Set-Content -Path $telegrafConfPath
((Get-Content -path $telegrafConfPath -Raw) -replace '_%PF_BUILD_ID%_', "$env:PF_BUILD_ID") | Set-Content -Path $telegrafConfPath
((Get-Content -path $telegrafConfPath -Raw) -replace '_%PF_VM_ID%_', "$env:PF_VM_ID") | Set-Content -Path $telegrafConfPath

# install telegraf as a Windows service
$telegrafPath = 'C:\Program Files\telegraf'
New-Item -ItemType Directory -Force -Path "$telegrafPath"
Expand Down

0 comments on commit 1d8f07c

Please sign in to comment.