On 16/11/15 17:54, Neil Jerram wrote: > On 16/11/15 16:37, Neil Jerram wrote: >> Hi there, >> >> I'm interested in collating all the REST API exchanges to and between >> OpenStack components, and presenting / visualizing all those in an >> easily comprehensible way. Is there already some tool to do that? >> >> Many thanks, >> Neil > Well here's a start anyway [...]
Latest evolution below, for anyone else interested in this. This version captures REST API for all OpenStack endpoints on the local node. Neil #!/bin/bash set - `openstack catalog list --format csv | gawk '{ if (match($0, "publicURL: http://[^:]*:([^/]*)/", arr)) { print arr[1]; } }' | sort | uniq` display_filter_for_port () { echo "-d tcp.port==$1,http" } capture_filter_for_port() { echo "tcp port $1" } display_filters=`display_filter_for_port $1` capture_filters=`capture_filter_for_port $1` shift for port in $*; do display_filters="$display_filters `display_filter_for_port $port`" capture_filters="$capture_filters or `capture_filter_for_port $port`" done sudo tshark -i any $display_filters -f "$capture_filters" -V -Y http | awk ' BEGIN { disp = 0; } /^[A-Z]/ { disp = 0; } /^Hypertext/ { disp = 1; } /^Java/ { disp = 1; } { if (disp) print; } ' __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev