Skip to content

Do not fail if state is not started - #13

Open
jaypee-solutions wants to merge 1 commit into
geerlingguy:masterfrom
jaypee-solutions:jp/no-fail
Open

Do not fail if state is not started#13
jaypee-solutions wants to merge 1 commit into
geerlingguy:masterfrom
jaypee-solutions:jp/no-fail

Conversation

@jaypee-solutions

Copy link
Copy Markdown

When using node_exporter_state stopped the role will fail,
while nodeexporter is expected to not respond.

@jaypee-solutions
jaypee-solutions force-pushed the jp/no-fail branch 2 times, most recently from 412c044 to 833e2bb Compare February 24, 2022 16:46
When using node_exporter_state stopped the role will fail,
while nodeexporter is expected to not respond.
@fabricesemti80

Copy link
Copy Markdown

I would like to request this also.

    - role: geerlingguy.node_exporter
      become: true
      node_exporter_state: stopped
      node_exporter_enabled: false

it uninstalls the service indeed, getting:

 systemctl status node_exporter
● node_exporter.service - NodeExporter
     Loaded: loaded (/etc/systemd/system/node_exporter.service; disabled; vendor preset: enabled)
     Active: inactive (dead)

but it indeed errors out the TASK [geerlingguy.node_exporter : Verify node_exporter is responding to requests.] task (as it is expected not running)

@Cedric-Froehner

Copy link
Copy Markdown

Not trying to rush here or anything, but this pull request is on "planned" since 2022. 😉 I would really love to see this feature added.
Also, I would love to add onto it with a general "test_node_exporter" flag, since there are use cases where the node exporter state is started, but the web check will still fail (for example when authentication is required by a node_exporter config).

@Cedric-Froehner

Copy link
Copy Markdown

My last comment also should have referenced issue #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants