scalyr / scalyr-agent-2

The source code for Scalyr Agent 2, the daemon process Scalyr customers run on their servers to collect metrics and logs.
Apache License 2.0
70 stars 56 forks source link

Encoding FR #1180

Open tbiziv opened 1 year ago

tbiziv commented 1 year ago

Hello,

I would like to know if there is a parameter in the configuration to specify the correct encoding. In French, accents are not recognised for Windows logs.

Any help is appreciated. Thank you!

image

ajtcode commented 1 year ago

Could you please provide some additional information about your operating environment?

tbiziv commented 1 year ago

Windows 11 Pro (10.0.22621 build 22621)

Current time:            Thu Aug 17 07:37:28 2023 UTC
Agent started at:        Thu Aug 17 07:12:51 2023 UTC
Main process pid:        6864
Version:                 2.2.4
VCS revision:            2f76c1a2b73fed1d3bf97acb497686552fef849e
Python version:          3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Agent running as:        P44-58INFO\Administrators
Agent log:               C:\Program Files (x86)\Scalyr\log\agent.log
ServerHost:              P44-58INFO
Compression algorithm:   deflate
Compression level:       6
Average status time:     0.0038 sec.

Agent configuration:
====================

Configuration file:    C:\Program Files (x86)\Scalyr\config\agent.json
Status:                Good (files parsed successfully)
Last checked:          Thu Aug 17 07:37:24 2023 UTC
Last changed observed: Thu Aug 17 07:12:51 2023 UTC

Environment variables: SCALYR_API_KEY = <Missing>
                       SCALYR_SERVER = <Missing>
                       SCALYR = C:\Program Files (x86)\Scalyr\

Log transmission:
=================

(these statistics cover the period from Thu Aug 17 07:12:51 2023 UTC)

Bytes uploaded successfully:               544017
Last successful communication with Scalyr: Thu Aug 17 07:37:28 2023 UTC
Last attempt:                              Thu Aug 17 07:37:28 2023 UTC
Last copy request size:                    1493
Last copy response size:                   37
Last copy response status:                 success
Health check:                              Good

Path C:\Program Files (x86)\Scalyr\log\agent.log: copied 19545 bytes (89 lines), 0 bytes pending, last checked Thu Aug 17 07:37:28 2023 UTC
Path C:\Program Files (x86)\Scalyr\log\windows_event_log_monitor.log: copied 2494171 bytes (2003 lines), 0 bytes pending, last checked Thu Aug 17 07:37:28 2023 UTC
Path C:\Program Files (x86)\Scalyr\log\windows_system_metrics.log: copied 109639 bytes (1127 lines), 0 bytes pending, last checked Thu Aug 17 07:37:28 2023 UTC
Path C:\Program Files (x86)\Scalyr\log\windows_process_metrics.log: copied 97801 bytes (882 lines), 0 bytes pending, last checked Thu Aug 17 07:37:28 2023 UTC

Glob: C:\Program Files (x86)\Scalyr\log\agent-worker-session-*.log:: last scanned for glob matches at Thu Aug 17 07:36:54 2023 UTC

Monitors:
=========

(these statistics cover the period from Thu Aug 17 07:12:51 2023 UTC)

windows_event_log_monitor(): 2327 lines emitted, 0 errors
windows_system_metrics(): 1127 lines emitted, 0 errors
windows_process_metrics(agent): 882 lines emitted, 0 errors
ajtcode commented 1 year ago

Could you please confirm the locale that is presently used by your Windows 11 instance?

Does changing it to UTF-8 (by clicking "Control Panel" -> "Clock and Region" -> "Region" -> "Administrative tab" -> "Change system locale" -> enable Beta:Use Unicode UTF-8 for worldwide language support) resolve this behavior?

tbiziv commented 1 year ago

Thank you, the problem has been resolved :)

But why can't scalyr fix the problem automatically?

ajtcode commented 1 year ago

In this particular example, it's likely an issue with the inconsistencies associated with the range of Windows operating systems and generalized support for UTF-8.