vSphere Diagnostic Tool released as Fling

Share on:

vSphere Diagnostic Tool is a python script that runs diagnostic commands on the vCenter Server Photon Appliance to return useful troubleshooting data while running within the confines of the local environment with out upstream dependencies.

The tool itself is currently a set of self contained python and bash scripts that can perform the following tests for vCenter Server Appliance 6.5 or newer:

  • vCenter Basic Info
  • Lookup Service Check
  • AD Check
  • vCenter Certificate Check
  • Core File Check
  • Disk Check
  • vCenter DNS Check
  • vCenter NTP Check
  • vCenter Port Check
  • Root Account Check
  • vCenter Services Check
  • VCHA Check

We use a simple Pass/Warning/Fail status for each test as well as include KBs or other knowledge sources for Warning and Fail results which provides next steps to solving the issue.

Steps to run it:

Download:

https://flings.vmware.com/vsphere-diagnostic-tool

Copy the vdt-v1.1.0.zip file to your VCSA into /root

unzip

 1root@vcsa [ ~ ]# unzip vdt-v1.1.0.zip
 2Archive:  vdt-v1.1.0.zip
 34f3b2251dfe35602db617f99c4ab64f919669ead
 4   creating: vdt-v1.1.0/
 5  inflating: vdt-v1.1.0/README.md
 6   creating: vdt-v1.1.0/cfg/
 7  inflating: vdt-v1.1.0/cfg/config_log.ini
 8 extracting: vdt-v1.1.0/formerly_pulse.txt
 9   creating: vdt-v1.1.0/lib/
10  inflating: vdt-v1.1.0/lib/__init__.py
11  inflating: vdt-v1.1.0/lib/cisutils.py
12  inflating: vdt-v1.1.0/lib/lstool_parse.py
13  inflating: vdt-v1.1.0/lib/lstool_scan.py
14  inflating: vdt-v1.1.0/lib/pformatting.py
15  inflating: vdt-v1.1.0/lib/utils.py
16   creating: vdt-v1.1.0/scripts/
17 extracting: vdt-v1.1.0/scripts/__init__.py
18  inflating: vdt-v1.1.0/scripts/__vc_info_auth.py
19  inflating: vdt-v1.1.0/scripts/_vc_dns.sh
20  inflating: vdt-v1.1.0/scripts/lsreport.py
21  inflating: vdt-v1.1.0/scripts/vc_ad_check.py
22  inflating: vdt-v1.1.0/scripts/vc_auth_cert_check.py
23  inflating: vdt-v1.1.0/scripts/vc_auth_vmdir_check.py
24  inflating: vdt-v1.1.0/scripts/vc_corefile_check.py
25  inflating: vdt-v1.1.0/scripts/vc_db_check.py
26  inflating: vdt-v1.1.0/scripts/vc_disk_space.py
27  inflating: vdt-v1.1.0/scripts/vc_ntp.sh
28  inflating: vdt-v1.1.0/scripts/vc_ports.py
29  inflating: vdt-v1.1.0/scripts/vc_root_check.py
30  inflating: vdt-v1.1.0/scripts/vc_services.py
31  inflating: vdt-v1.1.0/scripts/vc_syslog_check.py
32  inflating: vdt-v1.1.0/scripts/vc_vcha_check_auth.py
33   creating: vdt-v1.1.0/templates/
34  inflating: vdt-v1.1.0/templates/python_template.py
35  inflating: vdt-v1.1.0/vdt.py

enter the directory

1cd vdt-v1.1.0

run vdt.py

  1root@vcsa [ ~/vdt-v1.1.0 ]# python vdt.py
  2_________________________
  3   RUNNING PULSE CHECK
  4
  5Today: Wednesday, December 08 15:25:30
  6Version: 1.1.0
  7Log Level: INFO
  8
  9Provide password for administrator@vsphere.local:
 10________________________
 11   VCENTER BASIC INFO
 12
 13
 14Current Time: 2021-12-08 15:25:36.624417
 15vCenter Uptime: up 13 days
 16vCenter Load Average: 0.93, 0.99, 0.94
 17Number of CPUs: 2
 18Total Memory: 15.65
 19vCenter Hostname: vcsa.local
 20vCenter PNID: vcsa.local
 21vCenter IP Address: 192.168.100.45
 22Proxy Configured: "no"
 23NTP Servers: pool.ntp.org
 24vCenter Node Type: vCenter with Embedded PSC
 25vCenter Version: 7.0.3.00100 - 18778458
 26vCenter SSO Domain: vsphere.local
 27vCenter AD Domain: No DOMAIN
 28
 29Number of ESXi Hosts: 2
 30Number of Virtual Machines: 41
 31Number of Clusters: 2
 32Disabled Plugins: None
 33
 34__________________
 35   VC DNS CHECK
 36
 37Nameservers
 38192.168.0.2
 39192.168.0.3
 40
 41Entries in /etc/hosts
 42127.0.0.1  vcsa.local vcsa localhost
 43::1  vcsa.local vcsa localhost ipv6-localhost ipv6-loopback
 44
 45Non-standard entries in /etc/hosts
 46 [PASS] None
 47
 48
 49Basic Port Testing
 50 [PASS] Port TCP 53 open to nameserver 192.168.100.2
 51 [PASS] Port TCP 53 open to nameserver 192.168.100.3
 52
 53Nameserver Queries
 54192.168.100.2
 55 [PASS] DNS with UDP - resolved vcsa.local to 192.168.0.45
 56 [PASS] Reverse DNS - resolved 192.168.100.45 to vcsa.local
 57 [PASS] DNS with TCP - resolved vcsa.local to 192.168.100.45
 58192.168.100.3
 59 [PASS] DNS with UDP - resolved vcsa.local to 192.168.100.45
 60 [PASS] Reverse DNS - resolved 192.168.100.45 to vcsa.local
 61 [PASS] DNS with TCP - resolved vcsa.local to 192.168.100.45
 62
 63 Commands used:
 64  dig +short <fqdn> <nameserver>
 65  dig +noall +answer -x <ip> <namserver>
 66  dig +short +tcp <fqdn> <nameserver>
 67
 68RESULT: [PASS]
 69
 70__________________________
 71   Lookup Service Check
 72
 73Please remember to check if a node shows up in more than one SSO site.
 74If a node exists in more than one SSO site, you will need to run
 75lsdoctor.py -r option 2 (https://kb.vmware.com/s/article/80469)
 76
 77MACHINE ID CHECK
 78
 79  [PASS]	Machine ID matches vpxd solution user in vpxd.cfg
 80
 81REGISTRATION CHECK
 82
 83  SSO Site: default-site
 84  [FAIL]	Node: vcsa.local (VC 7.0 or CGW)
 85		- PROBLEM: Duplicates Found: Ignore if this is the PSC HA VIP.  Otherwise, you must unregister the extra endpoints.
 86
 87		- PROBLEM: SSL Trust Mismatch: Please run python lsdoctor.py --trustfix option on this node.
 88
 89
 90______________
 91   AD Check
 92
 93
 94Domain Report:
 95	No domain(s) detected
 96
 97Domain Exclusion List:
 98
 99	 None
100
101DC Exclusion List:
102
103	 None
104
105__________________________
106   VC CERTIFICATE CHECK
107
108[PASS]	ESXi Certificate Management Mode: vmca
109
110Checking MACHINE_SSL_CERT
111
112	[PASS]	Supported Signature Algorithm
113
114_________________
115   VMdir Check
116
117[INFO]	VMdir database size: 39.02MB
118
119[INFO]	VMdir Status Check (No partners)
120
121[PASS]	VMdir State Check
122
123[PASS]	VMdir Arguments Check
124
125
126_____________________
127   CORE FILE CHECK
128
129[PASS]	Number of core files: 0
130[PASS]	Number of hprof files: 0
131
132______________________________
133   vCenter PostgresDB Check
134
135Top 10 Largest Tables:
136
137       tablename      |  size
138  --------------------+---------
139   vpx_proc_log       | 105 MB
140   pk_vpx_proc_log    | 16 MB
141   vpxi_proc_log_name | 5272 kB
142   vpx_event_arg_17   | 3128 kB
143   vpx_task           | 3112 kB
144   vpx_event_arg_11   | 3080 kB
145   vpx_event_arg_14   | 3000 kB
146   vpx_event_arg_13   | 3000 kB
147   vpx_event_arg_12   | 2984 kB
148   vpx_event_arg_16   | 2976 kB
149
150Total Postgres Size:
151	317M	/storage/db/vpostgres/
152	270M	/storage/seat/vpostgres/
153	503M	Interpreted by vPostgres
154
155________________
156   DISK CHECK
157
158[PASS]	DISK CAPACITY
159
160[PASS]	INODE USAGE
161
162RESULT: [PASS]
163Please see KB: https://kb.vmware.com/s/article/1003564
164
165__________________
166   VC NTP CHECK
167
168[PASS] NTP service is running
169
170NTP Server Check
171
172[PASS] pool.ntp.org
173
174NTP Status Check
175
176+-----------------------------------LEGEND-----------------------------------+
177| remote: NTP peer server                                                    |
178| refid: server that this peer gets its time from                            |
179| when: number of seconds passed since last response                         |
180| poll: poll interval in seconds                                             |
181| delay: round-trip delay to the peer in milliseconds                        |
182| offset: time difference between the server and client in milliseconds      |
183+-----------------------------------PREFIX-----------------------------------+
184| * Synchronized to this peer                                                |
185| # Almost synchronized to this peer                                         |
186| + Peer selected for possible synchronization                               |
187| – Peer is a candidate for selection                                        |
188| ~ Peer is statically configured                                            |
189+----------------------------------------------------------------------------+
190     remote           refid      st t when poll reach   delay   offset  jitter
191==============================================================================
192*131.234.220.231 .DCF.            1 u  188 1024  377   17.774   -0.280   0.239
193
194RESULT: [PASS]
195
196________________________
197   vCenter Port Check
198
199Checking ports: 443, 389, 2012, 2020
200For port information, please see KB: https://kb.vmware.com/s/article/52963
201
202	[PASS]	Port check for host vcsa.oz.xmsoft.de
203
204________________________
205   Root Account Check
206
207[PASS]	Root password never expires
208
209_______________________
210   VC SERVICES CHECK
211
212Printing only services that are stopped and should be started.
213KB: https://kb.vmware.com/s/article/2109887
214
215
216RESULT: [PASS]
217
218__________________
219   Syslog Check
220
221Remote Syslog config: @192.168.100.44:514
222
223[PASS]	DNS lookup for 192.168.100.44
224
225	We've detected you have a remote syslog server configured.
226	Please search your remote syslog server for this string to
227	validate syslog is working correctly:
228
229	vdt-2021-12-08-152600
230
231[FAIL]	Local Syslog Functional Check
232
233	The syslog daemon is not writing to the logs it manages:
234	/var/log/vmware/messages, /var/log/vmdird/vmdird-syslog.log, etc.
235	Please see https://kb.vmware.com/s/article/81829
236
237
238
239________________
240   VCHA CHECK
241
242[INFO]	VCHA is not enabled.
243
244Report written to /var/log/vmware/vdt/vdt-report-2021-12-08-152530
245Please send feedback / feature requests to project_vdt@vmware.com
246root@vcsa [ ~/vdt-v1.1.0 ]#