Install and use collectd under CentOS Stream 9 using OpsTools

collectd is a daemon, which collects system data and statistics and it may send them over the network to a back-end data. Under CentOS Stream 9 the collectd package has been removed from the CentOS Stream 9 repositories. Special Interest Groups (SIG), which is a group of CentOS Community, provides and supports multiple small repositories for different Linux utilities and tools. One of the SIG‘s repositories is OpsTools, which provides a package for collectd daemon and multiple collectd modules packed in separate packages.

To use collectd under CentOS Stream 9 a CentOS Community repository should be installed – OpsTools.

Steps to install and use the collectd daemon:

dnf install -y centos-release-opstools
dnf install -y collectd

It’s worth noting that all the Linux distribution, which tries to track and be compatible with Red Hat Enterprise Linux like Rocky Linux will have the same problem with missing collectd package. So the SIG OpsTools repository should be also possible to install under all of these Linux distributions.

Here is the output of installing the above packages under CentOS Stream 9:

[root@srv ~]# dnf install -y centos-release-opstools
Last metadata expiration check: 0:00:23 ago on Wed 22 Jun 2022 02:05:19 PM UTC.
Dependencies resolved.
======================================================================================
 Package                       Architecture Version         Repository           Size
======================================================================================
Installing:
 centos-release-opstools       noarch       1-12.el9s       extras-common       8.4 k

Transaction Summary
======================================================================================
Install  1 Package

Total download size: 8.4 k
Installed size: 1.7 k
Downloading Packages:
centos-release-opstools-1-12.el9s.noarch.rpm           62 kB/s | 8.4 kB     00:00    
--------------------------------------------------------------------------------------
Total                                                  22 kB/s | 8.4 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                              1/1 
  Installing       : centos-release-opstools-1-12.el9s.noarch                     1/1 
  Verifying        : centos-release-opstools-1-12.el9s.noarch                     1/1 

Installed:
  centos-release-opstools-1-12.el9s.noarch                                            

Complete!
[root@srv ~]# dnf install -y collectd
CentOS Stream 9 - OpsTools - collectd                  12 kB/s |  41 kB     00:03    
Dependencies resolved.
======================================================================================
 Package          Architecture   Version                Repository               Size
======================================================================================
Installing:
 collectd         x86_64         5.12.0-7.el9s          centos-opstools         673 k
Installing dependencies:
 yajl             x86_64         2.1.0-20.el9           appstream                38 k

Transaction Summary
======================================================================================
Install  2 Packages

Total download size: 711 k
Installed size: 2.2 M
Downloading Packages:
(1/2): yajl-2.1.0-20.el9.x86_64.rpm                   179 kB/s |  38 kB     00:00    
(2/2): collectd-5.12.0-7.el9s.x86_64.rpm              1.1 MB/s | 673 kB     00:00    
--------------------------------------------------------------------------------------
Total                                                 594 kB/s | 711 kB     00:01     
CentOS Stream 9 - OpsTools - collectd                 1.0 MB/s | 1.0 kB     00:00    
Importing GPG key 0x51BC2A13:
 Userid     : "CentOS OpsTools SIG (https://wiki.centos.org/SpecialInterestGroup/OpsTools) <security@centos.org>"
 Fingerprint: 7872 8176 9AD7 3878 85EE A649 4FD9 5327 51BC 2A13
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-OpsTools
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                              1/1 
  Installing       : yajl-2.1.0-20.el9.x86_64                                     1/2 
  Installing       : collectd-5.12.0-7.el9s.x86_64                                2/2 
  Running scriptlet: collectd-5.12.0-7.el9s.x86_64                                2/2 
  Verifying        : collectd-5.12.0-7.el9s.x86_64                                1/2 
  Verifying        : yajl-2.1.0-20.el9.x86_64                                     2/2 

Installed:
  collectd-5.12.0-7.el9s.x86_64                yajl-2.1.0-20.el9.x86_64               

Complete!

collectd default configuration

The default configuration comments all the lines in /etc/collectd.conf except one, which includes all the files under /etc/collectd.d/. So the logic is to have a separate file for each collectd plugin. By default, there are 5 default configuration files activating 5 plugins:
Keep on reading!

Software comparison Ubuntu server 22.04 LTS vs CentOS Stream 9 head-to-head

The following article compares two different and very popular for servers Linux distros with Ubuntu Server 22.04 LTS (Jammy) and CentOS Stream 9. These are the latest versions released in the past month. Bear in mind, that they have different release cycle, but the these are the system with log support up to 2032! The two Linux distors Ubuntu Server 22.04 LTS (Jammy) and CentOS Stream 9 support is till 2032! Here is the links to their life cycle and what kind of support could be expected in the time frame of 10 years:

In the Desktop world upgrading to the new and latest version of a Linux distribution is almost mandatory, but in the server world, upgrading is more complicated. The first step in updating a server is to check what software versions come with the new distribution version and then check whether the running custom (application) software supports the software versions. For example, updating to a new distribution version, which comes with PHP 8.1, but the current application supports only 7.4 is not very wise and in addition, the current version may have years of support in the future.

Lately, with the virtualization and container software and it is more common to choose a long-living Linux distribution for the host and more short-living with bleeding edge technologies for the guest environments. So check out the Fedora 36 Server Edition articles in the site – Minimal network installation of Fedora 36 Server, Software and technical details of Fedora Server 36 including cockpit screenshots and the comparison software table between Ubuntu 22.04 LTS and Fedora 36 Server EditionSoftware comparison Ubuntu server 22.04 LTS vs Fedora 36 server edition – head-to-head.

Software comparison table – Ubuntu 22.06 LTS vs CentOS Stream 9 (20220606.0) as of June 2022:

SoftwareUbuntu 22.04CentOS Stream 9
Support10 years (April 2032)10 years (31.03.2032)
Linux kernel5.15.05.14.0
libc2.352.34
OpenSSL.
3.0.2
1.1.1k
3.0.1
GNU GCC9.4.0
10.3.0
11.2.0
12-20220302
.
.
11.3.1
.
PHP8.18.0.13
Python2.7.18
3.10.4
.
3.9.10
Perl5.34.05.32.1
Ruby3.03.0.3
OpenJDK8u312-b07
11.0.15
17.0.3
18~36ea-1
1.8.0.332.b09
11.0.15.0.10
17.0.3.0.7
.
Go lang1.13.8
1.17.3
1.18.1
.
1.17.5
.
Rust1.58.11.61.0
llvm11.1.0
12.0.1
13.0.1
14.0.0
.
.
.
14.0.0
nodejs12.22.9
.
.
16.14.0
Subversion1.14.11.14.1
Git2.34.12.31.1
Apache2.4.522.4.53
Nginx1.18.01.20.1
MySQL server8.0.298.0.28
MariaDB10.6.710.5.13
PostgreSQL14.213.7
SQLite2.8.17
3.37.2
.
3.34.1
Xorg X server1.22.1.11.20.11
Gnome Shell42.040.10
qemu6.27.0.0
docker|podman20.10.124.1.0
lxc5.0.0.

For more detailed overview the two systems check out the following articles – Software and technical overview of Ubuntu server 22.04 LTS and Software and technical details of CentOS Stream 9 minimal install.

Copy of the Life cycle plans of Ubuntu server 22.04 and CentOS Stream 9 (Red Hat Enterprise Linux 9) of the official sources only for time-freeze feature:

Ubuntu 22.04 LTS
CentOS Stream 9 (RHEL 9)