Troubleshooting vmktree 0.3.x

Q: What is required to install vmktree? Does it have to run as a VM on ESX?

A: vmktree does not have to run as a VM, and it doesn’t even require an ESX host in your environment if you only want to monitor devices that currently exist as plugins. Even in an ESX environment you don’t need to run vmktree as a VM.

Requirements:

  • Linux or similar. Redhat or debian based distros are recommended (including for example ubuntu or centos)
  • Apache2
  • rrdtool
  • libexpect-perl / perl-Expect

Q: How do I delete an ESX host from collection?

A: Currently, removing ESX servers is a manual task:
a) remove entry from /etc/cron.d/vmktree
b) remove directory /var/www/vmktree-data/sys/<esxname>
c) remove file /var/www/vmktree-data/vm-list.<esxname>
This task will be automated in a future version.

Q: Why not collect data directly from Virtual Center?

A: Collecting data about the ESX hosts and VMs is surely possible by querying Virtual Center, but once the number of ESX hosts surpasses more than a handful, you will typically have problems getting all that data down in a timely fashion, and that’s one of the reasons vmktree currently queries each ESX host individually.

Q: How is the data collection done?

A:

  • Data collection is done from /etc/cron.d/vmktree
  • vmktree uses public key authentication to get the data from the esx hosts by executing the commands esxcfg-info and esxtop and analyzing their output
  • The config file /etc/vmktree.conf will tell you where your data dir  is; should normally be in /var/lib/vmktree or /var/www/vmktree-data.
  • In the data dir hierarchy, all the .rrd files and state.txt files are  updated every minute. In the sys directory there might be a file  called <youresxhostname>.txt if there are problems with the initial setup of an esx host. This file will then have an error message indicating why there is a problem.
  • It should only take a few minutes from things are starting to get  collected until you can start using the web ui.

Q: What steps can be done to troubleshoot things if data collection is not working?

A: Check the output of the following commands (you shuold not get asked for passwords):
# cat /etc/cron.d/vmktree          <-Use same credentials in the commands below as found here
# ssh <user>@<esxhost> id
# ssh <user>@<esxhost> sudo /usr/sbin/esxcfg-info|more <- skip the sudo command if user is root
..and the content of the file /etc/sudoers from the esx host. <-..if user is not root

Q: The clock inside the vmktree VM is wrong. How can I fix this?

A: See here http://kb.vmware.com/kb/1006427

Q: I have rebooted my ESXi server and I get no more graphs..

A: ESXi doesn’t store the public authentication keys permanently in the file system so the settings are lost if you reboot your ESXi server. This can be resolved by running vmktree-addesx again.

Leave a Reply