nleiva / ansible-role-grafana_agent

Installs Grafana Cloud Agent on RedHat/CentOS or Debian/Ubuntu servers to collect observability data and send it to Grafana Cloud.
GNU General Public License v3.0
15 stars 19 forks source link

Download of agent v0.31.0 broken #17

Closed bekriebel closed 1 year ago

bekriebel commented 1 year ago

It looks like grafana agent changed their package names to "grafana-agent-{PLATFORM}". This is breaking the download because https://github.com/grafana/agent/releases/latest/download/agent-linux-amd64.zip doesn't exist.

TASK [nleiva.grafana_agent : Download Agent file]
fatal: [ewr00.test.livekit.tavern.at]: FAILED! => changed=false 
  dest: /tmp/agent-linux.zip
  elapsed: 0
  msg: Request failed
  response: 'HTTP Error 404: Not Found'
  status_code: 404
  url: https://github.com/grafana/agent/releases/latest/download/agent-linux-amd64.zip

https://github.com/grafana/agent/releases

HerrSubset commented 1 year ago

I can confirm, just ran into the same problem.

jaakkopero commented 1 year ago

Hi. Isn't the service still trying to load the wrong binary name here:

https://github.com/nleiva/ansible-role-grafana_agent/blob/77badac8864c06458bfe710f93051284b7d9d429/templates/grafana-agent.service.j2#L6

nleiva commented 1 year ago

I'll check it again this week.

nleiva commented 1 year ago

@jaakkopero PR#20 changed this to:

[Service]
Type=simple
ExecStart={{ agent_location }}/grafana-agent-linux-{{ grafana_agent_type[ansible_architecture] }} --config.file={{ config_location }}/agent-config.yaml
Restart=always

Does this work?

jaakkopero commented 1 year ago

Yes this should work, thanks! I somehow ended up looking at a wrong commit before replying earlier today.