235 words
1 minute
Archiving Node Test Results in Nezha Monitor with a Custom Script

Background#

Nezha Monitor is an open-source server monitoring tool that runs on a wide range of operating systems, including Linux and Windows. It tracks server performance, network status, hardware info, and more, with detailed reports and analysis.

I have a handful of VPS boxes whose benchmark results I want to keep in one place, so I wrote a script on top of Nezha that surfaces the archived test results right on the Nezha dashboard. Now all results are viewable in a single place, as shown below.

Nezha Monitor archived test results Nezha Monitor archived test results 1 Nezha Monitor archived test results 2

How to Configure#

In the Nezha admin panel, add the following to the custom script section:

<script>
const nodeCheckResult = {
36: { // Server node ID — find it in the node detail page URL, or in the admin server list table
remark: 'DMIT.EB.WEE', // Node name, just for your own reference
NodeQuality: {
type: 'iframe', // iframe | image
url: 'https://nodequality.com/r/rki21soaA2SlcnF7vBd2jIuDKPfiS6fr', // test result
},
Speedtest: {
type: 'image', // iframe | image
url: 'https://www.speedtest.net/result/17721869331.png', // test result
desc: 'Liaoning Unicom 1000M broadband', // Optional description of the result, only effective for the image type
},
融合怪: { // spiritlhl's "hybrid" all-in-one benchmark script
type: 'iframe', // iframe | image
url: 'https://paste.spiritlhl.net/#/show/VKMWQ.txt', // test result
},
},
// Other server nodes...
};
</script>
<script
defer
src="https://cdn.jsdelivr.net/gh/DevilC0822/config/script/nezhaAgentNodeTestResult.js"></script>

Script Source Code#

Notes#

Tested and working on Nezha V1, official theme only.

Archiving Node Test Results in Nezha Monitor with a Custom Script
https://www.mihouo.com/en/posts/server/nezha-agent-script/
Author
Jia
Published at
2025-05-14
License
CC BY-NC-SA 4.0