RPM netdata packages keep changing file structure

Hello,

We’ve been using ansible to install netdata agents using the netdata yum repository.
There is a task in the playbook to configure the health_alarm_notify.conf file for slack notifications.

The last version we installed of netdata (netdata-1.26.0-1.el7.x86_64) had no /etc/netdata/health_alarm_notify.conf file in that location and the docs recommending taking the approach of using the “edit-config” method of importing it in (which we deconstructed with ansible by copying the file from /usr/lib/netdata/conf.d/health_alarm_notify.conf)

The latest version we installed is now different.
It now has 3 packages

rpm -qa | grep netdata
  netdata-conf-1.26.0-2.el7.noarch
  netdata-1.26.0-2.el7.x86_64
  netdata-data-1.26.0-2.el7.noarch

There is no /usr/lib/netdata/conf.d location or edit-config tool.
And they moved health_alarm_notify.conf from /etc/netdata/health_alarm_notify.conf to /etc/netdata/conf.d/health_alarm_notify.conf.

Using the yum packages is the desirable method for our installations (for centos and amazon linux 2) and we would have expected more consistent installation behaviour.

Could someone provide clarity on why the installation is acting different from a minor version install?

The ansible tasks below

- name: Copy over health_alarm_notify.conf
  copy:
    src: "/usr/lib/netdata/conf.d/health_alarm_notify.conf"
    dest: "/etc/netdata/health_alarm_notify.conf"
    remote_src: yes
    force: no

- name: Add slack incomming webhook url when defined
  lineinfile:
    path: "/etc/netdata/health_alarm_notify.conf"
    regexp: "{{ item.regexp }}"
    line: "{{ item.line }}"
  when: netdata_slack_webhook_url is defined
  with_items:
    - { regexp: "^SEND_SLACK=", line: "SEND_SLACK=\"YES\"" }
    - { regexp: "^SLACK_WEBHOOK_URL=", line: "SLACK_WEBHOOK_URL=\"{{ netdata_slack_webhook_url }}\"" }
    - { regexp: "^DEFAULT_RECIPIENT_SLACK=", line: "DEFAULT_RECIPIENT_SLACK=\"{{ netdata_slack_default_recipient | default('devops-alarms') }}\"" }
  notify: restart netdata

Based on the package names you’re listing, it seems you’re installing distribution-provided Netdata packages. We have no control over how they choose to manage their packages, so you will need to ask whoever maintains them for the distro about the reason for the changes.

For reference, we do provide our own DEB/RPM packages, see the official documentation for info on installation.

Hi @Austin_Hemmelgarn

Thank you for the response. We are using the netdata packages (provided by netdata repos not distribution), we setup the repo’s using ansible as follows:

- name: Install pre-requisite pacakges for netdata
  yum:
    name:
      - pygpgme
      - yum-utils
    state: present

- name: Set netdata repo release when Amazon Linux 2
  set_fact:
    netdata_repo_release: "7"
  when: ansible_distribution == "Amazon"

- name: Create netdata yum repo
  yum_repository:
    name: "{{ item.name }}"
    description: "{{ item.description }}"
    baseurl: "{{ item.baseurl }}"
    repo_gpgcheck: "{{ item.repo_gpgcheck }}"
    gpgcheck: "{{ item.gpgcheck }}"
    gpgkey: "{{ item.gpgkey }}"
    sslverify: "{{ item.sslverify }}"
    sslcacert: "{{ item.sslcacert }}"
    metadata_expire: "{{ item.metadata_expire }}"
  with_items:
    - { name: "netdata_netdata", description: "netdata_netdata", baseurl: "https://packagecloud.io/netdata/netdata/el/{{ netdata_repo_release | default(ansible_distribution_major_version) }}/$basearch", repo_gpgcheck: "yes", gpgcheck: "no", gpgkey: "https://packagecloud.io/netdata/netdata/gpgkey", sslverify: "yes", sslcacert: "/etc/pki/tls/certs/ca-bundle.crt", metadata_expire: "300" }
    - { name: "netdata_netdata-source", description: "netdata_netdata-source", baseurl: "https://packagecloud.io/netdata/netdata/el/{{ netdata_repo_release | default(ansible_distribution_major_version) }}/SRPMS", repo_gpgcheck: "yes", gpgcheck: "no", gpgkey: "https://packagecloud.io/netdata/netdata/gpgkey", sslverify: "yes", sslcacert: "/etc/pki/tls/certs/ca-bundle.crt", metadata_expire: "300" }

- name: Update yum cache to enable netdata repo
  shell: "yum -q makecache -y --disablerepo='*' --enablerepo='netdata_netdata'"

- name: Install netdata package
  yum:
    name: netdata
    state: present

Hi @Austin_Hemmelgarn,

I dug a little further and noticed this seems to be the case, the packages look to be from epel and not netdata_netdata repo.

repoquery -i netdata

Name        : netdata
Version     : 1.26.0
Release     : 2.el7
Architecture: x86_64
Size        : 3862561
Packager    : Fedora Project
Group       : Unspecified
URL         : https://github.com/netdata/netdata/
Repository  : epel
Summary     : Real-time performance monitoring
Source      : netdata-1.26.0-2.el7.src.rpm
Description :
netdata is the fastest way to visualize metrics. It is a resource
efficient, highly optimized system for collecting and visualizing any
type of realtime time-series data, from CPU usage, disk activity, SQL
queries, API calls, web site visitors, etc.

netdata tries to visualize the truth of now, in its greatest detail,
so that you can get insights of what is happening now and what just
happened, on your systems and applications.

An additional note. Seems epel and netdata repo are competing and epel is coming out faster than netdata

yum info netdata
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
196 packages excluded due to repository priority protections
Installed Packages
Name        : netdata
Arch        : x86_64
Version     : 1.26.0
Release     : 1.el7
Size        : 37 M
Repo        : installed
From repo   : netdata_netdata
Summary     : Real-time performance monitoring, done right!
URL         : http://my-netdata.io
License     : GPLv3+
Description :   netdata is the fastest way to visualize metrics. It is a resource
            : efficient, highly optimized system for collecting and visualizing any
            : type of realtime timeseries data, from CPU usage, disk activity, SQL
            : queries, API calls, web site visitors, etc.
            :   netdata tries to visualize the truth of now, in its greatest detail,
            : so that you can get insights of what is happening now and what just
            : happened, on your systems and applications.

Available Packages
Name        : netdata
Arch        : x86_64
Version     : 1.26.0
Release     : 2.el7
Size        : 997 k
Repo        : epel/x86_64
Summary     : Real-time performance monitoring
URL         : https://github.com/netdata/netdata/
License     : GPLv3 and GPLv3+ and ASL 2.0 and CC-BY and MIT and WTFPL
Description : netdata is the fastest way to visualize metrics. It is a resource
            : efficient, highly optimized system for collecting and visualizing any
            : type of realtime time-series data, from CPU usage, disk activity, SQL
            : queries, API calls, web site visitors, etc.
            : 
            : netdata tries to visualize the truth of now, in its greatest detail,
            : so that you can get insights of what is happening now and what just
            : happened, on your systems and applications.

My last install defaulted to epel because netdata was older. I’ll have to look into locking a package to a specific repo.

Some additional notes for anyone coming across this.

Work around to avoid epel and netdata_netdata packages fighting with latest version:
Disable netdata* packages in the epel repo config

- name: Ensure EPEL excludes netdata packages
  ini_file:
    path: /etc/yum.repos.d/epel.repo
    section: epel
    option: exclude
    value: netdata*
    no_extra_spaces: yes

Additional question for netdata staff. Can someone contact Didier Fabert <didier.fabert@gmail.com> or other maintainers of the epel packages? netdata-1.22.1-2.el7 | Build Info | koji

It seems like having two packages will likely lead to headache in future if they are constantly conflicting.
Also installing from EPEL vs netdata repos creates a giant filesystem mess which leads to having to uninstall the package and delete all of netdata’s folders to get back to a working state.

Can I ask what is regarded as the best policy for installing netdata on Centos/RH/OEL? I have a mixed estate of Linux6/7/8 servers and am currently using the epel repositories but would I be best advised to use the netdata repo or kickstart instead? Would those even run on the old Linux6 servers?