prometheus-kubernetes | common Prometheus deployment example with alerts | Monitoring library
kandi X-RAY | prometheus-kubernetes Summary
kandi X-RAY | prometheus-kubernetes Summary
See also Elasticsearch+Kibana Kubernetes complete example.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of prometheus-kubernetes
prometheus-kubernetes Key Features
prometheus-kubernetes Examples and Code Snippets
Community Discussions
Trending Discussions on prometheus-kubernetes
QUESTION
Given this YAML file:
It starts with:
...ANSWER
Answered 2021-Aug-03 at 12:21is scrape_configs a dictionary key?
Technically it is a mapping key. YAML terminology does not use the word dictionary however a YAML mapping is typically loaded into a Python dictionary if loaded with PyYAML.
does it contain a list item called job_name?
No. The mapping contains a single key-value pair, whose key is scrape_configs
and whose value is a sequence (YAML terminology does not use the word list) that has no further name.
does this list item job_name have a value "kubernetes-apiservers"
No. The first item in the sequence is a mapping that contains a key-value pair with job_name
being the key and "kubernetes-apiservers"
being the value. Further key-value pairs follow.
does it then have a dictionary key called kubernetes_sd_configs?
kubernetes_sd_configs
is a sibling key to job_name
in the mapping that is the first sequence item.
does kubernetes_sd_configs then contain a value which is a list item called role with value endpoints?
As before, the key kubernetes_sd_configs
has a sequence as value. That sequence contains a mapping with a single key-value pair whose key is role
and whose value is endpoints
.
does it then have another dictionary key called scheme with value https?
That is another sibling key-value pair.
does it then have another dictionary key called tls_config with a dictionary value that is a dictionary key called ca_file which has a dictionary value /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
A key-value pair follows with tls_config
as key and a mapping as value, whose content is a single key-value pair with ca_value
being the key. Nowhere is a mapping value a key.
and another dictionary key called relabel_configs which has a list that has, as its first item, a dictionary with key source_labels what is the data structure for the source_labels value?
The key-value pair with key relabel_configs
has as value a sequence with one item. That item is a mapping whose first key-value pair has the key source_labels
. The value of source_labels
is a sequence, written in flow notation (in contrast with the previously used block notation, which has -
starting items). Flow notation encloses the list items with []
and separates them with commas. There is no semantic difference to block notation. There is no requirement to give these values in flow notation, in fact if they are written in separate lines, they could as well be given in block notation.
how does the action dictionary key connect to relabel_configs (or source_labels - it doesn't seem to be a list item?
action
is a sibling key to source_labels
and is part of the same mapping, which is the first item in the sequence value of the key relabel_configs
.
So, if kubernetes_sd_configs is a sibling to job_name why does it not also start with a
-
Because it wouldn't be a sibling then. In this example:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install prometheus-kubernetes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page