**Description** Prometheus has the ability to receive metrics, rather then pull them. Ref: https://prometheus.io/docs/prometheus/latest/storage/#overview The current chart has the required parameters to make the Prometheus instance a sender, but not a receiver. This PR adds an option to enable the Remote Write Receiver functionality. The flag is provided in the prometheus-operator CRD, so all we have to do is add the question, values, and update the template. This PR attempts to do that. **⚙️ Type of change** - [x] ⚙️ Feature/App addition - [ ] 🪛 Bugfix - [ ] ⚠️ Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] 🔃 Refactor of current code **🧪 How Has This Been Tested?** Tested changes on local TrueNAS **📃 Notes:** None **✔️ Checklist:** - [x] ⚖️ My code follows the style guidelines of this project - [x] 👀 I have performed a self-review of my own code - [ ] #️⃣ I have commented my code, particularly in hard-to-understand areas - [ ] 📄 I have made corresponding changes to the documentation - [ ] ⚠️ My changes generate no new warnings - [ ] 🧪 I have added tests to this description that prove my fix is effective or that my feature works - [x] ⬆️ I increased versions for any altered app according to semantic versioning --- Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Co-authored-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com>
242 lines
8.2 KiB
YAML
242 lines
8.2 KiB
YAML
# Include{groups}
|
|
portals:
|
|
open:
|
|
# Include{portalLink}
|
|
questions:
|
|
- variable: operator
|
|
group: "App Configuration"
|
|
label: "Operator Settings"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: enabled
|
|
label: "Enable"
|
|
schema:
|
|
type: boolean
|
|
default: true
|
|
show_subquestions_if: true
|
|
subquestions:
|
|
- variable: logLevel
|
|
label: "Log Level"
|
|
description: "Log level for Operator"
|
|
schema:
|
|
type: string
|
|
default: "info"
|
|
- variable: prometheus
|
|
group: "App Configuration"
|
|
label: "Prometheus Settings"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: enabled
|
|
label: "Enable"
|
|
schema:
|
|
type: boolean
|
|
default: true
|
|
show_subquestions_if: true
|
|
subquestions:
|
|
- variable: logLevel
|
|
label: "Log Level"
|
|
description: "Log level for Prometheus"
|
|
schema:
|
|
type: string
|
|
default: "info"
|
|
- variable: retention
|
|
label: "Retention"
|
|
description: "Metrics retention days"
|
|
schema:
|
|
type: string
|
|
default: "31d"
|
|
- variable: retentionSize
|
|
label: "Max Retention Size"
|
|
description: "Maximum size of metrics"
|
|
schema:
|
|
type: string
|
|
default: ""
|
|
- variable: scrapeInterval
|
|
label: "Scrape interval"
|
|
description: "Interval between consecutive scrapes"
|
|
schema:
|
|
type: string
|
|
default: "15s"
|
|
- variable: evaluationInterval
|
|
label: "Evaluation interval"
|
|
description: "Interval between consecutive evaluations"
|
|
schema:
|
|
type: string
|
|
default: "30s"
|
|
- variable: disableCompaction
|
|
label: "Disable Compaction"
|
|
description: "Disable the compaction of the Prometheus TSDB"
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
- variable: walCompression
|
|
label: "WAL Compression"
|
|
description: "Enable compression of the write-ahead log using Snappy"
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
- variable: enableRemoteWriteReceiver
|
|
label: "Remote Write Receiver"
|
|
description: "Enable Prometheus to be used as a receiver for the Prometheus remote write protocol"
|
|
schema:
|
|
type: boolean
|
|
default: false
|
|
- variable: remoteWrite
|
|
label: "Remote Write"
|
|
schema:
|
|
type: list
|
|
default: []
|
|
items:
|
|
- variable: remoteWriteEntry
|
|
label: Remote Write Entry
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: url
|
|
label: URL
|
|
description: Remote write destination URL
|
|
schema:
|
|
type: string
|
|
required: true
|
|
default: ""
|
|
- variable: basicAuth
|
|
label: Basic Auth
|
|
description: Basic authentication for remote write
|
|
schema:
|
|
type: dict
|
|
attrs:
|
|
- variable: username
|
|
label: Username
|
|
description: Basic auth username
|
|
schema:
|
|
type: string
|
|
required: true
|
|
default: ""
|
|
- variable: password
|
|
label: Password
|
|
description: Basic auth password
|
|
schema:
|
|
type: string
|
|
required: false
|
|
default: ""
|
|
- variable: exporters
|
|
group: "App Configuration"
|
|
label: "Exporter Settings"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: node-exporter
|
|
label: "node-exporter"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: enabled
|
|
label: "Enable"
|
|
schema:
|
|
type: boolean
|
|
default: true
|
|
- variable: kube-state-metrics
|
|
label: "Kube-State-Metrics"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: enabled
|
|
label: "Enable"
|
|
schema:
|
|
type: boolean
|
|
default: true
|
|
- variable: alertmanager
|
|
group: "App Configuration"
|
|
label: "Alertmanager Settings"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: enabled
|
|
label: "Enable"
|
|
schema:
|
|
type: boolean
|
|
default: true
|
|
show_subquestions_if: true
|
|
subquestions:
|
|
- variable: logLevel
|
|
label: "Log Level"
|
|
description: "Log level for Alertmanager"
|
|
schema:
|
|
type: string
|
|
default: "info"
|
|
- variable: retention
|
|
label: "Retention"
|
|
description: "Metrics retention days"
|
|
schema:
|
|
type: string
|
|
default: "240h"
|
|
# Include{serviceRoot}
|
|
- variable: main
|
|
label: "Main Service"
|
|
description: "The serving the Prometheus WebUI"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
# Include{serviceSelectorLoadBalancer}
|
|
# Include{serviceSelectorExtras}
|
|
- variable: main
|
|
label: "Main Service Port Configuration"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: port
|
|
label: "Port"
|
|
description: "This port exposes the container port on the service"
|
|
schema:
|
|
type: int
|
|
default: 9090
|
|
required: true
|
|
- variable: alertmanager
|
|
label: "alertmanager Service"
|
|
description: "alertmanager service "
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
# Include{serviceSelectorLoadBalancer}
|
|
# Include{serviceSelectorExtras}
|
|
- variable: alertmanager
|
|
label: "alertmanager Service Port Configuration"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
- variable: port
|
|
label: "Port"
|
|
description: "This port exposes the container port on the service"
|
|
schema:
|
|
type: int
|
|
default: 9093
|
|
required: true
|
|
# Include{serviceExpertRoot}
|
|
# Include{serviceExpert}
|
|
# Include{serviceList}
|
|
# Include{persistenceList}
|
|
# Include{ingressRoot}
|
|
- variable: main
|
|
label: "Main Ingress"
|
|
schema:
|
|
additional_attrs: true
|
|
type: dict
|
|
attrs:
|
|
# Include{ingressDefault}
|
|
# Include{ingressAdvanced}
|
|
# Include{ingressList}
|
|
# Include{advanced}
|