saltstack-formulas / prometheus-formula

Manage a Prometheus installation
Other
27 stars 51 forks source link

[BUG] node_exporter service not restarted on archive fresh install #42

Closed n-rodriguez closed 4 years ago

n-rodriguez commented 4 years ago

Your setup

Formula commit hash / release tag

Versions reports (master & minion)

Pillar / config used


Bug details

Describe the bug

[DEBUG   ] Could not LazyLoad service.mod_run_check: 'service.mod_run_check' is not available.
[INFO    ] Executing command 'systemctl list-units | grep node_exporter >/dev/null 2>&1' in directory '/home/kitchen'
[DEBUG   ] retcode: 1
[DEBUG   ] Last command return code: 1
[INFO    ] ['onlyif condition is false']
[INFO    ] Completed state [node_exporter] at time 14:17:22.658642 (duration_in_ms=983.05)
[INFO    ] Running state [node_exporter] at time 14:17:22.660463
[INFO    ] Executing state service.running for [node_exporter]
[DEBUG   ] Could not LazyLoad service.mod_run_check: 'service.mod_run_check' is not available.
[INFO    ] Executing command 'systemctl list-units | grep node_exporter >/dev/null 2>&1' in directory '/home/kitchen'
[DEBUG   ] retcode: 1
[DEBUG   ] Last command return code: 1
[INFO    ] ['onlyif condition is false']
kitchen@d22a0b418b50:~$ sudo -s
root@d22a0b418b50:/home/kitchen# systemctl list-units | grep node_exporter
root@d22a0b418b50:/home/kitchen# systemctl list-unit-files | grep node_exporter
node_exporter.service                  disabled        enabled      
root@d22a0b418b50:/home/kitchen# 

Steps to reproduce the bug

Expected behaviour

Attempts to fix the bug

Additional context

javierbertoli commented 4 years ago

@n-rodriguez I think the issue is related to the 'assumed' names the formula uses: debian's packages/services are named prometheus-component{-exporter} and the formula assumes component{_exporter}, ie:

Debian's packages (and services): prometheus-alertmanager, prometheus-node-exporter Formula packages (and services): alertmanager, node_exporter

I think these are fixed in #44. If you want to give them a try

n-rodriguez commented 4 years ago

I think these are fixed in #44. If you want to give them a try

It won't work : for instance, here it fails because of the wrong service name due to https://github.com/saltstack-formulas/prometheus-formula/blob/master/prometheus/defaults.yaml#L136

n-rodriguez commented 4 years ago

with all this info you should now understand what I meant here : https://github.com/saltstack-formulas/prometheus-formula/issues/35

saltstack-formulas-travis commented 4 years ago

:tada: This issue has been resolved in version 5.0.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

saltstack-formulas-travis commented 4 years ago

:tada: This issue has been resolved in version 5.0.2 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: