简体   繁体   English

当实例在GCE中不活动时获得警报

[英]get alert when instance is not active in GCE

For Compute Engine of GCE, I use stackdriver monitoring for monitoring and alert. 对于GCE的Compute Engine,我使用堆栈驱动程序监视进行监视和警报。 For most of the general metrics like CPU, disk IO, memory ... etc is available and can set alert for those metrics based or dead-or-alive by process name. 对于大多数常规指标,例如CPU,磁盘IO,内存等,都可以使用,它们可以通过进程名称为这些指标设置警报或死活。

However I cannot find any metrics related to status of GCE instance itself. 但是,我找不到任何与GCE实例本身状态有关的指标。

My use-case is so simply. 我的用例非常简单。 I'd like to know if the instance id down or not. 我想知道实例ID是否关闭。 Any suggestion appreciated. 任何建议表示赞赏。 thanks. 谢谢。

think the instance status not a monitoring metric ; 认为实例状态不是监控指标 ; there's just instance/uptime available. 只有instance/uptime可用。

(and I have no clue what it would return when it is terminated , possibly worth a try). (而且我不知道terminated时它将返回什么,可能值得一试)。

but one can check for servers with Uptime Checks and then report the Incident . 但是可以使用“ 正常运行时间检查”来检查服务器,然后报告事件

and one can get the instance status with gcloud compute instances describe instance01 . 使用gcloud compute instances describe instance01可以获得实例状态

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

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