Skip to content

Commit

Permalink
Doc update for pod monitor (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmichandrashekar authored Mar 21, 2024
1 parent 74173d9 commit 7b87e52
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .trivyignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@ CVE-2024-21626
# =========== MEDIUM ================
# MEDIUM - otelcollector
CVE-2023-48795
CVE-2024-24557
# MEDIUM - promconfigvalidator
CVE-2023-48795
CVE-2024-24786
CVE-2024-24557
# MEDIUM - telegraf
GHSA-jq35-85cj-fj4p
GHSA-7ww5-4wqc-m92c
GHSA-mhpq-9638-x6pw
CVE-2024-27304
GHSA-7jwh-3vrq-q3m8
CVE-2023-50658
CVE-2023-48795
CVE-2023-3978
CVE-2023-44487
CVE-2023-50658
CVE-2024-28110
CVE-2024-27289
CVE-2024-24557
CVE-2024-29018
# MEDIUM - go vulnerabilities
# MEDIUM - mariner
CVE-2023-5678
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
key: "client-key.pem"
name: "ama-metrics-mtls-secret"
insecureSkipVerify: false
relabelings:
- relabelings:
- sourceLabels: [__meta_kubernetes_pod_label_app]
action: keep
regex: "prometheus-reference-app"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: azmonitoring.coreos.com/v1
kind: PodMonitor
metadata:
name: prometheus-reference-app-job
spec:
labelLimit: 63
labelNameLengthLimit: 511
labelValueLengthLimit: 1023
selector:
matchLabels:
app: prometheus-reference-app
podMetricsEndpoints:
- relabelings:
- sourceLabels: [__meta_kubernetes_pod_label_app]
action: keep
regex: "prometheus-reference-app"
- sourceLabels: [__meta_kubernetes_pod_node_name]
action: replace
regex: ('$$NODE_NAME$$')
targetLabel: instance
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,26 @@
float = ["*"]

# Transforms tag and field values as well as measurement, tag and field names with regex pattern
[[processors.regex]]
namepass = ["target_allocator"]

# Tag and field conversions defined in a separate sub-tables
[[processors.regex.tags]]
## Tag to change, "*" will change every tag
key = "job_name"
## Regular expression to match on a tag value

# Group 1: match a string starting with "podMonitor/" or "serviceMonitor/"
# The format of a CR name is podMonitor/<namespace>/<podmonitor-name> or serviceMonitor/<namespace>/<servicemonitor-name>
# Group 2: match the string "podMonitor" or "serviceMonitor"
# Group 3: match any string. We want all job names to be matched so that we aren't collecting the job name.
pattern = '(^(podMonitor|serviceMonitor)\/.*)|(.*)'
## Matches of the pattern will be replaced with this string. Use ${1}
## notation to use the text of the first submatch.
# [[processors.regex]]
# namepass = ["target_allocator"]

# # Tag and field conversions defined in a separate sub-tables
# [[processors.regex.tags]]
# ## Tag to change, "*" will change every tag
# key = "job_name"
# ## Regular expression to match on a tag value

# # Group 1: match a string starting with "podMonitor/" or "serviceMonitor/"
# # The format of a CR name is podMonitor/<namespace>/<podmonitor-name> or serviceMonitor/<namespace>/<servicemonitor-name>
# # Group 2: match the string "podMonitor" or "serviceMonitor"
# # Group 3: match any string. We want all job names to be matched so that we aren't collecting the job name.
# pattern = '(^(podMonitor|serviceMonitor)\/.*)|(.*)'
# ## Matches of the pattern will be replaced with this string. Use ${1}
# ## notation to use the text of the first submatch.

## "Job" is necessary or else configmap jobs would not be replaced and would keep their
## original name
replacement = "${2}Job"
# ## "Job" is necessary or else configmap jobs would not be replaced and would keep their
# ## original name
# replacement = "${2}Job"

###############################################################################
# AGGREGATOR PLUGINS #
Expand Down

0 comments on commit 7b87e52

Please sign in to comment.