GithubHelp home page GithubHelp logo

Comments (7)

chuegel avatar chuegel commented on June 5, 2024 1

I removed all CRDs and re-deployed the stack again...now the metrics are visible.
Thanks

from grafana-dashboards-kubernetes.

dotdc avatar dotdc commented on June 5, 2024

Hi @chuegel,
Did you try without the relabelings first ? This should only be used if it doesn't work out of the box.
Can you share your Kubernetes distribution, Kubernetes version and the entire values configuration for kube-prometheus-stack ?

from grafana-dashboards-kubernetes.

chuegel avatar chuegel commented on June 5, 2024

Hi @dotdc , thanks for your reply.
Yes, I tried that first but the metrics didn't show up.

grafik

kubectl version -o yaml
clientVersion:
  buildDate: "2023-06-14T09:53:42Z"
  compiler: gc
  gitCommit: 25b4e43193bcda6c7328a6d147b1fb73a33f1598
  gitTreeState: clean
  gitVersion: v1.27.3
  goVersion: go1.20.5
  major: "1"
  minor: "27"
  platform: linux/amd64
kustomizeVersion: v5.0.1
serverVersion:
  buildDate: "2023-06-14T22:02:13Z"
  compiler: gc
  gitCommit: 25b4e43193bcda6c7328a6d147b1fb73a33f1598
  gitTreeState: clean
  gitVersion: v1.27.3+rke2r1
  goVersion: go1.20.5 X:boringcrypto
  major: "1"
  minor: "27"
  platform: linux/amd64

Here the value configuration:

apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
  name: kube-prometheus-stack
spec:
  interval: 1h
  chart:
    spec:
      version: "58.x"
      chart: kube-prometheus-stack
      sourceRef:
        kind: HelmRepository
        name: prometheus-community
      interval: 1h
  install:
    crds: Create
  upgrade:
    crds: CreateReplace
  driftDetection:
    mode: enabled
    ignore:
      # Ignore "validated" annotation which is not inserted during install
      - paths: [ "/metadata/annotations/prometheus-operator-validated" ]
        target:
          kind: PrometheusRule
  valuesFrom:
  - kind: ConfigMap
    name: flux-kube-state-metrics-config
    valuesKey: kube-state-metrics-config.yaml
  # https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-prometheus-stack/values.yaml
  values:
    alertmanager:
      enabled: false
    prometheus-node-exporter:
      prometheus:
        monitor:
          relabelings:
          - action: replace
            sourceLabels: [__meta_kubernetes_pod_node_name]
            targetLabel: nodename
    prometheus:
      service:
        labels:
          operated-prometheus: "true"
      prometheusSpec:
        retention: 24h
        resources:
          requests:
            cpu: 200m
            memory: 200Mi
        podMonitorNamespaceSelector: { }
        podMonitorSelector:
          matchLabels:
            app.kubernetes.io/component: monitoring
    grafana:
      defaultDashboardsEnabled: false
      adminPassword: flux
      dashboardProviders:
        dashboardproviders.yaml:
          apiVersion: 1
          providers:
          - name: 'grafana-dashboards-kubernetes'
            orgId: 1
            folder: 'Kubernetes'
            type: file
            disableDeletion: true
            editable: true
            options:
              path: /var/lib/grafana/dashboards/grafana-dashboards-kubernetes
      dashboards:
        grafana-dashboards-kubernetes:
         k8s-system-api-server:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-api-server.json
           token: ''
         k8s-system-coredns:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-system-coredns.json
           token: ''
         k8s-views-global:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-global.json
           token: ''
         k8s-views-namespaces:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-namespaces.json
           token: ''
         k8s-views-nodes:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-nodes.json
           token: ''
         k8s-views-pods:
           url: https://raw.githubusercontent.com/dotdc/grafana-dashboards-kubernetes/master/dashboards/k8s-views-pods.json
           token: ''

from grafana-dashboards-kubernetes.

dotdc avatar dotdc commented on June 5, 2024

All the other dashboards are working correct ?

I think you can remove :

    prometheus-node-exporter:
      prometheus:
        monitor:
          relabelings:
          - action: replace
            sourceLabels: [__meta_kubernetes_pod_node_name]
            targetLabel: nodename

Also, can you try to remove podMonitorNamespaceSelector and podMonitorSelector in prometheusSpec and replace them with :

            podMonitorSelectorNilUsesHelmValues: false
            serviceMonitorSelectorNilUsesHelmValues: false

Memory requests for Prometheus might be a bit low, do you have any pod restart or errors?

If nothing works, can you check what is the output of each variable from the node dashboard ?

from grafana-dashboards-kubernetes.

chuegel avatar chuegel commented on June 5, 2024

All the other dashboards are working correct ?

All, except Nodes, Pods..there are some values in Namespaces and some in Global also missing:

I think you can remove :

    prometheus-node-exporter:
      prometheus:
        monitor:
          relabelings:
          - action: replace
            sourceLabels: [__meta_kubernetes_pod_node_name]
            targetLabel: nodename

done

Also, can you try to remove podMonitorNamespaceSelector and podMonitorSelector in prometheusSpec and replace them with :

            podMonitorSelectorNilUsesHelmValues: false
            serviceMonitorSelectorNilUsesHelmValues: false

Changed that but no difference

Memory requests for Prometheus might be a bit low, do you have any pod restart or errors?

Pods are fine no restarts

If nothing works, can you check what is the output of each variable from the node dashboard ?

For example in the Node dashboard the metric kube_node_info doesn't seem to return any values:

grafik

from grafana-dashboards-kubernetes.

wigarddev avatar wigarddev commented on June 5, 2024

I fixed this by renaming label filter nodename to node:

telegram-cloud-photo-size-2-5314476959251683333-y

from grafana-dashboards-kubernetes.

chuegel avatar chuegel commented on June 5, 2024

@wigarddev

when I do that I get:

grafik

from grafana-dashboards-kubernetes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.