Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with configuration #5088

Open
2 tasks done
vellanix opened this issue Sep 5, 2024 · 2 comments
Open
2 tasks done

Help with configuration #5088

vellanix opened this issue Sep 5, 2024 · 2 comments

Comments

@vellanix
Copy link

vellanix commented Sep 5, 2024

⚠️ Please verify that this question has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ Security Policy

📝 Describe your problem

I need some help to configure a monitor.

I have to call a URL that return a JSON and then check a value in the JSON.

curl https://pool.braiins.com/accounts/profile/json/btc/ -H "SlushPool-Auth-Token: xxxxxxxxxxxxxxx"

that return

{ "username": "vellanix", "btc": { "low_workers": 0, "off_workers": 0, "ok_workers": 4, "dis_workers": 0, } }

and I want to check that the value of "ok_workers" is 4.

My monitoring setup is:
Screenshot 2024-09-05 alle 11 45 32

but unfortunately doesnt work, and in the LOG file I see:

2024-09-05T11:46:21+02:00 [MONITOR] WARN: Monitor #8 'Workers': **Failing: Cannot read properties of undefined (reading 'toString')** | Interval: 60 seconds | Type: json-query | Down Count: 0 | Resend Interval: 0

What's wrong?
Thank you

📝 Error Message(s) or Log

2024-09-05T11:46:21+02:00 [MONITOR] WARN: Monitor #8 'Workers': Failing: Cannot read properties of undefined (reading 'toString') | Interval: 60 seconds | Type: json-query | Down Count: 0 | Resend Interval: 0

🐻 Uptime-Kuma Version

1.23.13

💻 Operating System and Arch

docker

🌐 Browser

chrome

🖥️ Deployment Environment

  • Runtime:
  • Database:
  • Filesystem used to store the database on:
  • number of monitors:
@vellanix vellanix added the help label Sep 5, 2024
@vellanix vellanix changed the title Help with configurazion Help with configuration Sep 5, 2024
@CommanderStorm
Copy link
Collaborator

Sorry for the late reply

First of all, are you sure that the above is returned from the API? The reason I am asking is that that is not valid JSON (see the last ,).

Could you try $.btc.ok_workers?
We have improved the provided docs for this, but this is waiting for #4500

If this does not work, I am asssuming this is because the invalid JSON issue noted above 👀

Copy link

We are clearing up our old help-issues and your issue has been open for 60 days with no activity.
If no comment is made and the stale label is not removed, this issue will be closed in 7 days.

@github-actions github-actions bot added the Stale label Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants