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

Is there a way to pull a text from a gateway on the management station using established trust (with

I am trying to automate some process and need to get a text file from a gateway on the management station. Is there a way to do it using the established trust? Tried to use run-script to cat the file, but output is garbled text. Thanks. 

0 Kudos
1 Solution

Accepted Solutions
Timothy_Hall
Legend Legend
Legend

Assuming SIC is already established, yes.

GAIA - Easy execute CLI commands on all gateways s...

 

Gateway Performance Optimization R81.20 Course
now available at maxpowerfirewalls.com

View solution in original post

0 Kudos
4 Replies
Timothy_Hall
Legend Legend
Legend

Assuming SIC is already established, yes.

GAIA - Easy execute CLI commands on all gateways s...

 

Gateway Performance Optimization R81.20 Course
now available at maxpowerfirewalls.com
0 Kudos
Jin_Zhou
Contributor

Thanks Tim. That is a great script. I will look into it to see if it can solve my problem.

0 Kudos
masher
Employee
Employee

Depending on the request, the response will be returned with base64 encoding. You would need to parse the response from the gateway and then decode it.

For example - Using mgmt_cli on the Manager and running ifconfig on the gateway and filtering for the task details:

# mgmt_cli -r true run-script script-name test2 script "ifconfig eth1" targets gw01 -f json | jq -r '.tasks[]|."task-details"[]|.responseMessage'| base64 -d

It provides the following data:

---------------------------------------------
Time: [15:02:13] 9/12/2019
---------------------------------------------
"gw01 - test2" succeeded (100%)
eth1 Link encap:Ethernet HWaddr 00:1C:7F:84:6B:68
inet addr:172.16.99.1 Bcast:172.16.99.255 Mask:255.255.255.0
inet6 addr: fe80::21c:7fff:fe84:6b68/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:108809061 errors:0 dropped:10061860 overruns:0 frame:0
TX packets:315274900 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27556684726 (25.6 GiB) TX bytes:443734405363 (413.2 GiB)

 

0 Kudos
Jin_Zhou
Contributor

Thanks. That should work too. However, from Tim's solution I found this command "cprid_util". It should do exact what I need. You can run cprid_util --help for more information.

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events