Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Readme variable prometheus_binaries_local_dir #279

Closed
asatblurbs opened this issue Mar 31, 2020 · 2 comments
Closed

Readme variable prometheus_binaries_local_dir #279

asatblurbs opened this issue Mar 31, 2020 · 2 comments
Labels
area/docs Improvements or additions to documentation bug Something isn't working

Comments

@asatblurbs
Copy link
Contributor

asatblurbs commented Mar 31, 2020

What did you do?
I run command playbook with this role with variable "prometheus_binaries_local_dir" but it seems playbook could not complete. This need to be done since my environment is located on air gapped network.

Did you expect to see some different?
I expect the playbook complete to install prometheus to the remote host

Environment

  • Role version:

    Insert release version/galaxy tag or Git SHA here

  • Ansible version information:

    ansible 2.9.2 config file = /etc/ansible/ansible.cfg configured module search path = [u'/home/deploy/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /usr/bin/ansible python version = 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]

  • Variables:

---
- name : Deploy prometheus 
  hosts: ams
  roles:
  - cloudalchemy.prometheus
  vars:
    prometheus_version: 2.17.0
    prometheus_binary_local_dir: /data/monitoring/prometheus/
    prometheus_db_dir: /apps/prometheus/database
    prometheus_targets:
      node:
      - targets:
        - localhost:9100
        labels:
          env: ams
  • Ansible playbook execution Logs:
PLAY [Deploy prometheus] **********************************************************************************

TASK [Gathering Facts] ************************************************************************************
ok: [camelia-ams]

TASK [cloudalchemy.prometheus : Gather variables for each operating system] *******************************
ok: [camelia-ams] => (item=/etc/ansible/roles/cloudalchemy.prometheus/vars/redhat.yml)

TASK [cloudalchemy.prometheus : Assert usage of systemd as an init system] ********************************
ok: [camelia-ams] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [cloudalchemy.prometheus : Get systemd version] ******************************************************
ok: [camelia-ams]

TASK [cloudalchemy.prometheus : Set systemd version fact] *************************************************
ok: [camelia-ams]

TASK [cloudalchemy.prometheus : Assert no duplicate config flags] *****************************************
ok: [camelia-ams] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [cloudalchemy.prometheus : Assert external_labels aren't configured twice] ***************************
ok: [camelia-ams] => {
    "changed": false,
    "msg": "All assertions passed"
}

TASK [cloudalchemy.prometheus : Set prometheus external metrics path] *************************************
ok: [camelia-ams]

TASK [cloudalchemy.prometheus : Fail when prometheus_config_flags_extra duplicates parameters set by other variables] ***
skipping: [camelia-ams] => (item=storage.tsdb.retention)
skipping: [camelia-ams] => (item=storage.tsdb.path)
skipping: [camelia-ams] => (item=storage.local.retention)
skipping: [camelia-ams] => (item=storage.local.path)
skipping: [camelia-ams] => (item=config.file)
skipping: [camelia-ams] => (item=web.listen-address)
skipping: [camelia-ams] => (item=web.external-url)

TASK [cloudalchemy.prometheus : Get all file_sd files from scrape_configs] ********************************
ok: [camelia-ams]

TASK [cloudalchemy.prometheus : Fail when file_sd targets are not defined in scrape_configs] **************
skipping: [camelia-ams] => (item={'value': [{u'labels': {u'env': u'ams'}, u'targets': [u'localhost:9100']}], 'key': u'node'})

TASK [cloudalchemy.prometheus : Alert when prometheus_alertmanager_config is empty, but prometheus_alert_rules is specified] ***
ok: [camelia-ams] => {
    "msg": "No alertmanager configuration was specified. If you want your alerts to be sent make sure to specify a prometheus_alertmanager_config in defaults/main.yml.\n"
}

TASK [cloudalchemy.prometheus : Get latest release] *******************************************************
skipping: [camelia-ams]

TASK [cloudalchemy.prometheus : Set prometheus version to {{ _latest_release.json.tag_name[1:] }}] ********
skipping: [camelia-ams]

TASK [cloudalchemy.prometheus : Get checksum list] ********************************************************
fatal: [camelia-ams]: FAILED! => {"msg": "An unhandled exception occurred while running the lookup plugin 'url'. Error was a <class 'ansible.errors.AnsibleError'>, original message: Failed lookup url for https://github.com/prometheus/prometheus/releases/download/v2.17.0/sha256sums.txt : <urlopen error timed out>"}

NO MORE HOSTS LEFT ****************************************************************************************

Anything else we need to know?:
I realized that in Readme File, you put the variable as "prometheus_binaries_local_dir" while in defaults/main.yml, the correct value is prometheus_binary_local_dir. Once I update my playbook file variable accordingly, it successfully complete. Does the Readme need update?

@asatblurbs asatblurbs added the question Further information is requested label Mar 31, 2020
@paulfantom paulfantom added bug Something isn't working and removed question Further information is requested labels Mar 31, 2020
@paulfantom
Copy link
Member

paulfantom commented Mar 31, 2020

Yes, readme needs an update, the correct variable name is in defaults/main.yml. can you create a PR?

@paulfantom paulfantom added the area/docs Improvements or additions to documentation label Mar 31, 2020
@paulfantom
Copy link
Member

Fixed with #280

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/docs Improvements or additions to documentation bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants