Linux
The Sematext Agent is available as a package (DEB, RPM, etc.) called sematext-agent
:
Installing on Red Hat¶
sudo wget https://pub-repo.sematext.com/redhat/sematext.repo -O /etc/yum.repos.d/sematext.repo
sudo yum clean all
sudo yum install sematext-agent
Upgrading/Updating on Red Hat¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on Red Hat¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on CentOS¶
sudo wget https://pub-repo.sematext.com/centos/sematext.repo -O /etc/yum.repos.d/sematext.repo
sudo yum clean all
sudo yum install sematext-agent
Upgrading/Updating on CentOS¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on CentOS¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on Debian¶
echo "deb http://pub-repo.sematext.com/debian sematext main" | sudo tee /etc/apt/sources.list.d/sematext.list > /dev/null
wget -O - https://pub-repo.sematext.com/debian/sematext.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install sematext-agent
Upgrading/Updating on Debian¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on Debian¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on Ubuntu¶
echo "deb http://pub-repo.sematext.com/ubuntu sematext main" | sudo tee /etc/apt/sources.list.d/sematext.list > /dev/null
wget -O - https://pub-repo.sematext.com/ubuntu/sematext.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install sematext-agent
Upgrading/Updating on Ubuntu¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on Ubuntu¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on Amazon Linux¶
sudo wget https://pub-repo.sematext.com/centos/sematext.repo -O /etc/yum.repos.d/sematext.repo
sudo yum clean all
sudo yum install sematext-agent
Upgrading/Updating on Amazon Linux¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on Amazon Linux¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on Fedora¶
sudo wget https://pub-repo.sematext.com/fedora/sematext.repo -O /etc/yum.repos.d/sematext.repo
sudo dnf clean all
sudo dnf install sematext-agent
Upgrading/Updating on Fedora¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on Fedora¶
To ensure all configuration files and logs are removed, delete the main installation directory:Installing on SuSE¶
sudo zypper ar -r https://pub-repo.sematext.com/suse/11/sematext.repo
sudo zypper up
sudo zypper in sematext-agent
Upgrading/Updating on SuSE¶
- Update the repository file and GPG key:
- Upgrade the Sematext Agent:
Uninstalling on SuSE¶
To ensure all configuration files and logs are removed, delete the main installation directory:Configure communication with Sematext Cloud using your Infra App Token¶
Once the Sematext Agent is installed, you need to configure it to communicate with Sematext Cloud. This is done by setting your Infra App token using the following command:
If you're setting up the agent in the EU region, you'll have to provide the region
option:
You can find your Infra App token by navigating to Fleet and Discovery > Agents > Install Agent
and selecting your Linux distribution.
Extra configuration for Monitoring and Logs Integrations¶
To fully enable monitoring and logging for specific integrations, additional configuration steps are required after the Sematext Agent installation or upgrade. These steps are provided directly after the installation instructions for each integration in Sematext Cloud:
The integrations that require this extra configuration include:
- Cassandra
- Couchbase
- Hadoop
- HBase
- Kafka
- Solr
- Solr Cloud
- Spark
- Storm
- Tomcat
- Zookeeper
- Jenkins
- JVM
- Elasticsearch
- OpenSearch
- Redis
- HAProxy
- MySQL
- Nginx Plus
- ClickHouse
- PostgreSQL
- RabbitMQ
Follow the specific setup instructions for each integration to ship metrics and logs from the agent to Sematext Cloud.
Running Sematext Agent with SELinux enabled¶
With SELinux enabled, starting the agent with sudo service sematext-agent restart
may result in an error message like:
Job for sematext-agent.service failed because the control process exited with error code.
Some of the Agent processes may not be started as a consequence. Exact error can depend on your SELinux settings and it can
be found in /var/log/audit/audit.log
. Using audit2allow
utility, it is possible to generate policy package file that can
be activated to remove restrictions that caused the error. For example:
sudo grep -a AVC /var/log/audit/audit.log | grep spm-monitor | audit2allow -M sematext-systemd-selinux
You can review the policy stored in type enforcement file (in this case named sematext-systemd-selinux.te
) to see whether it suits your security guidelines. To activate this policy,
run:
semodule -i sematext-systemd-selinux.pp
If you decide to make adjustments in the type enforcement file, it should first be compiled into policy module:
checkmodule -M -m -o sematext-systemd-selinux.mod sematext-systemd-selinux.te
and then compile into policy package:
semodule_package -o sematext-systemd-selinux.pp -m sematext-systemd-selinux.mod
which can be activated using previously mentioned semodule -i
command.
Note: if SELinux is deliberately enabled on your machines, make sure that policy package being imported is in line with your security guidelines.