简体   繁体   English

以编程方式检查 redshift 集群状态

[英]Check redshift cluster status programmatically

Is there any way to ping redshift cluster and get its status.有什么方法可以ping redshift集群并获取其状态。 in JAVA, if it is "available" or not.在 JAVA 中,是否“可用”。 I have to ping a cluster during downtime and check if it is available or not.我必须在停机期间 ping 一个集群并检查它是否可用。

This depends on how you define "available".这取决于您如何定义“可用”。

The DescribeClusters() API call returns a ClusterStatus that provides the cluster status from the AWS viewpoint. DescribeClusters() API 调用返回一个ClusterStatus ,从 AWS 的角度提供集群状态。

Or, you could connect to the Redshift cluster with an SQL client and see whether it accepts the connection.或者,您可以使用 SQL 客户端连接到 Redshift 集群并查看它是否接受连接。 That would be checking the status from whether Redshift itself is responsive.这将检查 Redshift 本身是否有响应的状态。

If the 'downtime' you report also affects the ClusterStatus, then the API call would be the easier method.如果您报告的“停机时间”也影响 ClusterStatus,那么 API 调用将是更简单的方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM