louislam / uptime-kuma

A fancy self-hosted monitoring tool

Home Page:https://uptime.kuma.pet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ping monitoring returns garbled data upon failure

niujinkai opened this issue · comments

📑 I have found these related issues/pull requests

No related issues found

🛡️ Security Policy

Description

image

👟 Reproduction steps

A ping monitoring has been configured, and when a fault alarm occurs in the ping monitoring, the returned information is garbled

👀 Expected behavior

Will result in the inability to analyze and determine the specific cause of the malfunction

😓 Actual Behavior

The actual returned code is garbled and cannot determine the specific fault phenomenon

🐻 Uptime-Kuma Version

1.23.12

💻 Operating System and Arch

WindowsServer2012 Installed the relevant environment as required

🌐 Browser

Version 124.0.6367.61 (official version) (64 bit)

🖥️ Deployment Environment

  • Runtime: WindowsServer2012 Node.js v20.12.2 npm10.5.0
  • Database: sqllite
  • Filesystem used to store the database on: ntfs
  • number of monitors: 41

📝 Relevant log output

���� Ping IPaddress ���� 56 �ֽڵ�����: ����ʱ�� IPaddress �� Ping ͳ����Ϣ: ���ݰ�: �ѷ��� = 1���ѽ��� = 0����ʧ = 1 (100% ��ʧ)��

This issue should be caused by a character set encoding related issue. We kindly request optimization or resolution. Thank you very much!

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

Do you really want to inquire about the implementation principle of this ping monitoring? Is it calling the ping tool of the Windows system or?
Also, is there a solution at the code level for this? For example, adding character set selection?

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

I have researched and found a solution here
I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

image

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

I took a look and it seems that every ping is a ping command executed by calling the Windows command prompt. If that's the case, then my method should be suitable. I will pay more attention to this solution. If it is feasible, then it can be used as a solution to this problem.

WindowsServer2012

Please consider upgrading. That is a really old OS

Is it calling the ping tool of the Windows system or?

The arguments for child_process.spawn code executing the ping on windows is found here:

https://github.com/louislam/node-ping/blob/master/lib/builder/win.js

WindowsServer2012

Please consider upgrading. That is a really old OS

Hello, the server version cannot be upgraded due to hardware limitations.

Is it calling the ping tool of the Windows system or?

The arguments for child_process.spawn code executing the ping on windows is found here:

https://github.com/louislam/node-ping/blob/master/lib/builder/win.js

Let me first see if the method mentioned above can solve the problem of garbled characters.
As long as it can solve the problem in the end, that's all.

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

After testing, this method is feasible and can be used as a reference method. @louislam @CommanderStorm

What do you mean by reference method?

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

I don't get what happened here. @niujinkai what do you mean?

So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue?

I don't get what happened here. @niujinkai what do you mean?

So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue?

Yes, I set the default character set in the Windows built-in command prompt to American or English, which solved the problem of garbled characters.
@CommanderStorm

Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?

Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?

I have only made settings for the command prompt. Right click on the command prompt title bar, click on default values, and you can set them in the options. However, this is for the server2012 system, and the settings may be different for other versions of the operating system. Additionally, I did not change all English for the entire operating system.

Does uptime-kuma still return garabled ping responses changing said setting?

Does uptime-kuma still return garabled ping responses changing said setting?

There is no need to make any adjustments when returning normally. I see that when the fault state is restored, no information is returned and there are no errors