Alpha feature

Postman Insights Agent reference

Use functions and parameters to customize your Postman Insights Agent deployment and filter the HTTP requests in your Insights Project.

kube inject

Inject the Postman Insights Agent into a Kubernetes deployment and output the result on the command line into a file. See Examples.

Flags

  • -f, --file string - Path to the Kubernetes YAML file to be injected. This should contain a valid deployment manifest. You can use - with the file name to read from standard input.
  • -o, --output string - Path to the output file. If not specified, the output will be printed to stdout.
  • -s, --secret string[="true"] - Whether to generate a Kubernetes Secret. If set to "true", the agent will add the secret to the modified Kubernetes YAML file. Specify a path to write the secret to a separate file. If this is done, an output file must also be specified with --output. Default: "false".

Global flags

  • --log-format string - Set to 'color', 'plain' or 'json' to control the log format.
  • --project string - Your Postman Insights Project ID.
  • --proxy string - The domain name, IP address, or URL of an HTTP proxy server to use.

Notes:

  • The input file must be in YAML format and must contain at least one valid deployment manifest.

  • If the --secret flag is set to a file path, the --output flag must also be set.

kube inject examples

  • Inject the set of deployment manifests found in resources.yml and print the result to standard out. Each injected deployment should send traffic from the endpoint to the Postman Insights Agent.

    postman-insights-agent kube inject --project projectId -f resources.yml
    
  • Inject any deployment manifests found in resources.yml similar to the previous execution. Also generate and add any secrets required for the Insights Agent to run.

    postman-insights-agent kube inject -s --project projectId -f resources.yml
    
  • Output injected resources and any secret manifests to separate files:

    postman-insights-agent kube inject -s="secret.yml" --project projectId -f in.yml -o out.yml
    
  • Apply generated resources via pipe using kubectl:

    postman-insights-agent kube inject -s --project projectId -f in.yml | kubectl apply -f -
    

apidump

Capture and store a sequence of requests and responses to a service by observing network traffic. See Examples. For help, use -h or --help.

Usage

postman-insights-agent apidump [flags]

Flags

  • --filter string - Match the packets going to and coming from the API service.
  • --host-allow strings - Allow only the HTTP hosts matching the regular expressions.
  • --host-exclusions strings - Remove the HTTP hosts matching the regular expressions.
  • --interfaces strings - List of network interfaces to listen on. Default: All interfaces on host.
  • --path-allow strings - Allow only the HTTP paths matching the regular expressions.
  • --path-exclusions strings - Remove the HTTP paths matching the regular expressions.
  • --project string - The Postman Insights Project ID.
  • --rate-limit float - Number of requests per minute to capture. Default: 1000.

Global flags

  • --log-format string - Set to color, plain, or json to control the log format.
  • --proxy string - The domain name, IP address, or URL of an HTTP proxy server to use.

apidump examples

  • Capture all traffic from your collection and send it to the Insights Agent.

    postman-insights-agent apidump --project <projectId>
    
  • Filter out requests fetching files with .png or .jpg extensions.

    postman-insights-agent apidump ... --path-exclusions '.*\.png' --path-exclusions '.*\.jpg' ...
    
  • Filter out requests having host deb.debian.org.

    postman-insights-agent apidump ... --host-exclusions 'deb\.debian\.org' ...
    
  • Only allow requests having host www.example.com.

    postman-insights-agent apidump ... --host-allow 'www\.example\.com' ...
    
  • Only allow requests related to the admin endpoints.

    postman-insights-agent apidump ... --path-allow '*/admin/*' ...
    

ecs add

Collect information to add the Postman Insights Agent container to an ECS task. See Examples. For help, use -h or --help.

Usage

postman-insights-agent ecs add [flags]

Flags

  • --filter string - Match the packets going to and coming from the API service.
  • --host-allow strings - Allow only the HTTP hosts matching the regular expressions.
  • --host-exclusions strings - Remove the HTTP hosts matching the regular expressions.
  • --interfaces strings - List of network interfaces to listen on. Default: All interfaces on the host.
  • --path-allow strings - Allow only the HTTP paths matching the regular expressions.
  • --path-exclusions strings - Remove the HTTP paths matching the regular expressions.
  • --rate-limit float - Number of requests per minute to capture. Default: 1000.

Global flags

  • --cluster string - The name or ARN of the ECS cluster.
  • --dry-run - Perform a dry run: show what will be done, but do not modify ECS.
  • --log-format string - Set to color, plain, or json to control the log format.
  • --profile string - Which of the AWS profiles to use to access ECS.
  • --project string - The Postman Insights Project ID.
  • --proxy string - The domain name, IP address, or URL of an HTTP proxy server to use.
  • --region string - The AWS region in which the ECS cluster resides.
  • --service string - The name or ARN of the ECS service.
  • --task string - The name of the ECS task definition to modify.

ecs add examples

  • Capture traffic on port 80.

    postman-insights-agent ecs add ... --filter "port 80" ...
    
  • Capture traffic from specific network interfaces.

    postman-insights-agent ecs add ... --interfaces "lo,eth0" ...
    
  • Filter out requests fetching files with .png or .jpg extensions.

    postman-insights-agent ecs add ... --path-exclusions '.*\.png' --path-exclusions '.*\.jpg' ...
    
  • Filter out requests having host deb.debian.org.

    postman-insights-agent ecs add ... --host-exclusions 'deb\.debian\.org' ...
    
  • Only allow requests having host www.example.com.

    postman-insights-agent ecs add ... --host-allow 'www\.example\.com' ...
    
  • Only allow requests related to the admin endpoints.

    postman-insights-agent ecs add ... --path-allow '*/admin/*' ...
    

ecs task-def

Print a task definition that can be added to an ECS cluster to run the Postman Insights Agent as a daemon in host-networking mode on every EC2 instance in the cluster. For help, use -h or --help.

Usage

postman-insights-agent ecs task-def [flags]

Flags

  • --cluster string - The name or ARN of the ECS cluster.
  • --dry-run - Perform a dry run: Show what will be done, but do not modify ECS.
  • --log-format string - Set to color, plain, or json to control the log format.
  • --profile string - Which of the AWS profiles to use to access ECS.
  • --project string - The Postman Insights Project ID.
  • --proxy string - The domain name, IP address, or URL of an HTTP proxy server to use.
  • --region string - The AWS region in which the ECS cluster resides.
  • --service string - The name or ARN of the ECS service.
  • --task string - The name of the ECS task definition to modify.

ecs cf-fragment

Print a code fragment that can be inserted into a CloudFormation template to add the Postman Insights Agent as a sidecar container. For help, use -h or --help.

Usage:

postman-insights-agent ecs cf-fragment [flags]

Flags

  • --cluster string - The name or ARN of the ECS cluster.
  • --dry-run - Perform a dry run: Show what will be done, but do not modify ECS.
  • --log-format string - Set to color, plain, or json to control the log format.
  • --profile string - The AWS profiles to use to access ECS.
  • --project string - The Postman Insights Project ID.
  • --proxy string - The domain name, IP address, or URL of an HTTP proxy server to use.
  • --region string - The AWS region in which the ECS cluster resides.
  • --service string - The name or ARN of the ECS service.
  • --task string - The name of the ECS task definition to modify.

Last modified: 2024/08/26