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

Not all monitor fields in API? #46

Open
dqcenter opened this issue Jul 21, 2023 · 3 comments
Open

Not all monitor fields in API? #46

dqcenter opened this issue Jul 21, 2023 · 3 comments

Comments

@dqcenter
Copy link

dqcenter commented Jul 21, 2023

I have setup a few groups for monitors, groups are in fact same monitors records but use the parent field for showing dependances. When posting with curl, seems like this field is ignored. Curl example:

this field is used when i try to get list of monitors with curl:

curl -X 'GET'
'http://10.0.0.17:3002/monitors'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer ${TOKEN}"

"parent": 14,

I tried use different combinations: group, monitor_group, group_id, but none of those are working, in web api this is missed

curl -X 'POST'
'http://10.0.0.17:3002/monitors/'
-H 'accept: application/json'
-H 'Content-Type: application/json'
-H "Authorization: Bearer ${TOKEN}"
-d '{
"type": "http",
"name": "example.co.uk",
"pathName": "My group name / example.co.uk",
"parent": 14,
"interval": 120,
"retryInterval": 120,
"resendInterval": 20,
"maxretries": 3,
"upsideDown": false,
"notificationIDList": [
"1"
],
"url": "https://www.example.co.uk",
"expiryNotification": true,
"ignoreTls": false,
"maxredirects": 10,
"accepted_statuscodes": [
"200-299"
],
"includeSensitiveData": true,
"port": 53,
"dns_resolve_server": "1.1.1.1",
"dns_resolve_type": "A"

}'

${TOKEN} can be obtained with:

TOKEN=$(curl -X 'POST' 'http://10.0.0.17:3002/login/access-token' -H 'accept: application/json' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=&username=admin&password=MYPASSWORDFROMDOCKER' | jq -r ".access_token")

All those are bash commands on same server where docker container is runing

Any help? Thanks

@elliotmatson
Copy link

The groups feature was just added a week or 2 ago, and this repo hasn't been updated in 3 months, so it likely just isn't supported yet. I was planning on looking into this at some point and submitting a PR, but I haven't gotten around to it yet

@MedAziz11
Copy link
Owner

its not supported yet ,ill try to update it

@andyshoover
Copy link

any update on adding monitor group to the api?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants