Comments (7)
ansible-galaxy collection install grafana.grafana:2.0.0 --force
Starting galaxy collection install process
Process install dependency map
Starting collection install process
Downloading https://galaxy.ansible.com/download/grafana-grafana-2.0.0.tar.gz to /home/user/.ansible/tmp/ansible-local-14391lsp98y6s/tmpqnsaipml/grafana-grafana-2.0.0-cvfsnfq5
Installing 'grafana.grafana:2.0.0' to '/home/user/.ansible/collections/ansible_collections/grafana/grafana'
grafana.grafana:2.0.0 was installed successfully
sudo rm /usr/local/bin/grafana-agent
sudo rm /etc/systemd/system/multi-user.target.wants/grafana-agent.service
sudo rm -r /etc/grafana/
sudo rm -r /etc/grafana-agent/
Interestingly, the config file /etc/grafana/agent-config.yaml
(as it is referenced in the service, still) isn't recreated (I am using the grafana_agent_provisioned_config_file
variable as documented now) unlike the service and binary files.
Also, TASK [grafana.grafana.grafana_agent : Ensure Grafana Agent is started and enabled on boot]
doesn't fail despite systemctl status grafana-agent.service
clearly shows the service failed to start.
If its still an issue after this, Feel free to reopen the issue, Happy to debug further
I think I lack the permission to do this
from grafana-ansible-collection.
I encountered an issue while using the latest version of the grafana.grafana
collection (2.0.0). In my playbook, I have a mix of amd64
and arm64
hosts. The problem arises when running the playbook, as it fails and displays the following error message:
TASK [grafana.grafana.grafana_agent : Propagate downloaded binary] *************************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: If you are using a module and expect the file to exist on the remote, see the remote_src option
fatal: [pi01]: FAILED! => {"changed": false, "msg": "Could not find or access '/tmp/grafana-agent/grafana-agent-linux-arm64' on the Ansible Controller.\nIf you are using a module and expect the file to exist on the remote, see the remote_src option"}
Upon investigation, I discovered that the grafana-agent.zip
file contains the amd64
binary instead of the expected arm64
binary on the executing host, so the binary the error is reporting doesn't exist. I also noticed that the file's timestamp predates the playbook failure, indicating that the role only downloads the file once and does not attempt any further downloads for the different architectures.
Thoughts?
from grafana-ansible-collection.
I was experiencing this issue as well. I just submitted PR #80, which should fix the issue.
from grafana-ansible-collection.
Thanks @aWeinzierl for capturing this. With the new Grafana Agent Role updates, The binary URL has also been fixed as part of the new release 2.0.0
I have added a example doc which you can refer for getting started with the updated Agent role
from grafana-ansible-collection.
Hi, thank you for your reply & update!
While the compatible binary is downloaded now, the grafana-agent.service
still refers to agent-linux-amd64
(even after deleting the service configuration and running the playbook again):
$ ls /usr/local/bin/
grafana-agent
$ cat /etc/systemd/system/multi-user.target.wants/grafana-agent.service
[Unit]
Description=Grafana Agent
[Service]
User=grafana-agent
ExecStart=/usr/local/bin/agent-linux-amd64 --config.file=/etc/grafana/agent-config.yaml
Restart=always
[Install]
WantedBy=multi-user.target
The result is that the service fails, because it can't find the executable:
grafana-agent.service: Failed to locate executable /usr/local/bin/agent-linux-amd64: No such file or directory
systemd[3158]: grafana-agent.service: Failed at step EXEC spawning /usr/local/bin/agent-linux-amd64: No such file or directory
systemd[1]: Started Grafana Agent.
systemd[1]: grafana-agent.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: grafana-agent.service: Failed with result 'exit-code'.
systemd[1]: grafana-agent.service: Scheduled restart job, restart counter is at 1.
systemd[1]: Stopped Grafana Agent.
from grafana-ansible-collection.
Try reinstalling the collection using --force
If that doesn't solve it, I would recommend removing the existing Grafana Agent binary, Config file and the service file from the system. And then run the updated playbook (Make sure the collection version is 2.0.0 or above).
If its still an issue after this, Feel free to reopen the issue, Happy to debug further
from grafana-ansible-collection.
Try changing the
To just
grafana-agent
from grafana-ansible-collection.
Related Issues (20)
- Grafana Datasource - wrong parameter name for community.grafana.grafana_datasource HOT 2
- Grafana Agent role can not run in check mode
- Improve support and documentation for Grafana Agent Flow mode HOT 3
- Service start failed in Flow mode HOT 4
- grafana_url unsupported in grafana.grafana.datasource module HOT 2
- Implement templating of grafana_agent_provisioned_config_file HOT 1
- Grafana Agent - Final check
- Grafana Agent - Repo Install HOT 3
- Add support for ansible-playbook serial > 1 (manage multiple hosts at a time)
- idempotent when absent HOT 1
- Add support for feature_toggles in grafana.ini HOT 2
- BUG: Download grafana agent archive to local folder in case of different arch HOT 7
- Grafana agent service failed to start on reboot when scraping depends on another service that has not finished restarting HOT 3
- The run_once from #136 breaks multi-arch runs HOT 2
- fix sles bug (analogue to rhel) HOT 3
- Need support for Cloud Access Policies and Tokens HOT 1
- Update grafana-agent role HOT 4
- Grafana package can no longer be installer from apt repo https://apt.grafana.com/ HOT 9
- Loki Ansible Role
- IPv6 address format incompatibility in wait_for action
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-ansible-collection.