Selecting Profile Measurements
PROFILE_GET command allows you to select all of the profile
The name of the profile
The name of the entity
The list of profile periods to grab. These are ProfilePeriod objects. This field is generally the output of another Stellar function which defines the times to include.
List (in square brackets) of groupBy values used to filter the profile. Default is an empty list, which means that
groupBywas not used when creating the profile. This list must correspond to the 'groupBy' list used in profile creation.
groups_listargument in the client must exactly correspond to the
groupByconfiguration in the profile definition. If
groupBywas not used in the profile,
groups_listmust be empty in the client. If
groupBywas used in the profile, then the client
groups_listis not optional; it must be the same length as the
groupBylist, and specify exactly one selected group value for each
groupBycriterion, in the same order. For example:
If in Profile, the
[ “DAY_OF_WEEK()”, “URL_TO_PORT()” ]Then in
PROFILE_GET, an allowed groups value would be:
[ “3”, “8080” ]which will select only records from Tuesdays with port number 8080.
Map (in curly braces) of name:value pairs, each overriding the global config parameter of the same name. Default is the empty Map, meaning no overrides.Note
There is an older calling format where
groups_listis specified as a sequence of group names, "varargs" style, instead of a List object. This format is still supported for backward compatibility, but it is deprecated, and it is disallowed if the optional
config_overridesargument is used.
By default, the Profiler creates profiles with a period duration of 15 minutes. This means that data is accumulated, summarized, and flushed every 15 minutes. The Client API must also have knowledge of this duration to correctly retrieve the profile data. If the Client is expecting 15 minute periods, it will not be able to read data generated by a Profiler that was configured for 1 hour periods, and will return zero results.
Similarly, all six Client configuration parameters listed in the table below must match the Profiler configuration parameter settings from the time the profile was created. The period duration and other configuration parameters from the Profiler topology are stored in a local file system at
$METRON_HOME/config/profiler.properties. The Stellar Client API can be configured correspondingly by setting the following properties in HCP's global configuration, on a local file system at
$METRON_HOME/config/zookeeper/global.json, then uploaded to ZooKeeper (at
/metron/topology/global) by using
``` $ cd $METRON_HOME $ bin/zk_load_configs.sh -m PUSH -i config/zookeeper/ -z node1:2181 ```
Any of these six Client configuration parameters may be overridden at run time using the
config_overridesMap argument in
PROFILE_GET. The primary use case for overriding the client configuration parameters is when historical profiles have been created with a different Profiler configuration than is currently configured, and the analyst, needing to access them, does not want to change the global Client configuration so as not to disrupt the work of other analysts working with current profiles.
Table 1. Profiler Client Configuration Parameters Key Description Required Default
The duration of each profile period. This value should be defined along with
The units used to specify the profile period duration. This value should be defined along with
The name of the HBase table used to store profile data. Optional profiler
The name of the HBase column family used to store profile data. Optional P
The salt divisor used to store profile data. Optional 1000
The name of the HBaseTableProvider implementation class. Optional