handle_process.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:masakari-monitors 作者: openstack 项目源码 文件源码
def _make_event(self, process_name):

        hostname = socket.gethostname()
        current_time = timeutils.utcnow()
        event = {
            'notification': {
                'type': ec.EventConstants.TYPE_PROCESS,
                'hostname': hostname,
                'generated_time': current_time,
                'payload': {
                    'event': ec.EventConstants.EVENT_STOPPED,
                    'process_name': process_name
                }
            }
        }

        return event
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号