Use Netdata API when binding to socket?

Phuturist

Verified User
Joined
Dec 30, 2018
Messages
28
I have been running Netdata outside of DA for some time but switched to the custombuild version as it seemed easier to manage. I was however using the Netdata API for managing some stuff and I fail at getting this to work again with the DA custombuild version as I get `Unauthorized` responses after updating the URL and API token. Could someone shed some light on what I need to do to get this working. Previously I used commands like this:

Code:
curl "https://vps.somedomain.com:19999/api/v1/manage/health?cmd=RESET" -H "X-Auth-Token: 2e6xxxxxxxxxxxxxxxxx79"

But changing that to this results in an `Unauthorized` message.
Code:
curl "https://vps.somedomain.com:2222/CMD_NETDATA_SOCK/api/v1/manage/health?cmd=RESET" -H "X-Auth-Token: 2e6xxxxxxxxxxxxxxxxx79"

I'm guessing the `Unauthorized` message comes from DirectAdmin itself but how to work around it?

[EDIT]
What I now did was update the netdata.conf and allow access to management API from outside of DA.
Code:
[web]
bind to = unix:/var/run/netdata/netdata.sock localhost:19995=management
 
Last edited:
Back
Top