Performing PromQL Queries
Running queries on the expression browser is easy, but you may not always get the information you need. By simply adding the metric name, such as countainer_cpu_system_seconds_total
, we can get quite a few responses. Though, the amount depends on the number of containers we have on our system along with the returning values for each of the filesystems that are running on our host system. To limit the number of responses provided in our result, we can search for specific text using curly braces { }
.
Consider the following examples. The following command provides the full name of the "cadvisor"
container we wish to view:
container_cpu_system_seconds_total{ name="cadvisor"}
The following example uses a regular expression compatible with GO. The command looks for any names that start with ca
and have further characters afterward:
container_cpu_system_seconds_total{ name=~"ca.+"}
The following code snippet is searching...