hi i have already setup maxadmin on maxscale can access from rest api this is my configuration
.....
[CLI_Service]
type=service
router=cli
[CLI_Listener]
type=listener
service=CLI_Service
protocol=maxscaled
address=192.168.101.107
socket=default
[MaxAdmin_Inet]
type=listener
service=CLI_Service
protocol=HTTPD
address=192.168.101.107
port=8010
but when i test the url like this
curl --include --basic --user "admin:mariadb" http://192.168.101.107:8010/v1/servers
the result is like this
HTTP/1.1 200 OK
Date: Wed, 13 May 2020 11:33:15 GMT
Server: MaxScale(c) v.1.0.0
Connection: close
WWW-Authenticate: Basic realm="MaxInfo"
Content-Type: application/json
Commands must consist of at least two words. Type help for a list of commands
whether i miss about the configuration ?
Best Answer
already got for default configuration when you need enable rest api maxscale
the tag must be
[maxscale]
and this is part when you need enable rest api for maxscaleadmin_host
as your physical ip serverand then after you restart maxscale service, command
maxctrl list servers
or anything else can't run normally they need run command like thismaxctrl -h 192.168.101.107:8989 list servers
and then you need test rest api
and this is the results