Comments (8)
My guess is the response data is a JSON object and Uptime Kuma currently support html only. I will try to improve it.
from uptime-kuma.
Not a JSON object, at least I don't think it could be. It was the response I got when I configured a check for my SMTP port 587 on my mailcow server.
Edit: ignore above, was thinking of smtp, on mobile.
I have two files located on my server served by nginx/php-fpm.
One is a static index.html that is blank except for the number "42".
The other is a php script with the following code:
<?php
echo "4";
echo "2";
I do a check for each file as a seperate service and both checks are used to let me know that my webserver is okay, of course the php check will fail if nginx is down, but that is to be expected.
Maybe the check you do is expecting a particular format? Instead of just a simple response?
from uptime-kuma.
Not a JSON object, at least I don't think it could be. It was the response I got when I configured a check for my SMTP port 587 on my mailcow server.Edit: ignore above, was thinking of smtp, on mobile.
I have two files located on my server served by nginx/php-fpm.
One is a static index.html that is blank except for the number "42".
The other is a php script with the following code:<?php echo "4"; echo "2";
I do a check for each file as a seperate service and both checks are used to let me know that my webserver is okay, of course the php check will fail if nginx is down, but that is to be expected.
Maybe the check you do is expecting a particular format? Instead of just a simple response?
I am sorry that I am a bit lost. Do you mean the error you mentioned at the topic, is related to index.html/index.php hosted on nginx/php-fpm server?
from uptime-kuma.
I am sorry that I am a bit lost. Do you mean the error you mentioned at the topic, is related to index.html/index.php hosted on nginx/php-fpm server?
Correct.
from uptime-kuma.
Just did a test, I replaced my index.html that used to have:
42
with the following:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Answer to the Ultimate Question</title>
</head>
<body>
42
</body>
</html>
It is now functioning, so I think you are on the right track that it is a issue with the way the response is being handled. Maybe don't check if it is valid HTML? Just parse the data for the keyword it gets on the response?
from uptime-kuma.
I made the same change to my php script, it too now works as expected:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>The Answer to the Ultimate Question</title>
</head>
<body>
<?php
echo "4";
echo "2";
?>
</body>
</html>
from uptime-kuma.
Found the root problem, because axios automatically parse the response "42" to number format.
Lucky, JSON.stringify can also fix the problem even though it is not a json.
Thank you for your special case.
from uptime-kuma.
Fixed with 1.0.1
from uptime-kuma.
Related Issues (20)
- Ntfy notification type - button in notification does nothing HOT 1
- [SERVICES] INFO: Failed to start nscd HOT 3
- Do not send notifications for `UP` notifications HOT 3
- monitor in a group if down is reported double HOT 1
- how to add a delay alert for ping HOT 1
- Uptime-Kuma does not respond HOT 3
- Environment Variable To Change Name HOT 1
- `saveStatusPage` socket handler does not use `icon` specified in payload if not base64-encoded HOT 4
- api integration for displaying which monitors do have maintenance and give informations about it HOT 2
- Notifications for Diffrent Events HOT 1
- Can't set timezone Europe/Kyiv HOT 1
- Display Monitor Groups in Mail Subject HOT 2
- Generate Database without launching the server HOT 4
- Some commits are not present in release HOT 1
- Proxy option to notifications channel HOT 1
- Allow expanding error messages/toasts to show the full request/response HOT 1
- Add version info of app to uptime kuma HOT 1
- Cloudflare sites cause ---Timeout of 48000ms exceeded HOT 5
- Incorect message "getaddrinfo ENOTFOUND" on 4xx sites HOT 5
- Clonfigurable Toast notification timeouts to enabling autoclosing `DOWN` toasts HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uptime-kuma.