2

I recently deployed Netdata on Kubernetes. And I wanted to use Netdata to record the status of Managed MySQL hosted in Linode.
I read the documentation and it said that I could set up a plugin called MySQL Collector. However, the documentation only mentioned how to edit the configuration file directly, not how to configure it for Kubernetes.
It says to edit /etc/netdata/go.d/mysql.conf, but it is in the container. Perhaps you can do it temporarily by editing it from the shell inside the container, but I don't think that's official.
How can I set up a MySQL collector in Netdata on Kubernetes?

I tried creating a folder /etc/netdata/go.d on the Kubernetes node computer anyway just to be sure and created the file there, but still could not do it. I have that folder group in the container, so I think I should be able to set it up there. But if I edit it directly, I think it will be reset after reboot.
So I came up with a way to set up one volume of /etc/netdata in Kubernetes, but I am not sure if this is a good decision. So I am not doing this because it seems dangerous.

That said, I would like to know how to officially set up a MySQL collector plugin to Netdata on Kubernetes.

tasuren
  • 181
  • 1
  • 7
  • i believe you can do this via the helm chart: https://github.com/netdata/helmchart#configuration-files i'll ask someone internally if can find any examples – andrewm4894 Aug 01 '23 at 10:55

1 Answers1

0

I think you need to pass the config into the helm chart via whatever values.yaml you are using.

Here are some of the defaults for example.

So i think in your case:

    go.d:
      enabled: true
      path: /etc/netdata/go.d.conf
      data: |
        modules:
          pulsar: no
          prometheus: yes
          mysql: yes

    mysql:
      enabled: true
      path: /etc/netdata/go.d/mysql.conf
      data: |
        update_every: 1
        autodetection_retry: 0
        jobs:
          - name: some_name1
          - name: some_name1

something like above to pass in the relevant config files (as per docs you read) into k8s via the Netdata helmchart.

andrewm4894
  • 1,451
  • 4
  • 17
  • 37
  • I am not good at English and I don't understand it, but where did you get this information? I would like to know in order to improve my knowledge. Is it the part under the table on the below web page? https://learn.netdata.cloud/docs/installing/kubernetes-helm-chart-reference#configuration-files – tasuren Aug 02 '23 at 00:31
  • You might find some useful info here: https://learn.netdata.cloud/docs/installing/kubernetes Basically default helm install will use default values.yaml for params and configs. But in your case you need to add some additional configs for the MySQL collector config into the values.yaml you are using helm to deploy. This chatgpt explains it pretty well: https://sharegpt.com/c/MVhUHcA – andrewm4894 Aug 02 '23 at 10:39