Hello, I’m trying to install the Synthetic Monitoring Agent in AWS Fargate to use it as a private probe, but when I try to run it, I got the “Invalid Api token” message in the AWS logs.
I already set up the environmental variables in the Fargate configurations like this:
api-token: xxxxx
api-server-address: synthetic-monitoring-api-us-east-0.grafana.net:443
Already added a security group with inbound rules to accept the grafana SM API
And when I try to run it in local with this command:
docker run --name grafana-sm -p 4050:4050 grafana/synthetic-monitoring-agent --api-server-address=${GRAFANA_SM_API_SERVER} --api-token=${GRAFANA_SM_API_TOKEN} --verbose=true
I get this error:
{"level":"error","program":"synthetic-monitoring-agent","subsystem":"adhoc","error":"rpc error: code = Unimplemented desc = unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type \"text/plain\"","ok":true,"action":"registering ad-hoc probe with synthetic-monitoring-api","code":12,"time":1727488697406,"message":"unexpected HTTP status code received from server: 404 (Not Found); transport: received unexpected content-type \"text/plain\""}
I tried running the same command in an AWS EC2 instance and got the same message that I received in local.
Synthetic Monitoring Agent Docker image [v0.28.0]
Local OS: Linux 5.15.146.1-microsoft-standard-WSL2
EC2 instance OS: Linux 4.14.336-255.557.amzn2.x86_64
I followed this guide:
Set up private probes | Grafana Cloud documentation
P.S. I’m not being able to install the Synthetic Monitoring plugin in local, I followed multiple guides and every time I get an error about unsupported media type when I click in get started button, maybe this information is useful and there is something wrong with my local environment, but I don’t understand why is not working in AWS