Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to find 'alertmanager/templates' in expected paths #511

Open
Kleinendorst opened this issue Jan 11, 2025 · 0 comments
Open

Unable to find 'alertmanager/templates' in expected paths #511

Kleinendorst opened this issue Jan 11, 2025 · 0 comments

Comments

@Kleinendorst
Copy link

Description

I'm including the entire collection and using most of the roles like this:

Root playbook > custom 'monitoring' role > includes of prometheus.prometheus roles.

I include Prometheus, Node Exporter and alertmanager this way. This setup worked flawlessly when I set it up using version 0.17.1. I recently upgraded to version 0.23.0 and it seems to have broken the alertmanager (the other roles work fine still and most tasks of the alertmanager role are run as well).

In the monitoring role (my own role) I include the alertmanager role like this:

- name: Include the Prometheus - alertmanager role
  ansible.builtin.include_role:
    name: prometheus.prometheus.alertmanager

I also have some configuration in a vars file (probably not that relevant here but I'll include it for completeness):

# Alertmanager
alertmanager_version: "{{ versions.monitoring.alertmanager }}"
alertmanager_web_listen_address: 127.0.0.1:9093
# Telegram configuration inspired by this source:
# https://www.stranatesta.eu/tech/how-to-configure-prometheus-alertmanager-to-send-alerts-to-telegram/#configure-alertmanager
alertmanager_receivers:
  - name: telegram
    telegram_configs:
      - bot_token: "{{ telegram_bot_token }}"
        api_url: 'https://api.telegram.org'
        chat_id: "{{ telegram_chat_id }}"
        parse_mode: ''
alertmanager_route:
  receiver: telegram

When running the alertmanager service doesn't start and I get this warning on one of the tasks:

It suggest running with -vvvvv to see paths which I already did here. I also obfuscated some output.

TASK [prometheus.prometheus.alertmanager : Copy alertmanager template files] *******************************************************************************************************************************************************************************************
task path: /home/thomas/.ansible/collections/ansible_collections/prometheus/prometheus/roles/alertmanager/tasks/configure.yml:64
looking for "alertmanager/templates" at "/home/thomas/.ansible/collections/ansible_collections/prometheus/prometheus/roles/alertmanager/files/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/.ansible/collections/ansible_collections/prometheus/prometheus/roles/alertmanager/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/roles/monitoring/files/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/roles/monitoring/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/.ansible/collections/ansible_collections/prometheus/prometheus/roles/alertmanager/tasks/files/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/.ansible/collections/ansible_collections/prometheus/prometheus/roles/alertmanager/tasks/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/files/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/files/alertmanager/templates"
looking for "alertmanager/templates" at "/home/thomas/repositories/**************/alertmanager/templates"
[WARNING]: Unable to find 'alertmanager/templates' in expected paths (use -vvvvv to see paths)
skipping: [********************************] => {
    "changed": false,
    "skipped_reason": "No items in the list"
}
looking for "vault.yml" at "/home/thomas/repositories/**************/vars/vault.yml"
looking for "vault.yml" at "/home/thomas/repositories/**************/vault.yml"
Read vars_file 'vault.yml'
looking for "versions.yml" at "/home/thomas/repositories/**************/vars/versions.yml"
looking for "versions.yml" at "/home/thomas/repositories/**************/versions.yml"
Read vars_file 'versions.yml'
looking for "vault.yml" at "/home/thomas/repositories/**************/vars/vault.yml"
looking for "vault.yml" at "/home/thomas/repositories/**************/vault.yml"
Read vars_file 'vault.yml'
looking for "versions.yml" at "/home/thomas/repositories/**************/vars/versions.yml"
looking for "versions.yml" at "/home/thomas/repositories/**************/versions.yml"
Read vars_file 'versions.yml

Could this be a bug?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant