Following up on my post in another thread, i'm having issues with properly handling converted JSON data from HTTP agent in a discovery rule.
I am doing a simple request to an URL that returns a value in clear text, as example
I'm using the function in HTTP agent to convert this to JSON which returns
Notice how it does not add an array.
Using this, i'm getting multiple errors. Without defining any LLD Macros i get
.
Adding a macro with JSONPath $.body or $..body gives the same error.
Using JSONPath $.. gives
I have also tried JSONPath $.* and $..*, both giving errors.
There are no preprocessing steps added.
I'm starting to think that the "Convert to JSON" should have wrapped the data in an array. Perhaps there is a bug?
Anyone else have some suggestions to what i could try, or can point out what i may be doing wrong?
Thank you!
I am doing a simple request to an URL that returns a value in clear text, as example
Code:
mydata=0
Code:
{"body":"mydata=0"}
Using this, i'm getting multiple errors. Without defining any LLD Macros i get
Cannot find the "data" array in the received JSON object.
Adding a macro with JSONPath $.body or $..body gives the same error.
Using JSONPath $.. gives
Cannot process LLD macro "{#UNIT_ID}": jsonpath was unexpectedly terminated.
There are no preprocessing steps added.
I'm starting to think that the "Convert to JSON" should have wrapped the data in an array. Perhaps there is a bug?
Anyone else have some suggestions to what i could try, or can point out what i may be doing wrong?
Thank you!