Start/stop/restart a node
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
Dynatrace Managed software consists of a number of Dynatrace services that are dependent on each other and should be stopped or started in a particular order.
- For Dynatrace Managed deployments containing three (3) or more nodes, use the cluster procedure (Start/stop/restart a cluster).
- For Dynatrace Managed deployments containing less than three (3) nodes, you can use the official
dynatrace.sh
script with additional parameters to properly start, stop, or restart Dynatrace services on each node individually within the cluster.
By default, the script is located at /opt/dynatrace-managed/launcher/
. Make sure the dynatrace.sh
script has executable permissions.
You can execute the dynatrace.sh
script with a parameter (start
, stop
, restart
, status
, check
, pid
) as described below.
-
start
Starts all Dynatrace Managed required services in the recommended order.
1[root@localhost]# ./dynatrace.sh start -
stop
Stops all Dynatrace Managed required services in the recommended order.
1[root@localhost]# ./dynatrace.sh stop -
restart
Restarts all Dynatrace Managed required services in the recommended order.
1[root@localhost]# ./dynatrace.sh restart -
status
Displays a list of Dynatrace required services and the status of each, including detailed information about each service:
1[root@localhost]# ./dynatrace.sh status1● dynatrace-firewall.service - Dynatrace Firewall settings2 Loaded: loaded (/etc/systemd/system/dynatrace-firewall.service; enabled; vendor preset: enabled)3 Active: active (exited) since Tue 2019-07-09 08:34:54 UTC; 1 months 3 days ago4Main PID: 12967 (code=exited, status=0/SUCCESS)5 Tasks: 06 Memory: 0B7 CPU: 08 CGroup: /system.slice/dynatrace-firewall.service910Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.11● dynatrace-nodekeeper.service - Dynatrace Nodekeeper12 Loaded: loaded (/etc/systemd/system/dynatrace-nodekeeper.service; enabled; vendor preset: enabled)13 Active: active (running) since Tue 2019-07-09 08:30:02 UTC; 1 months 3 days ago14 Tasks: 69 (limit: 32768)15 Memory: 389.2M16 CPU: 2h 9min 51.936s17 CGroup: /system.slice/dynatrace-nodekeeper.service18 ├─ 552 /opt/managed/nodekeeper/jre/bin/java -Xms239M -Xmx239M -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=60 -Duser.language=EN -Djava.io.tmpdir=...19 ├─ 966 /bin/sh /opt/managed/nodekeeper/services/watchdog.sh watch /opt/managed/nodekeeper/services/nodekeeper.sh20 └─22167 sleep 602122Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.23● dynatrace-cassandra.service - Dynatrace Cassandra24 Loaded: loaded (/etc/systemd/system/dynatrace-cassandra.service; enabled; vendor preset: enabled)25 Active: active (running) since Tue 2019-07-09 08:37:52 UTC; 1 months 3 days ago26 Tasks: 199 (limit: 32768)27 Memory: 3.2G28 CPU: 17h 1min 32.540s29 CGroup: /system.slice/dynatrace-cassandra.service30 ├─13690 /opt/managed/jre/bin/java -javaagent:/opt/managed/cassandra/bin/../lib/jamm-0.3.0.jar -XX:+CMSClassUnloadingEnabled -XX:+UseThreadPriorities -XX:ThreadPr...31 ├─13721 /bin/sh /opt/managed/services/watchdog.sh watch /opt/managed/services/cassandra.sh32 └─22197 sleep 603334Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.35● dynatrace-elasticsearch.service - Dynatrace Elasticsearch36 Loaded: loaded (/etc/systemd/system/dynatrace-elasticsearch.service; enabled; vendor preset: enabled)37 Active: active (running) since Tue 2019-07-09 08:38:15 UTC; 1 months 3 days ago38 Tasks: 58 (limit: 32768)39 Memory: 884.6M40 CPU: 6h 59min 48.051s41 CGroup: /system.slice/dynatrace-elasticsearch.service42 ├─14802 /opt/managed/jre/bin/java -Xms558M -Xmx558M -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysP...43 ├─14834 /bin/sh /opt/managed/services/watchdog.sh watch /opt/managed/services/elasticsearch.sh44 └─21975 sleep 604546Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.47● dynatrace-server.service - Dynatrace Server48 Loaded: loaded (/etc/systemd/system/dynatrace-server.service; enabled; vendor preset: enabled)49 Active: active (running) since Tue 2019-07-09 08:39:01 UTC; 1 months 3 days ago50Main PID: 2927 (code=exited, status=0/SUCCESS)51 Tasks: 475 (limit: 32768)52 Memory: 1.6G53 CPU: 1d 3h 10min 18.812s54 CGroup: /system.slice/dynatrace-server.service55 ├─15294 /opt/managed/server/dynatraceserver -vm=/opt/managed/jre/bin/java -vmargs -Xms2873M -Xmx2873M -XX:-OmitStackTraceInFastThrow -XX:+UseConcMarkSweepGC -XX:...56 └─15302 /opt/managed/jre/bin/java -Dcom.compuware.apm.WatchDogPort=50004 -classpath :/opt/managed/server/lib/ace-1.4.4-dt-2.0.jar:/opt/managed/server/lib/acme4j-...5758Aug 12 13:04:05 ip-10-176-32-69 sudo[20856]: pam_unix(sudo:session): session closed for user root59Aug 12 13:04:05 ip-10-176-32-69 sudo[21125]: dynaman : TTY=unknown ; PWD=/opt/managed/server ; USER=root ; COMMAND=/opt/dtrun/dtrun service dynatrace-cassandra status60Aug 12 13:04:05 ip-10-176-32-69 sudo[21125]: pam_unix(sudo:session): session opened for user root by (uid=0)61Aug 12 13:04:05 ip-10-176-32-69 sudo[21125]: pam_unix(sudo:session): session closed for user root62Aug 12 13:04:05 ip-10-176-32-69 sudo[21389]: dynaman : TTY=unknown ; PWD=/opt/managed/server ; USER=root ; COMMAND=/opt/dtrun/dtrun service dynatrace-security-gateway status63Aug 12 13:04:05 ip-10-176-32-69 sudo[21389]: pam_unix(sudo:session): session opened for user root by (uid=0)64Aug 12 13:04:05 ip-10-176-32-69 sudo[21389]: pam_unix(sudo:session): session closed for user root65Aug 12 13:04:05 ip-10-176-32-69 sudo[21665]: dynaman : TTY=unknown ; PWD=/opt/managed/server ; USER=root ; COMMAND=/opt/dtrun/dtrun service dynatrace-server status66Aug 12 13:04:05 ip-10-176-32-69 sudo[21665]: pam_unix(sudo:session): session opened for user root by (uid=0)67Aug 12 13:04:05 ip-10-176-32-69 sudo[21665]: pam_unix(sudo:session): session closed for user root68Hint: Some lines were ellipsized, use -l to show in full.69● dynatrace-security-gateway.service - Dynatrace Active Gate70 Loaded: loaded (/etc/systemd/system/dynatrace-security-gateway.service; enabled; vendor preset: enabled)71 Active: active (running) since Tue 2019-07-09 08:39:37 UTC; 1 months 3 days ago72Main PID: 16173 (dynatracegatewa)73 Tasks: 247 (limit: 32768)74 Memory: 410.7M75 CPU: 3h 44min 58.189s76 CGroup: /system.slice/dynatrace-security-gateway.service77 ├─16173 /opt/managed/security-Gateway/launcher/dynatracegateway -bg -vm=/opt/managed/jre/bin/java -vmargs -Xms638M -Xmx638M -XX:+UseConcMarkSweepGC -XX:CMSInitia...78 └─16182 /opt/managed/jre/bin/java -Dcom.compuware.apm.WatchDogPort=50005 -classpath /opt/managed/security-Gateway/lib/* -XX:ErrorFile=/var/opt/managed/log/securi...7980Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.81● dynatrace-nginx.service - Dynatrace NGINX82 Loaded: loaded (/etc/systemd/system/dynatrace-nginx.service; enabled; vendor preset: enabled)83 Active: active (running) since Tue 2019-07-09 08:39:46 UTC; 1 months 3 days ago84 Tasks: 14 (limit: 32768)85 Memory: 92.7M86 CPU: 40min 38.507s87 CGroup: /system.slice/dynatrace-nginx.service88 ├─17152 nginx: OneAgent companion process89 ├─17153 nginx: master process /opt/managed/nginx/sbin/nginx -c /opt/managed/nginx/conf/nginx.conf90 ├─17155 nginx: worker process91 ├─17156 nginx: worker process92 ├─17164 /bin/bash /opt/managed/services/logs-watcher.sh watch-nginx /var/opt/managed/log/nginx/access.log /var/opt/managed/log/nginx/error.log93 └─19214 sleep 6009495Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.96All services are OK -
check
Checks the status of iptable rules and the processes for Nodekeeper, Cassandra, Elasticsearch, ActiveGate, Watcher, and NGINX.
1[root@localhost]# ./dynatrace.sh check1Checking rules in iptables ...2Rule is present in 'filter': INPUT -p tcp -m tcp -m multiport --ports 443,5701:5711,7000:7001,7199,8018:8022,8443,9042,9200,9300,9998 -j DROP3Rule is present in 'filter': OUTPUT -p tcp -m tcp -m multiport --ports 443,5701:5711,7000:7001,7199,8018:8022,8443,9042,9200,9300,9998 -j ACCEPT4Rule is present in 'filter': INPUT -p tcp -m addrtype --src-type LOCAL -m tcp -m multiport --ports 443,5701:5711,7000:7001,7199,8018:8022,8443,9042,9200,9300,9998 -j ACCEPT5Rule is present in 'filter': INPUT -s 10.10.10.10/32 -p tcp -m tcp -m multiport --ports 5701:5711,7000:7001,7199,8019,9042,9200,9300 -j ACCEPT6Rule is present in 'filter': INPUT -p tcp -m tcp -m multiport --ports 443,8020:8022,8443,9998 -j ACCEPT7Rule is present in 'filter': FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT8Rule is present in 'nat': PREROUTING -p tcp -m addrtype --dst-type LOCAL -m tcp --dport 443 -j REDIRECT --to-ports 80229Rule is present in 'nat': OUTPUT -p tcp -m addrtype --dst-type LOCAL -m tcp --dport 443 -j REDIRECT --to-ports 802210All rules are active.11Nodekeeper is running at launcher PID: 966, main PID: 552, listening on ports 801812Cassandra is running at launcher PID: 13721, main PID: 13690, listening on ports 904213Elasticsearch is running at launcher PID: 14834, main PID: 14802, listening on ports 9200,930014{15 "cluster_name" : "11bc1cd1e1-c222-33e3-4f44-0e0bc0dcdc0d",16 "status" : "yellow",17 "timed_out" : false,18 "number_of_nodes" : 1,19 "number_of_data_nodes" : 1,20 "active_primary_shards" : 299,21 "active_shards" : 299,22 "relocating_shards" : 0,23 "initializing_shards" : 0,24 "unassigned_shards" : 598,25 "delayed_unassigned_shards" : 0,26 "number_of_pending_tasks" : 0,27 "number_of_in_flight_fetch" : 0,28 "task_max_waiting_in_queue_millis" : 0,29 "active_shards_percent_as_number" : 33.3333333333333330}31Server is running at launcher PID: 15294, main PID: 15302, listening on ports 802132ActiveGate is running at launcher PID: 16173, main PID: 16182, listening on ports 844333Command to run as user dynaman: /opt/managed/services/logs-watcher.sh status34Watcher is running, reporting in log: /var/opt/managed/log/logs-watcher-for-nginx-logs.log35NGINX is running at launcher PID: 17153, main PID: 17155 17156, listening on ports 802236All processes are OK -
pid
Displays the process ID for all Dynatrace required services that were started with the
dynatrace.sh
script.1[root@localhost]# ./dynatrace.sh pid1966 552 13721 13690 14834 14802 15294 15302 16173 16182 17153 17155 17156