@@ -822,7 +822,9 @@ Since CloudStack 4.16, for VMware, migration of System VMs can also be done to a
822822Troubleshoot networks from System VMs
823823-------------------------------------
824824.. |run-diagnostics-icon.png| image:: /_static/images/run-diagnostics-icon.png
825+ .. |get-diagnostics-icon.png| image:: /_static/images/get-diagnostics-icon.png
825826.. |diagnostics-form.png| image:: /_static/images/diagnostics-form.png
827+ .. |diagnostics-data-form.png| image:: /_static/images/diagnostics-data-form.png
826828
827829For troubleshooting of network issues in CloudStack hosted networks, CloudStack allows
828830the administrator to execute network-utility commands (ping, traceroute or arping)
@@ -843,8 +845,8 @@ To run either a ping, traceroute or arping through the CloudStack UI:
843845The Extra Args parameter is for specifying command line optional parameters
844846as one would when executing any of the tools from the terminal or command line.
845847
846- The supported versions are Debian 9 based since system VMs are built using the
847- same Debian 9 based templates.
848+ The supported versions are Debian 10 based since system VMs are built using the
849+ same Debian 10 based templates.
848850
849851| See:
850852| Traceroute(1): https://manpages.debian.org/stretch/traceroute/traceroute.1.en.html
@@ -855,3 +857,97 @@ same Debian 9 based templates.
855857Non-Alphanumeric characters (metacharacters) are not allowed for this parameter
856858except for the “-“ and the “.”. Any metacharacter supplied will immediately result
857859in an immediate termination of the command and report back to the operator that an illegal character was passed
860+
861+ Get Diagnostics Data
862+ ~~~~~~~~~~~~~~~~~~~~
863+
864+ For further troubleshooting, a set of files can be retrieved from any system VM
865+ by using the Get Diagnostics feature, either via the UI or an API call. The
866+ files are compressed and a URL is returned where the diagnostics data can be
867+ retrieved.
868+
869+ #. As an administrator, log in to the CloudStack UI.
870+
871+ #. Navigate to Infrastructure > System VMs or Virtual Routers.
872+
873+ #. Click on the Get Diagnostics button. |get-diagnostics-icon.png|
874+
875+ #. A form will pop up similar to this;
876+
877+ |diagnostics-data-form.png|
878+
879+ #. Click OK.
880+
881+ #. Wait for the URL to generate and click it to download the zipped up
882+ diagnostics files.
883+
884+ The following files are retrieved by default for the Virtual Router and
885+ is configurable using a global setting: ‘diagnostics.data.router.defaults’
886+
887+ iptables, ipaddr, iproute, /etc/cloudstack-release, /etc/dnsmasq.conf,
888+ /etc/dhcphosts.txt, /etc/dhcpopts.txt, /etc/dnsmasq.d/cloud.conf,
889+ /etc/dnsmasq-resolv.conf, /var/lib/misc/dnsmasq.leases, /var/log/dnsmasq.log,
890+ /etc/hosts, /etc/resolv.conf, /etc/haproxy/haproxy.cfg, /var/log/haproxy.log,
891+ /etc/ipsec.d/l2tp.conf, /var/log/cloud.log, /var/log/routerServiceMonitor.log,
892+ /var/log/daemon.log"
893+
894+ The following files are retrieved by default for the Secondary Storage VM
895+ and Console Proxy VM and is configurable using a global setting:
896+ ‘diagnostics.data.systemvm.defaults’
897+
898+ "iptables, ipaddr, iproute, /etc/cloudstack-release,
899+ /usr/local/cloud/systemvm/conf/agent.properties,
900+ /usr/local/cloud/systemvm/conf/consoleproxy.properties, /var/log/cloud.log,
901+ /var/log/patchsystemvm.log /var/log/daemon.log"
902+
903+ These global settings are all dynamic and do not require a restart of the
904+ management server in order for changes to be effective. The names wrapped in
905+ square brackets are for data types that need to first execute a script in the
906+ system vm and grab output for retrieval, e.g. the output from iptables-save is
907+ written to a file which will then be retrieved. This also allows an admin to
908+ pack their own custom scripts in the system VMs that can be executed and their
909+ output will be redirected to a text file that will be retrieved.
910+
911+ The API also has an optional parameter ‘files’ which can be used for retrieving
912+ specific files. This parameter has to be the absolute path to where the file
913+ exists on the file system.
914+
915+ The output from any command/script can be retrieved by wrapping the name with
916+ square brackets which will be executed and its output redirected to a file with
917+ a name similar to the name in square brackets in lower case. For example, a
918+ user can package their own custom script in the system VM called
919+ myscript.py/sh, the user will then retrieve output of this script by specifying
920+ it as ‘[MYSCRIPT]’ as either input parameter to files or setting it as a global
921+ setting. the API will then execute this script and redirect its output to a
922+ file called ‘myscript.log’. This could also be any command that can be executed
923+ from the shell and its output will be gathered and retrieved.
924+
925+ Additional global settings can be configured related to garbage collection of
926+ generated diagnostics data files and are as follows:
927+
928+ * diagnostics.data.gc.enable
929+
930+ Enables the garbage collector background task to delete old files. Changing
931+ this setting requires a management server restart. The default value is True
932+
933+ * diagnostics.data.gc.interval
934+
935+ The interval at which the garbage collector background tasks in seconds. This
936+ setting requires a management server restart. The default value is 86400
937+ (Once a day).
938+
939+ * diagnostics.data.retrieval.timeout
940+
941+ The overall system VM script execution time out in seconds. This setting does
942+ not require a management server restart. The default value is 1800.
943+
944+ * diagnostics.data.max.file.age
945+
946+ Sets the maximum time in seconds a file can stay in storage before it is
947+ deleted. The default value is 86400 (1 day).
948+
949+ * diagnostics.data.disable.threshold
950+
951+ Sets the secondary storage disk utilisation percentage for file retrieval.
952+ An exception is thrown when no secondary store is found with a lower capacity
953+ than the specified value. The default value is 0.95 (95 %).
0 commit comments