new flags are: - server.http.address - server.grpc.address
So we have to remove: http_listen_address, http_listen_port, grpc_listen_address and grpc_listen_port fields from config file.
And execute this line:
HOSTNAME="maas-system-maas" AGENT_WAL_DIR="/var/lib/grafana-agent/wal" AGENT_POS_DIR="/var/lib/grafana-agent/positions" PROMETHEUS_REMOTE_WRITE_URL="http://10.245.136.5:9090/api/v1/write" LOKI_API_URL="http://10.245.136.5:3100/loki/api/v1/push" MAAS_LOGS="/var/snap/maas/common/log/" MAAS_IS_REGION="true" MAAS_IS_RACK="true" MAAS_AZ="default" /opt/agent/agent-linux-amd64 -config.expand-env -config.file=/opt/agent/agent.yml -server.http.address="0.0.0.0:3100" -server.grpc.address="0.0.0.0:9095"
new flags are:
- server.http.address
- server.grpc.address
So we have to remove: http_listen_ address, http_listen_port, grpc_listen_address and grpc_listen_port fields from config file.
And execute this line:
HOSTNAME= "maas-system- maas" AGENT_WAL_ DIR="/var/ lib/grafana- agent/wal" AGENT_POS_ DIR="/var/ lib/grafana- agent/positions " PROMETHEUS_ REMOTE_ WRITE_URL= "http:// 10.245. 136.5:9090/ api/v1/ write" LOKI_API_URL="http:// 10.245. 136.5:3100/ loki/api/ v1/push" MAAS_LOGS= "/var/snap/ maas/common/ log/" MAAS_IS_ REGION= "true" MAAS_IS_RACK="true" MAAS_AZ="default" agent-linux- amd64 -config.expand-env -config. file=/opt/ agent/agent. yml -server. http.address= "0.0.0. 0:3100" -server. grpc.address= "0.0.0. 0:9095"
/opt/agent/