背景
使用嵌入式VMware Postgres数据库安装或升级到vCenter Server Appliance 6.0之后:
1)在“ vCenter Server警报”下,您会收到以下警告消息之一:
VMware vFabric Postgres(vCenter_Server_Hostname)vmware-vpostgres状态从绿色变为黄色
2)Administration > System Configuration > Services,在VMware Postgres服务的运行状况消息下,可看到:
VMware Postgres memory usage has exceeded allocated quota. Used: xxxxx MB. Quota: xxx MB
3)在/etc/vmware-sca/health/vmware-postgres-health-status.xm可看到:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<healthStatus schemaVersion="1.0" xmlns="http://www.vmware.com/cis/cm/common/jaxb/healthstatus">
<status>YELLOW</status>
<message messageKey="cis.vpg.health.mem_quota_exceeded" defaultMessage="VMware Postgres service memory usage has exceeded allocated quota.">
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">1929
<param xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">512
</message>
<expiration>2015-03-19T06:02:10.000Z</expiration>
</healthStatus>
原因
这是一个影响vCenter Server Appliance 6.0的已知问题。vCenter Server Appliance 6.0 Update 1中已解决此问题。
临时处理
执行这些操作将禁用VMware Postgres Monitoring代理。当您单击此按钮时,它显示状态:
Failed to request health status from URI /etc/vmware-sca/health/vmware-postgres-health-status.xml
1)ssh登录到VCSA
2)shell.set --enabled true //激活shell
3)输入shell //进入shell环境
4)禁用定期健康检查:
sed -ie ‘s/health_status_worker.naptime.*/health_status_worker.naptime = 2147483647/’ /storage/db/vpostgres/health_status_worker.conf
5)重新加载postgresql配置:
service vmware-vpostgres reload
6)重新启动health status worker进程:
pkill -f “postgres: bgworker: health_status_worker”
7)将警报从未知重置为绿色:
sed -i -e 's#<status>.*</status>#<status>GREEN</status> #g' -e 's#<message.*message>#<message messageKey="cis.vpg.health.healthy" defaultMessage="VMware Postgres service is healthy."></message>#' -e "s#<expiration.*expiration>#<expiration>$(date +'%FT%T.000Z' -d '+2147483647 seconds')</expiration>#" /etc/vmware-sca/health/vmware-postgres-health-status.xml
对于windows安装的vc
1)进入vc的windows虚拟主机,打开 C:\ProgramData\VMware\vCenterServer\data\vpostgres\health_status_worker.conf
2)找到ealth_status_worker.naptime = 60这一行
将值更改为2147483647,如下所示:
health_status_worker.naptime = 2147483647
3)重新启动vCenter Server和vPostgres服务
C:\Program Files\VMware\vCenter Server\bin> service-control --stop --all
C:\Program Files\VMware\vCenter Server\bin> service-control --start --all