mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
Ping monitoring returns garbled data upon failure #3290
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#3290
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ghost on GitHub (Apr 22, 2024).
📑 I have found these related issues/pull requests
No related issues found
🛡️ Security Policy
Description
👟 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
📝 Relevant log output
@ghost commented on GitHub (Apr 22, 2024):
This issue should be caused by a character set encoding related issue. We kindly request optimization or resolution. Thank you very much!
@louislam commented on GitHub (Apr 22, 2024):
See https://github.com/louislam/uptime-kuma/issues/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.
@ghost commented on GitHub (Apr 22, 2024):
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?
@ghost commented on GitHub (Apr 22, 2024):
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
@ghost commented on GitHub (Apr 22, 2024):
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.
@CommanderStorm commented on GitHub (Apr 22, 2024):
Please consider upgrading. That is a really old OS
The arguments for
child_process.spawncode executing the ping on windows is found here:https://github.com/louislam/node-ping/blob/master/lib/builder/win.js
@ghost commented on GitHub (Apr 22, 2024):
Hello, the server version cannot be upgraded due to hardware limitations.
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.
@ghost commented on GitHub (Apr 25, 2024):
After testing, this method is feasible and can be used as a reference method. @louislam @CommanderStorm
@CommanderStorm commented on GitHub (Apr 25, 2024):
What do you mean by reference method?
@ghost commented on GitHub (Apr 25, 2024):
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
@CommanderStorm commented on GitHub (Apr 25, 2024):
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?
@ghost commented on GitHub (Apr 25, 2024):
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
@CommanderStorm commented on GitHub (Apr 25, 2024):
Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?
@ghost commented on GitHub (Apr 25, 2024):
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.
@CommanderStorm commented on GitHub (Apr 25, 2024):
Does uptime-kuma still return garabled ping responses changing said setting?
@ghost commented on GitHub (Apr 25, 2024):
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