How to Install Dynatrace monitoring tool on Linux?

To Install Dynatrace monitoring tool on Linux server.

 

Dynatrace Installation

For Dynatrace one agent, we recommend separate filesystem. For example, /opt/dynatrace.

Go through the below link for creating separate filesystem on ODA machine.

How to create new filesystem on ODA server

Dynatrace software will be installed by running the shell script Dynatrace-OneAgent-Linux-1.253.245.sh.

copy the dynatrace file(s) under /opt/dynatrace

# cd Dynatrace\ one\ agent\ -\ Prod/
# ls -ltr
total 213132
-rw-r–r– 1 root root 218246355 Jan 13 09:03 Dynatrace-OneAgent-Linux-1.253.245.sh
# cp -p Dynatrace-OneAgent-Linux-1.253.245.sh /opt/dynatrace/
# cd /opt/dynatrace/
# ls -ltr
total 213148
-rw-r–r– 1 root root 218246355 Jan 13 09:03 Dynatrace-OneAgent-Linux-1.253.245.sh
drwx—— 2 root root 16384 Jan 18 06:51 lost+found
# chmod 777 Dynatrace-OneAgent-Linux-1.253.245.sh

Login as root user

#
login as: root
root@10.148.47.65’s password:
Last login: Wed Jan 18 06:59:39 2023
# cd /opt/dynatrace/
# ls -ltr
total 213148
-rwxrwxrwx 1 root root 218246355 Jan 13 09:03 Dynatrace-OneAgent-Linux-1.253.245.sh
drwx—— 2 root root 16384 Jan 18 06:51 lost+found

Run the dyna trace shell script 

# /bin/sh Dynatrace-OneAgent-Linux-1.253.245.sh –set-infra-only=true –set-app-log-content-access=true
07:25:57 Checking root privileges…
07:25:57 Process user: root, ID: 0
07:25:57 OK
07:25:57 Logging to /var/log/dynatrace/oneagent/installer/installation_51170.log
07:25:57 Installation started, version 1.253.245.20221118-071521, build date: 18.11.2022, PID 51170.
07:25:57 Detected platform: LINUX arch: X86_64
07:25:58 Checking free space in /opt/dynatrace/oneagent
07:25:59 Extracting…
07:25:59 Unpacking. This may take a while…
07:26:14 Unpacking complete.
07:26:14 Moving new binaries into lib folders…
07:26:14 User ‘dtuser’ added successfully.
07:26:19 Non-privileged mode is enabled.
07:26:21 Checking free space in /lib
07:26:21 Checking free space in /lib64
07:26:22 We detected that SELinux is disabled in your system so we’re skipping module installation.
07:26:22 Please note that if you enable SELinux later deep monitoring will stop working and you’ll need to reinstall Dynatrace OneAgent.
07:26:22 Verifying auto-injection compatibility…
07:26:22 OK
07:26:22 Refreshing dynamic linker run-time bindings using ldconfig
07:26:23 Backing up original kernel.core_pattern entry in /opt/dynatrace/oneagent/agent/conf/original.sysctl.corepattern
07:26:23 Red Hat ABRT service disabled
07:26:23 Writing new core_pattern with oneagentdumpproc to /proc/sys/kernel/core_pattern
07:26:23 Removing /etc/sysctl.conf ‘kernel.core_pattern’ option
07:26:23 Adding entry with oneagentdumpproc to /etc/sysctl.conf
07:26:25 Starting agents…
07:26:26 oneagent service started
07:26:26 Checking if agent is connected to the server…
07:26:37 Dynatrace OneAgent failed to connect to Dynatrace Cluster Node. See log file for details: /var/log/dynatrace/oneagent/os/ruxitagent_host_60980.0.log

Verify the dynatrace process

# ps -ef|grep -i dyna
dtuser 60970 1 0 07:26 ? 00:00:00 /opt/dynatrace/oneagent/agent/lib64/oneagentwatchdog -bg -config=/opt/dynatrace/oneagent/agent/conf/watchdog.conf
dtuser 60980 60970 0 07:26 ? 00:00:00 oneagentos -Dcom.compuware.apm.WatchDogPort=50000 -Dcom.compuware.apm.WatchDogTimeout=900 -watchdog.restart_file_location=/var/lib/dynatrace/oneagent/agent/runtime/watchdog_restart_file
root 61606 50739 0 07:26 pts/1 00:00:00 grep –color=auto -i dyna

Stop the Dynatrace oneagent

# systemctl stop oneagent
# ps -ef|grep -i dyna
root 62649 50739 0 07:27 pts/1 00:00:00 grep –color=auto -i dyna
#

Dynatrace Oneagent Deinstallation 

cd /opt/dynatrace/oneagent/agent

under agent directory there is uninstall.sh script

 

# ./uninstall.sh
02:20:36 Checking root privileges…
02:20:36 Process user: root, ID: 0
02:20:36 OK
02:20:36 Uninstallation started, PID 94118.
02:20:37 Removing entries for preloading
02:20:37 Using systemd to stop the agent
02:20:37 Restoring user-defined kernel.core_pattern from backup
02:20:37 Restoring original core_pattern file
02:20:37 Removing oneagentproc from system folders
02:20:37 Removing oneagentproc from /lib
02:20:37 Removing oneagentproc from /lib64
02:20:39 Cleaning up /opt/dynatrace/oneagent/agent. Part of configuration preserved in /var/lib/dynatrace/oneagent
02:20:39 Uninstallation finished successfully
# pwd
/opt/dynatrace/oneagent/agent
#

See also

Nagios client installation and deinstallation on ODA