Monitor vCenter Server Appliance database disk usage
search cancel

Monitor vCenter Server Appliance database disk usage

book

Article ID: 343982

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

vCenter Server Appliance with the vPostgres embedded database might run out of disk space for the disk partition. This might be caused by large or dynamic inventory retention settings. In most situations, vPostgres disk space is filled by historical data kept for statistics, events, and tasks collected by vCenter Server.

Environment

VMware vSphere ESXi 6.0
VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5
VMware vCenter Server 6.0.x
VMware vCenter Server 5.1.x
VMware vCenter Server 5.5.x

Resolution

Change the vCenter Server data retention settings. The following instructions can be found in the vSphere documentation:

  • For statistics, see "Configuring Statistics Settings in the vSphere Web Client" in the vCenter Server and Host Management publication.
  • For events and tasks, see "Configuring vCenter Server in the vSphere Web Client" in the vCenter Server and Host Management publication.

You can also monitor the disk usage of the vPostgres disk using the following instructions.
  1. Download the attached mon_disk_space.zip file.
  2. Preconfigure the bash script (mon_disk_space) in this archive before using the script.

    By default the script sends an email message to the email specified for password expiration warning. This address is located on the admin page of the vCenter Server Appliance under expiration warning. To override this, provide an email address in mon_disk_space for alert messages:

    # Please provide email for alert messages email=''

    By default, the script sends an email message when 80 percent of the vPostgres disk is filled. To change this setting, edit the following line the bash script to change the threshold setting:

    # Please provide percentage threshold for PostgreSQL used disk space thresh=80

  3. To deploy the script in the vCenter Server Appliance, run the script as a cron scheduled job within the following folders:

    /etc/cron.hourly/
    for hourly jobs
    /etc/cron.daily/
    for daily jobs
    /etc/cron.weekly/
    for weekly jobs
    /etc/cron.monthly
    / for monthly jobs

  4. Change the file settings so that it is executable by cron by running the following command:

    chmod 700 /etc/cron.hourly/mon_disk_space
For more information, see the Knowledge Base article "Increase the disk space in vCenter Server Appliance."

In vSphere 6.0 and later, vCenter Server Appliance provides an SNMP agent with RFC 2790 support. HOST-RESOURCES-MIB provides real time monitoring of filesystems for both local and remote types, capacity, size, used, and blocksize. For more information on how to enable the agent, see "Configuring SNMP for the vCenter Server Appliance."

Additional Information

For translated versions of this article, see:

Attachments

mon_disk_space.zip get_app