The Windows Agent Ingests ASCII characters only by default. If your application produces Windows events with Unicode characters such as Chinese or Arabic, those events will be dropped by the Agent (note that the same behavior doesn't apply to the Scalyr API).
The workaround solution is to configure the environment variable PYTHONUTF8=1
before the Windows agent starts. Please refer to the documentation on how to configure the Windows environment variables via the UI. The variable can also be configured "system-wide" by running the following PowerShell command
[Environment]::SetEnvironmentVariable("PYTHONUTF8", "1", "Machine")
Confirm the variable is set then start the Scalyr agent.
C:\Program Files (x86)\Scalyr>echo %PYTHONUTF8%
1
C:\Program Files (x86)\Scalyr>scalyr-agent-2.exe start
2022-03-29 22:59:31.404Z WARNING [core] [configuration.py:558] Config file C:\Program Files (x86)\Scalyr\config\agent.json is readable or writable by others (permissions=666). Config files can contain secrets so you are strongly encouraged to change the config file permissions so it's not readable by others.
Configuration verified, starting agent in background.
The agent has started.
Finally, we can test the configuration by ingesting a Windows event with Arabic characters and verifying the result on DataSet.
Here is a sample Windows event with Arabic characters
C:\Program Files (x86)\Scalyr>eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO MYEVENTSOURCE /D "اختبار"
SUCCESS: An event of type 'INFORMATION' was created in the 'APPLICATION' log with 'MYEVENTSOURCE' as the source.
C:\Program Files (x86)\Scalyr>
Confirm that the event is successfully ingested to DataSet
Comments
0 comments
Please sign in to leave a comment.