prodfiler-documentation

Querying & filtering results

Profiling results can be restricted to a specific set of hosts in your fleet.

The Prodfiler user interface exposes this functionality through the “Filter” box in the user interface:

filter box

Filter syntax

Conceptually, filtering consists of matching keys against values. Valid keys are defined by Prodfiler and documented below.

A word of caution

Given that ~ operates on RE2 regular expressions, always keep in mind that values in conditions will be interpreted as such. While 19.* is a valid regular expression, it will match 192.168.0.1 as well as 10.0.1.19.

Keys supported by Prodfiler

There are currently three types of keys that can be provided when filtering: trace-derived, host-derived and cloud instance-derived keys. Trace-derived keys filter traces whilst host-derived and cloud instance-derived keys filter hosts.

Trace-derived keys

NOTE: Only the = operator is valid for trace-derived keys.

Examples

Host-derived keys

User-specified tags can be provided to Prodfiler via command-line (-tags), configuration file directive (tags) or through an environment variable (PRODFILER_TAGS). Each tag must match ^[a-zA-Z0-9-:._]+$ regex and use ; as a separator. Invalid tags will be dropped and warnings issued on startup.

Additionally, a number of CPU-derived keys are supported, with a prefix of host:cpu/<cpu-idx>/ where <cpu-idx> must be a logical CPU index, starting from 0. Values for CPU-derived keys are collected from /proc, sysfs and through CPUID:

Examples

Cloud instance-derived keys

The following keys are available for all cloud providers and encapsulate information in a convenient format for filtering:

Examples

EC2-derived keys

The following keys are extracted from the AWS EC2 instance metadata service (if they are present):

Refer to the EC2 documentation to see the meaning and format of each value.

Where <MAC> should be a MAC address of form 0a:0b:0c:0d:0e:0f.

For convenience, EC2 instance tags are also made available for filtering via:

Where <TAG-KEY> should be an EC2 tag key name.

NOTE: In order for EC2 instance tags to be collected, the instance needs to have an IAM role assigned with a policy that allows for ec2:DescribeTags.

Examples

GCE-derived keys

The following keys are extracted from the Google Compute Engine instance metadata service (if they are present):

Refer to the GCE documentation to see the meaning and format of each value.

Where <iface-idx> and <cfg-idx> should usually only have 0 as a valid value, unless you are running with a more advanced network configuration.

Examples

Azure-derived keys

The following keys are extracted from the Azure instance metadata service (if they are present):

Refer to the Azure Documentation to see the meaning and format of each value.

Where <iface-idx> and <sub-idx> should usually only have 0 as a valid value, unless you are running with a more advanced network configuration. <ip-idx> starts from 0 and increases with the number of IP addresses.

The IPV6 IPs (if present) from all interfaces are also made available through the following keys:

Examples

FAQ

See here.