-def _is_kafka_ok():
- try:
- common_consumer = Consumer("mon-healthcheck-" + str(uuid.uuid4()))
- topics = ['alarm_request', 'vim_account']
- common_consumer.subscribe(topics)
- common_consumer.poll()
- common_consumer.close(autocommit=False)
- return True
- except Exception:
- log.exception("MON can not connect to Kafka")
- return False
-
-
-if __name__ == '__main__':