Monitor and analyze with Grafana, influxdb 1.8 and collectd under Ubuntu 22.04 LTS

This is an updated version of the previous version of this topic – Monitor and analyze with Grafana, influxdb 1.8 and collectd under CentOS Stream 9, but this time for Ubuntu 22.04 LTS. The article describes how to build modern analytic and monitoring solutions for system and application performance metrics. A solution, which may host all the server’s metrics and a sophisticated application, allows easy analyses of the data and powerful graphs to visualize the data.
A brief introduction to the main three software used to build the proposed solution:

  1. Grafana – an analytics and a web visualization tool. It supports dashboards, charts, graphs, alerts, and many more.
  2. influxdb – a time series database. Bleeding fast reads and writes and optimized for time.
  3. collectd – a data collection daemon, which obtain metrics from the host it is started and sends the metrics to the database (i.e. influxdb). It has around 170 plugins to collect metrics.

What is the task of each tool:

  1. collectd – gathers metrics and statistics using its plugins every 10 seconds on the host it runs and then sends the data over UDP to the influxdb using a simple text-based protocol.
  2. influxdb – listens on an open UDP port for data coming from multiple collectd instances installed on many different devices. In this case, a Linux server running Ubuntu 22.04 LTS.
  3. Grafana – an analytics and a web visualization tool. A web application, which connects to the InfluxDB and visualizes the time series metrics in graphs organized in dashboards. Graphs for CPU, memory, network, storage usage, and many more.
  4. nginx to enable SSL and proxy in front of the Grafana.

The whole solution uses the Ubuntu 22.04 LTS server edition distro. Installing the Ubuntu 22.04 LTS is a mandatory step to proceed further with this article – Installation of base Ubuntu server 22.04 LTS
The UDP influxdb port should be open per IP basis and web port of the web server (nginx) is up to the purpose of the solution – it can be behind a VPN or openly accessible by Internet.

STEP 1) Install additional repositories for Grafana, InfluxDB and collectd.

collectd is part of the Ubuntu official repositories. Grafana and InfluxDB maintain their official repositories. Here is how to install them.
Add the InfluxDB repository by first, importing the key of the InfluxDB repository and add the URL of the repository in /etc/apt/sources.list.

myuser@srv:~$ sudo curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
echo 'deb https://repos.influxdata.com/debian stable main' > /etc/apt/sources.list.d/influxdata.list

Then, repeated the same procedure with the Grafana repository:

myuser@srv:~$ sudo curl -sL https://packages.grafana.com/gpg.key | sudo apt-key add -
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
echo 'deb https://packages.grafana.com/oss/deb stable main' > /etc/apt/sources.list.d/grafana.list

Execute apt update to include the available file packages from all repositories including the ones:

apt update

Keep on reading!

How to install collectd in Ubuntu 22.04 LTS and in general under Ubuntu

It appears Ubuntu 22.04 LTS still does not include in its packages base one of the best server software to gather metrics from different sources. collectd is a small and fast daemon, which can gather metrics from more than 80 different sources.
In fact, Ubuntu 22.04 LTS does not include it, but the new not LTS Ubuntu 22.10 provides the package in the universe repository – https://packages.ubuntu.com/kinetic/collectd-core. At least, one more file should be installed collectd from https://packages.ubuntu.com/kinetic/collectd. The name of the package is collectd, collectd-core and there are 4 more files of interests – collectd-dev, collectd-utils, libcollectdclient-dev, libcollectdclient1.
Check out the pool folder of an Ubuntu mirror, for example, the mirror – http://mirrors.kernel.org/ubuntu/pool/universe/c/collectd/ and download the latest file.
Now, the latest files are http://mirrors.kernel.org/ubuntu/pool/universe/c/collectd/collectd-core_5.12.0-11_amd64.deb and http://mirrors.kernel.org/ubuntu/pool/universe/c/collectd/collectd_5.12.0-11_amd64.deb. Download them and install the files with apt like usually but pointing to the files:
Keep on reading!

Run LXC Ubuntu 22.04 LTS container with bridged network under CentOS Stream 9

In continuation of the previous article Run LXC CentOS Stream 9 container with bridged network under CentOS Stream 9, this time the LXC container will be Ubuntu 22.04 LTS Jammy Jellyfish.
To receive a better understanding why to use LXC or a much detailed information of some steps in this article it is better to visit the previously mention article and the original Run LXC CentOS 8 container with bridged network under CentOS 8.

STEP 1) Install the needed software EPEL repository and the LXC and its dependencies

To install LXC software the EPEL CentOS Stream 9 repository must be installed. At present, the LXC included in CentOS Stream 9 EPEL repository is 4.0.

dnf install -y epel-release
dnf install -y lxc lxc-templates container-selinux
dnf install -y wget tar

lxc-templates uses template “download” to download different Linux distribution images from http://images.linuxcontainers.org/, which now redirects to http://uk.lxd.images.canonical.com/ (an Ubuntu lxd images mirror).
The container-selinux should be installed only if the host, i.e. the CentOS Stream 9 install, is with enabled SELinux. The packages offers additional SELinux rules or for the LXC and LXC tools like lxc-attach and more.

STEP 2) Create a Ubuntu 22.04 LTS with the help of LXC templates

[root@srv ~]# lxc-create --template download -n mycontainer -- --dist centos --release 9-Stream --arch amd64

In addition, there is a “–variant” option along with “--dist” and “--release” to specify which variant to install – default, cloud, desktop or other. There is a variant column in the table on the images’ page mentioned above.
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)

Review of freshly installed Ubuntu Desktop 22.04 LTS (Gnome GUI)

After the article of Ubuntu Desktop 22.04 LTS installation steps Install Ubuntu Desktop 22.04 LTS on the entire disk and Install Ubuntu Desktop 22.04 LTS on a PC with existing windows 10 – dual boot this article is mainly to see what to expect from a freshly installed Ubuntu Desktop 22.04 LTS – the look and feel of the GUI (Gnome – version 42.0).

  • Xorg X server – 1.22.1.1
  • GNOME (the GUI) – 42.0
  • linux kernel – 5.15.0

The idea of this tutorial is to see what to expect from Ubuntu Desktop 22.04 LTSthe look and feel of the GUI, the default installed programs, and their look and how to do some basic steps with them. Here you’ll find more than 114 screenshots and not so many text we do not want to turn this review of many texts and version information and 3 meaningless screenshots , which you cannot see anything for the user interface, which these days is the primary goal of a Desktop system. You can expect more of this kind of review in the future…
You can find a similar article for Fedora Workstation 36 – (coming soon).
Real workstations, not virtual environments are used for all installation and review tutorials!

SCREENSHOT 1) Ubuntu is selected by default

Wait for 10 seconds or hit Enter to boot the Ubuntu. The GNU GRUB version is 2.06.

main menu
grub entry boot

SCREENSHOT 2) Select the user.

main menu
login screen

SCREENSHOT 3) Enter the password.

main menu
login screen password

SCREENSHOT 4) Gnome Shell Overview.

main menu
desktop – gnome shell

Keep on reading!

Install Ubuntu Desktop 22.04 LTS on the entire disk

This tutorial will show the simple steps of installing the latest version of UbuntuUbuntu Desktop 22.04 LTS. This is the simplest set up. One hard disk device in the system is installed, which is detected as sda and the entire disk will be used for the installation of Ubuntu Desktop 22.04 LTS. All disk information in sda disk device will be permanently deleted by the installation wizard!
Ubuntu Desktop 22.04 LTS comes with the following software:

  • Xorg X server – 1.22.1.1
  • GNOME (the GUI) – 42.0
  • linux kernel – 5.15.0
  • linux-firmware – 20220329.git681281e4
  • QT – 5.13.3 and 6.2.4
  • libc – 2.35
  • gnu gcc – 9.4.0, 10.3.0, 11.2.0 and 12-20220302
  • coreutils – 8.32
  • python2.7 (possible to install) – 2.7.18
  • python3 (default) – 3.10.4
  • perl – 5.34.0
  • apt – 2.4.5
  • cups – 2.4.1

A more complex installation with a dual boot set up could found here – Install Ubuntu Desktop 22.04 LTS on a PC with existing windows 10 – dual boot.

We used the following ISO for the installation process – Ubuntu 22.04 LTS (Jammy Jellyfish):

https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso

It is a LIVE image so you can try it before installing it. The easiest way is just to download the image and burn it to a DVD disk and then follow the installation below:

SCREENSHOT 1) Select to “Try or Install Ubuntu” and hit enter.

To install Ubuntu from your DVD or USB you must boot from it, so change your BIOS accordingly – first boot devide should be the DVD or USB drive with Ubuntu installation. If you do it successfully you would see the screenshot below.

main menu
Grub2 try install linux

Keep on reading!

Install Ubuntu Desktop 22.04 LTS on a PC with existing windows 10 – dual boot

This tutorial will show the simple steps of installing the latest version of UbuntuUbuntu Desktop 22.04 LTS. Here we present the more advanced setup installation when you have already had installed operating systems, so this installation will add Ubuntu 22.04 LTS to one existing operating system – Microsoft Windows 10 Professional. So there we have 2 hard disks in the system – one is NVME, the other one is an SSD. The installation uses the first disk – “sda” in this case. The SSD has two partitions, which are going to be removed, and a new disk layout will be used for the Ubuntu installation with three partitions – efi, swap and root parititions.
Ubuntu Desktop 22.04 LTS comes with the following software:

  • Xorg X server – 1.22.1.1
  • GNOME (the GUI) – 42.0
  • linux kernel – 5.15.0
  • linux-firmware – 20220329.git681281e4
  • QT – 5.13.3 and 6.2.4
  • libc – 2.35
  • gnu gcc – 9.4.0, 10.3.0, 11.2.0 and 12-20220302
  • coreutils – 8.32
  • python2.7 (possible to install) – 2.7.18
  • python3 (default) – 3.10.4
  • perl – 5.34.0
  • apt – 2.4.5
  • cups – 2.4.1

We used the following ISO for the installation process – Ubuntu 22.04 LTS (Jammy Jellyfish):

https://releases.ubuntu.com/22.04/ubuntu-22.04-desktop-amd64.iso

It is a LIVE image so you can try it before installing it. The easiest way is just to download the image and burn it to a DVD disk and then follow the installation below:

SCREENSHOT 1) Boot from the DVD or USB flash drive to install the Ubuntu 22.04 LTS.

main menu
UEFI DVD boot install

Keep on reading!

Installation of base Ubuntu server 22.04 LTS

This tutorial will show you the simple steps of installing a modern Linux DistributionUbuntu server 22.04 LTS edition. Following most of the default options during the setup configuration for simplicity. The installation wizard is very much the same as the Ubuntu server 20.04 LTS – Minimal installation of Ubuntu server 20.04 LTS

Here are some basic data from the default installation setup settings:

  1. Installed packages – ~617 occupying 2.3G of space.
  2. 3 partitions when using automatic patition layout – boot efi, boot and root.
  3. ext4 used for the root parition.

The Ubuntu Server 22.04 LTS comes and updates to the following Linux packages:

  • Linux kernel : 5.15.
  • Python : 3.10.4
  • GLibc : 2.35
  • OpenSSL : 3.0.2
  • systemd : 249.11

The most interesting is the version of OpenSSL 3.x in an LTS (Long Term Support) release, which should be pretty stable to be included. Here is more detailed overview of the installed software – Software and technical overview of Ubuntu server 22.04 LTS

We used the following ISO for the installation process – Ubuntu 22.04 LTS (jammy jellyfish):

http://releases.ubuntu.com/jammy/ubuntu-22.04-live-server-amd64.iso

SCREENSHOT 1) Boot from the disk or USB – whatever you made after downloading the ISO file from Ubuntu’s official source.

On the image here the DVD is used to boot in UEFI mode installation.

main menu
boot uefi dvd

Keep on reading!