Extend example.jsonnet to remoteWrite configuration #1483
Answered
by
ArthurSens
sumitdhameja
asked this question in
Q&A
-
Is there a way to extend example.jsonnet file to add prometheus remoteWrite configuration? I tried to create it like this, but the prometheus yamls generated don't have remoteWrite configuration
|
Beta Was this translation helpful? Give feedback.
Answered by
ArthurSens
Nov 4, 2021
Replies: 1 comment 1 reply
-
👋 Yes it is possible like this: local kp =
(import 'kube-prometheus/main.libsonnet') +
(import 'kube-prometheus/addons/node-ports.libsonnet')
{
values+:: {
prometheus+: {
externalLabels: {
cluster: 'us-east-1',
},
},
common+: {
namespace: 'monitoring',
},
},
prometheus+: {
prometheus+: {
spec+: {
remoteWrite: [{
url: '<Your Metrics instance remote_write endpoint>',
basicAuth: {
username: {
name: 'kubepromsecret',
key: 'username'
},
password: {
name: 'kubepromsecret',
key: 'password'
}
}
}]
},
}
}
}; Yeah, not the best experience right now. We're currently working on making this part easier to work with 🙂 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
paulfantom
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👋 Yes it is possible like this: