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 pass the RUNDECK_PROJECTS_FILTER environment variables to rundeck_exporter #59

Closed
buptzhoutian opened this issue Sep 29, 2022 · 1 comment

Comments

@buptzhoutian
Copy link

buptzhoutian commented Sep 29, 2022

Unable to pass a string value of a shell environment variable which should be a list type for rundeck_exporter

$ export RUNDECK_URL='http://127.0.0.1:4440'
$ export RUNDECK_TOKEN='OxxxxxxP'
$ export RUNDECK_PROJECTS_EXECUTIONS=True
$ export RUNDECK_PROJECTS_FILTER='abc xyz'
$ rundeck_exporter
2022-09-29 15:33:35,028 - CRITICAL - project does not exist: a
2022-09-29 15:33:35,030 - CRITICAL - project does not exist: c
2022-09-29 15:33:35,031 - CRITICAL - project does not exist: b
2022-09-29 15:33:35,037 - CRITICAL - project does not exist: x
2022-09-29 15:33:35,039 - CRITICAL - project does not exist:
2022-09-29 15:33:35,043 - CRITICAL - project does not exist: y
2022-09-29 15:33:35,044 - CRITICAL - project does not exist: z
$ export RUNDECK_PROJECTS_FILTER='["abc","xyz"]'
$ rundeck_exporter
2022-09-29 15:33:57,382 - CRITICAL - project does not exist: b
2022-09-29 15:33:57,383 - CRITICAL - project does not exist: [
2022-09-29 15:33:57,389 - CRITICAL - project does not exist: "
2022-09-29 15:33:57,392 - CRITICAL - project does not exist: a
2022-09-29 15:33:57,393 - CRITICAL - project does not exist: c
2022-09-29 15:33:57,394 - CRITICAL - project does not exist: "
2022-09-29 15:33:57,397 - CRITICAL - project does not exist: "
2022-09-29 15:33:57,404 - CRITICAL - project does not exist: ,
2022-09-29 15:33:57,408 - CRITICAL - project does not exist: x
2022-09-29 15:33:57,410 - CRITICAL - project does not exist: y
2022-09-29 15:33:57,412 - CRITICAL - project does not exist: z
2022-09-29 15:33:57,413 - CRITICAL - project does not exist: "
2022-09-29 15:33:57,416 - CRITICAL - project does not exist: ]

# I can pass it successfully via command line option
$ rundeck_exporter --rundeck.projects.filter abc xyz
2022-09-29 15:34:27,039 - CRITICAL - project does not exist: abc
2022-09-29 15:34:27,040 - CRITICAL - project does not exist: xyz
# they are not real project names
@phsmith
Copy link
Owner

phsmith commented Sep 29, 2022

Hi @buptzhoutian , fixed the problem in the new version of the rundeck_exporter.
Now RUNDECK_PROJECTS_FILTER='abc xyz' should work as expected.

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

2 participants