use wapi to create/download traffic captures on ha pair

Posts: 7
88     0

i am trying to automate traffic captures from an ha pair, and thought i would do it via the wapi. i've done this on the cli with set_traffic_capture, for both the active and passive nodes.  i did find the perl script uploaded by jim mozley, which i'm using as a touchpoint while i do this via simple curl commands.  so i can get the member id via the member host_name object, which gives me access to the active node of the ha pair.  my question is, is there a way to use the wapi to run capture_traffic_control (and fileop to pull the file) on the passive node of an ha pair?  i looked at the read_token option, hoping that might do it, but i'm not sure that's what that is for (and it came back as an empty array when i tried it). i apologize if i've missed something obvious.




curl examples with output...


$ curl -s --tlsv1 --insecure --user '<username>' 'https://<grid_master>/wapi/v2.7/member?host_name~=<host_name>&_return_fields=host_name'

"_ref": "member/<member_id_hash>:<host_name>",
"host_name": "<host_name>"


$ curl -s --tlsv1 --insecure --user '<username>' -X POST https://<grid_master>/wapi/v2.7/member/<member_id_hash>:<host_name>?_function=capture_traffic_status
Enter host password for user '<username>':
"file_exists": true,
"file_size": 972201826,
"status": "STOPPED"



$ curl -s --tlsv1 --insecure --user '<username>' -X POST 'https://<grid_master>/wapi/v2.7/member/<member_id_hash>:<host_name>?_function=read_token'
Enter host password for user '<username>':
"pnode_tokens": []


Showing results for 
Search instead for 
Do you mean 

Recommended for You