This documentation contains work-in-progress information for future Elastic Stack and Cloud releases. Use the version selector to view supported release docs. It also contains some Elastic Cloud serverless information. Check out our serverless docs for more details.
Configuration for Windows Services
editConfiguration for Windows Services
editConfiguration for Windows services can be provided by setting environment variables for the specific Windows service in the Windows registry. With PowerShell
$environment = [string[]]@( "ELASTIC_APM_SERVER_URL=http://localhost:8200", "ELASTIC_APM_TRANSACTION_SAMPLE_RATE=1", "ELASTIC_APM_ENVIRONMENT=Production", "ELASTIC_APM_SERVICE_NAME=MyWindowsService") Set-ItemProperty HKLM:SYSTEM\CurrentControlSet\Services\<service-name> -Name Environment -Value $environment
define the environment variables to use for the Windows service |
|
|
The service must then be restarted for the change to take effect
Restart-Service <service-name>