Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
AndreasSalv
Explorer
Jump to solution

Json Network Feed

Hi

Try to create a Network Feed parsing a JSON. Unfortunately Test Feed in SmartConsole always exit with error message:

"Object name contains special characters or whitespaces. Invalid character: 'space'"

 

 

Feed URL: https://www.gstatic.com/ipranges/goog.json

JSON Query: jq -r '.prefixes[].ipv4Prefix'

also tried with JSON Query: jq -r '.prefixes[] | select(.ipv4Prefix) | .ipv4Prefix'

Using the JQ Playground jq playground both of my queries work.

What's wrong with my input in JSON Query field?

 

Thx for support

0 Kudos
2 Solutions

Accepted Solutions
PhoneBoy
Admin
Admin

The JSON Query does not include jq -r, only the expression.

View solution in original post

marclopes
Explorer

Hi, here it worked typing withou quotation marks

Sem título.png

 

 

View solution in original post

10 Replies
PhoneBoy
Admin
Admin

The JSON Query does not include jq -r, only the expression.

the_rock
Legend
Legend

Phoneboy is right, I tested in the lab and it worked how he described it.

Andy

0 Kudos
AndreasSalv
Explorer

Thanks for your answers - I also tried without the "jq" command but get same error message.

Can you post a screenshot of the "New Network Feed" window? 

 

Bild 001.png

I assume I struggle with the quotation marks. I tried several ways but without success!

0 Kudos
the_rock
Legend
Legend

Hey @AndreasSalv 

Please give me some time and I will test. I cant recall how I did it the other day, but will figure it out.

Andy

0 Kudos
the_rock
Legend
Legend

Below is 100% right, but now says no data found, so must be something wrong with the feed itself.

Andy

".prefixes[] | select(.ipv4Prefix) | .ipv4Prefix"

0 Kudos
AndreasSalv
Explorer

Sorry fo the delay .... tested directly on cli and there I get data:

[Expert@nfw110:1]# curl_cli -k https://www.gstatic.com/ipranges/goog.json | jq -r ".prefixes[] | select(.ipv4Prefix) | .ipv4Prefix"

Tested on SmartConsole again:

Bild 018.png

Result:

Bild 019.png

 

and tested this way:

Bild 021.png

and got:

Bild 020.png

so difference is used fw appliance:

curl_cli uses vs1 on nfw110 (this is also the finally used one), SmartConsole uses nfw500 which is not the one I really want but I can't choose a VSX based fw...

 

 

 

 

0 Kudos
the_rock
Legend
Legend

Did you do it like I tried?

".prefixes[] | select(.ipv4Prefix) | .ipv4Prefix"

Andy

0 Kudos
AndreasSalv
Explorer

Yes also tried without the -r Option of JQ

 

0 Kudos
marclopes
Explorer

Hi, here it worked typing withou quotation marks

Sem título.png

 

 

the_rock
Legend
Legend

Good! Just tested it, works as well.

Andy

0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events