Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

[RFE] Allow user to specify custom scrape config #1533

Open
surajssd opened this issue Jul 16, 2021 · 0 comments
Open

[RFE] Allow user to specify custom scrape config #1533

surajssd opened this issue Jul 16, 2021 · 0 comments
Labels
area/monitoring Monitoring kind/enhancement New feature or request

Comments

@surajssd
Copy link
Member

Prometheus Operator allows use to specify additional scrape config but it is not exposed at lokoctl level. So expose it using appropriate variables.


Right now the user can do the following:

kubectl -n monitoring patch prometheus prometheus-operator-kube-p-prometheus --type merge --patch '{"spec":{"additionalScrapeConfigs":{"name":"scrape-config","key":"scrape.yaml"}}}'
cat > /tmp/scrape.yaml <<EOF
- job_name: "kubernetes-nodes"
  scheme: https
  tls_config:
    ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
  authorization:
    credentials_file: /var/run/secrets/kubernetes.io/serviceaccount/token
  kubernetes_sd_configs:
    - role: node
  relabel_configs:
    - action: labelmap
      regex: __meta_kubernetes_node_label_(.+)
EOF
kubectl -n monitoring create secret generic scrape-config --from-file=/tmp/scrape.yaml
@surajssd surajssd added area/monitoring Monitoring kind/enhancement New feature or request labels Jul 16, 2021
@surajssd surajssd added the proposed/next-sprint Issues proposed for next sprint label Aug 4, 2021
@iaguis iaguis removed the proposed/next-sprint Issues proposed for next sprint label Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/monitoring Monitoring kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants