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

Can't capture json if anything else is in output #7

Open
qsypoq opened this issue Nov 13, 2020 · 0 comments
Open

Can't capture json if anything else is in output #7

qsypoq opened this issue Nov 13, 2020 · 0 comments

Comments

@qsypoq
Copy link

qsypoq commented Nov 13, 2020

Hi, I'm testing this plugin and I'm facing a weird behavior, this is my setup:

  • Rundeck 3.3.2
  • jq-json-logfilter 1.0.4

I'm using ansible to get informations from an API, which send me back json datas.
I'm want to capture them, but always facing this same response:

PLAY [XXXX] ***************************************************************
TASK [XXXX] ****************************************************************ok: [localhost]
TASK [XXXX] **********************************************ok: [localhost]
TASK [XXXX] *************************************************ok: [localhost]
TASK [XXXX] *************************************************************ok: [localhost] => 
{ "aaaaaaa": { "bbbbbb": { "ccccc": [ { "ddddd": { "self": { "href": "https://eeeeeeeeeeeee" } },
"attributes": { "fffffff": "ggggggggg" }, "description": "hhhhhhhhh", "id": 111111, "iiiiii": "112233445566",
"jjjjj": "kkkkkkkkkkk" } ] }, "llllllll": { "zzzzz": { "href": "https://mmmmmmmmmmmmmmmm" } } }}

PLAY RECAP *********************************************************************
localhost : ok=4 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0

[error] cannot map the json output: Unrecognized token 'PLAY':
was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false') at [Source: (String)"

I tried with multiple filters which leads to the same things. When trying with debug output it's another word picked up but it still fail.

Did I miss something or is the plugin waiting for a json only output ?

Thanks

@qsypoq qsypoq changed the title Can't capture json is anything else is in output Can't capture json if anything else is in output Nov 13, 2020
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