)]}'
{"monagent/collector/checks_d/kafka_consumer.py":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        # Connect to Kafka"},{"line_number":68,"context_line":"        kafka_host, kafka_port \u003d random.choice(kafka_host_ports)"},{"line_number":69,"context_line":"        kafka_conn \u003d KafkaClient(kafka_host + \":\" + str(kafka_port))"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            # Query Kafka for the broker offsets"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_792b91ea","line":69,"updated":"2014-08-05 18:37:27.000000000","message":"I would prefer to use format strings here.","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"}],"monsetup/detection/plugins/kafka.py":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":39,"context_line":"            logging.getLogger(\u0027kazoo\u0027).setLevel(logging.WARN)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"            # Give zookeeper a moment to come online in case it has just started"},{"line_number":42,"context_line":"            time.sleep(5)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"            zk \u003d KazooClient(hosts\u003d\u0027127.0.0.1:2181\u0027, read_only\u003dTrue)"},{"line_number":45,"context_line":"            zk.start()"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_99078570","line":42,"updated":"2014-08-05 18:37:27.000000000","message":"I do not think that hardcoded sleeps are a good solution. Is it not possible to check if Zookeeper is ready?","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":60,"context_line":"            log.info(\"\\tInstalling kafka_consumer plugin.\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"            # Find the IP where kafka is listening"},{"line_number":63,"context_line":"            listen_ip \u003d find_addr_listening_on_port(9092)"},{"line_number":64,"context_line":"            if listen_ip is None:"},{"line_number":65,"context_line":"                log.error(\"\\tKafka not found on port 9092, using \u0027localhost\u0027\")"},{"line_number":66,"context_line":"                listen_ip \u003d \u0027localhost\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_f91de1c0","line":63,"updated":"2014-08-05 18:37:27.000000000","message":"I think the port should be configurable.","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"},{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                log.error(\"\\tKafka not found on port 9092, using \u0027localhost\u0027\")"},{"line_number":66,"context_line":"                listen_ip \u003d \u0027localhost\u0027"},{"line_number":67,"context_line":"            else:"},{"line_number":68,"context_line":"                log.info(\"\\tKafka found listening on \" + listen_ip)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"            config[\u0027kafka_consumer\u0027] \u003d {\u0027init_config\u0027: None,"},{"line_number":71,"context_line":"                                        \u0027instances\u0027: [{\u0027kafka_connect_str\u0027: listen_ip + \u0027:9092\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_d9201dfc","line":68,"updated":"2014-08-05 18:37:27.000000000","message":"I would prefer to use format strings here.","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"}],"monsetup/detection/utils.py":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    for conn in psutil.net_connections(kind\u003d\u0027tcp\u0027):"},{"line_number":32,"context_line":"        if conn.laddr[1] \u003d\u003d port and conn.status \u003d\u003d psutil.CONN_LISTEN:"},{"line_number":33,"context_line":"            return conn.laddr[0].lstrip(\"::ffff:\")"},{"line_number":34,"context_line":"    return None"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"def watch_process(search_strings, service\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_649688a2","line":34,"updated":"2014-08-05 18:37:27.000000000","message":"\"return None\" is not necessary and should be removed.","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"}],"monsetup/main.py":[{"author":{"_account_id":167,"name":"Christian Berendt","email":"berendt@osism.tech","username":"berendt"},"change_message_id":"c491e4a046f01cfcb4db57cadbdafe2e916d6385","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        with open(config_path, \u0027w\u0027) as config_file:"},{"line_number":113,"context_line":"            os.chmod(config_path, 0o640)"},{"line_number":114,"context_line":"            os.chown(config_path, 0, gid)"},{"line_number":115,"context_line":"            config_file.write(yaml.safe_dump(value, encoding\u003d\u0027utf-8\u0027, allow_unicode\u003dTrue))"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    # Now that the config is build start the service"},{"line_number":118,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_1953753b","line":115,"updated":"2014-08-05 18:37:27.000000000","message":"Why is this change necessary? It\u0027s not mentioned in the commit message.","commit_id":"05736ce78556e73d3a5f681b8a2db43c2679bdbc"}]}
