)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"b403fe49822fd2d92dfa7e6903c8d2a35ad8cbe8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Lawrence \u003cjl401j@us.att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-08-05 20:49:50 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The plugin is not working properly and also returning"},{"line_number":8,"context_line":"incorrect match count.  And this fix will address the"},{"line_number":9,"context_line":"issues and also support the retrieval of the matched"},{"line_number":10,"context_line":"result set. So that anyone can understand that why the"},{"line_number":11,"context_line":"alarm was raised and traceability etc."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib8d8a87be4e0526378aa04ccd8ff5631805adfeb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_cb96e9f0","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":38},"updated":"2019-08-05 21:34:24.000000000","message":"Please format this according to the OpenStack standards [0].\n\n[0] https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Lawrence \u003cjl401j@us.att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-08-05 20:49:50 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"The plugin is not working properly and also returning"},{"line_number":8,"context_line":"incorrect match count.  And this fix will address the"},{"line_number":9,"context_line":"issues and also support the retrieval of the matched"},{"line_number":10,"context_line":"result set. So that anyone can understand that why the"},{"line_number":11,"context_line":"alarm was raised and traceability etc."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ib8d8a87be4e0526378aa04ccd8ff5631805adfeb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_166188d3","line":11,"range":{"start_line":7,"start_character":0,"end_line":11,"end_character":38},"in_reply_to":"7faddb67_cb96e9f0","updated":"2019-08-05 21:48:33.000000000","message":"++","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"26a9d702dfb7ce8575f1733d45b61c9d62f7159f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     John Lawrence \u003cjl401j@us.att.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-08-21 20:25:14 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"To enhancing the elasticsearch nagios plugin and fixes"},{"line_number":8,"context_line":"  Data types validation"},{"line_number":9,"context_line":"  Correct the type fields and resultset count"},{"line_number":10,"context_line":"  Adding meaningful details to the critical messages and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7faddb67_d310a203","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":54},"updated":"2019-08-23 19:21:34.000000000","message":"should line break here: see https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"56da56dc46cdb43980b330533b8d810eedaa63fa"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"26a9d702dfb7ce8575f1733d45b61c9d62f7159f","unresolved":false,"context_lines":[{"line_number":7,"context_line":"To enhancing the elasticsearch nagios plugin and fixes"},{"line_number":8,"context_line":"  Data types validation"},{"line_number":9,"context_line":"  Correct the type fields and resultset count"},{"line_number":10,"context_line":"  Adding meaningful details to the critical messages and"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: Ib8d8a87be4e0526378aa04ccd8ff5631805adfeb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7faddb67_336a5681","line":10,"range":{"start_line":10,"start_character":46,"end_line":10,"end_character":56},"updated":"2019-08-23 19:21:34.000000000","message":"is this the end of the commit msg?","commit_id":"56da56dc46cdb43980b330533b8d810eedaa63fa"}],"nagios/plugins/query_elasticsearch.py":[{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"validate range\"\"\""},{"line_number":37,"context_line":"    try:"},{"line_number":38,"context_line":"       minutes \u003d int(value)"},{"line_number":39,"context_line":"    except BaseException:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":41,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"},{"line_number":42,"context_line":"                                         \u0027(1 day) minutes.\u0027 % value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8b11d15f","line":39,"range":{"start_line":39,"start_character":11,"end_line":39,"end_character":24},"updated":"2019-08-05 21:48:33.000000000","message":"can we catch a more specific exception?","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"9b097ffc1b7661cdd74747efd8ae1c99c5210b2e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    \"\"\"validate range\"\"\""},{"line_number":37,"context_line":"    try:"},{"line_number":38,"context_line":"       minutes \u003d int(value)"},{"line_number":39,"context_line":"    except BaseException:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":41,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"},{"line_number":42,"context_line":"                                         \u0027(1 day) minutes.\u0027 % value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_97bc81bb","line":39,"range":{"start_line":39,"start_character":11,"end_line":39,"end_character":24},"in_reply_to":"7faddb67_8b11d15f","updated":"2019-08-06 19:34:45.000000000","message":"yes, Done","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"b403fe49822fd2d92dfa7e6903c8d2a35ad8cbe8","unresolved":false,"context_lines":[{"line_number":38,"context_line":"       minutes \u003d int(value)"},{"line_number":39,"context_line":"    except BaseException:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":41,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"},{"line_number":42,"context_line":"                                         \u0027(1 day) minutes.\u0027 % value)"},{"line_number":43,"context_line":"    if minutes \u003c 1 or minutes \u003e 1440:"},{"line_number":44,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_ebc2c5e8","line":41,"range":{"start_line":41,"start_character":43,"end_line":41,"end_character":79},"updated":"2019-08-05 21:34:24.000000000","message":"This doesn\u0027t actually validate that the value is between 1-1440. You\u0027ll need an additional check for that.","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"9b097ffc1b7661cdd74747efd8ae1c99c5210b2e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"       minutes \u003d int(value)"},{"line_number":39,"context_line":"    except BaseException:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":41,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"},{"line_number":42,"context_line":"                                         \u0027(1 day) minutes.\u0027 % value)"},{"line_number":43,"context_line":"    if minutes \u003c 1 or minutes \u003e 1440:"},{"line_number":44,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_17c89152","line":41,"range":{"start_line":41,"start_character":43,"end_line":41,"end_character":79},"in_reply_to":"7faddb67_ebc2c5e8","updated":"2019-08-06 19:34:45.000000000","message":"Thanks, Done","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    except BaseException:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":41,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"},{"line_number":42,"context_line":"                                         \u0027(1 day) minutes.\u0027 % value)"},{"line_number":43,"context_line":"    if minutes \u003c 1 or minutes \u003e 1440:"},{"line_number":44,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid search time range.\u0027"},{"line_number":45,"context_line":"                                         \u0027 Valid values are between 1 and 1440\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_566b80b5","line":42,"range":{"start_line":42,"start_character":42,"end_line":42,"end_character":45},"updated":"2019-08-05 21:48:33.000000000","message":"there is a missing space ehre","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    \"\"\"validate threshold\"\"\""},{"line_number":52,"context_line":"    try:"},{"line_number":53,"context_line":"        threshold \u003d int(value)"},{"line_number":54,"context_line":"    except BaseException:"},{"line_number":55,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid threshold\u0027"},{"line_number":56,"context_line":"                                         \u0027 Valid threshold is \u003e 0\u0027 % value)"},{"line_number":57,"context_line":"    if threshold \u003c 1:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_b6575401","line":54,"range":{"start_line":54,"start_character":11,"end_line":54,"end_character":24},"updated":"2019-08-05 21:48:33.000000000","message":"can we catch a more specific exception","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"b403fe49822fd2d92dfa7e6903c8d2a35ad8cbe8","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        threshold \u003d int(value)"},{"line_number":54,"context_line":"    except BaseException:"},{"line_number":55,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid threshold\u0027"},{"line_number":56,"context_line":"                                         \u0027 Valid threshold is \u003e 0\u0027 % value)"},{"line_number":57,"context_line":"    if threshold \u003c 1:"},{"line_number":58,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid threshold\u0027"},{"line_number":59,"context_line":"                                         \u0027 Valid threshold is \u003e 0\u0027 % value)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_8bb55180","line":56,"range":{"start_line":56,"start_character":43,"end_line":56,"end_character":73},"updated":"2019-08-05 21:34:24.000000000","message":"Integers can be negative, so this isn\u0027t validating that the value is greater than 0. You\u0027ll need an additional check here as well.","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"b403fe49822fd2d92dfa7e6903c8d2a35ad8cbe8","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    results \u003d response.json()"},{"line_number":136,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":137,"context_line":"    allmsgs\u003d\u0027\u0027"},{"line_number":138,"context_line":"    for msgdata in results[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":139,"context_line":"       if allmsgs:"},{"line_number":140,"context_line":"          allmsgs +\u003d\u0027, \u0027"},{"line_number":141,"context_line":"       allmsgs +\u003d msgdata[\"_source\"][args.simple_query_fields]"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":144,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_4b78b9c2","line":141,"range":{"start_line":137,"start_character":4,"end_line":141,"end_character":62},"updated":"2019-08-05 21:34:24.000000000","message":"Can we replace this logic with a data structure? Concatenating a string of messages is not a safe way to store data.\n\nfor example:\n  messages \u003d [m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]]\n\nAlso, should there be error checking for args.simple_query_fields?","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    results \u003d response.json()"},{"line_number":136,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":137,"context_line":"    allmsgs\u003d\u0027\u0027"},{"line_number":138,"context_line":"    for msgdata in results[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":139,"context_line":"       if allmsgs:"},{"line_number":140,"context_line":"          allmsgs +\u003d\u0027, \u0027"},{"line_number":141,"context_line":"       allmsgs +\u003d msgdata[\"_source\"][args.simple_query_fields]"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":144,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_7638fcd1","line":141,"range":{"start_line":137,"start_character":4,"end_line":141,"end_character":62},"in_reply_to":"7faddb67_4b78b9c2","updated":"2019-08-05 21:48:33.000000000","message":"Should use join()","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"9b097ffc1b7661cdd74747efd8ae1c99c5210b2e","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    results \u003d response.json()"},{"line_number":136,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":137,"context_line":"    allmsgs\u003d\u0027\u0027"},{"line_number":138,"context_line":"    for msgdata in results[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":139,"context_line":"       if allmsgs:"},{"line_number":140,"context_line":"          allmsgs +\u003d\u0027, \u0027"},{"line_number":141,"context_line":"       allmsgs +\u003d msgdata[\"_source\"][args.simple_query_fields]"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":144,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_37e4addf","line":141,"range":{"start_line":137,"start_character":4,"end_line":141,"end_character":62},"in_reply_to":"7faddb67_4b78b9c2","updated":"2019-08-06 19:34:45.000000000","message":"yes, I missed it. Thanks. Done","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":146,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":149,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":150,"context_line":"    else:"},{"line_number":151,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_36436441","line":149,"range":{"start_line":149,"start_character":47,"end_line":149,"end_character":56},"updated":"2019-08-05 21:48:33.000000000","message":"hits is an integer, why not just do %d, so you don\u0027t need to str() the integer.","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"9b097ffc1b7661cdd74747efd8ae1c99c5210b2e","unresolved":false,"context_lines":[{"line_number":146,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":149,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":150,"context_line":"    else:"},{"line_number":151,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_77078583","line":149,"range":{"start_line":149,"start_character":47,"end_line":149,"end_character":56},"in_reply_to":"7faddb67_36436441","updated":"2019-08-06 19:34:45.000000000","message":"These utility functions accepts string only.","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"17611f634fb8e8204e192d9cacfd20e93e82dbc8","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":149,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":150,"context_line":"    else:"},{"line_number":151,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d677709f","line":151,"range":{"start_line":151,"start_character":43,"end_line":151,"end_character":54},"updated":"2019-08-05 21:48:33.000000000","message":"ditto","commit_id":"046581cb69634a857a7b19c428beb9484e8d53fd"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"4d15099216536d21d2ef54e4d8c4ceec0f358bc0","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_c64237ac","line":134,"range":{"start_line":134,"start_character":73,"end_line":134,"end_character":96},"updated":"2019-08-07 16:08:23.000000000","message":"Does this always exist? Or can it be None or cause a KeyError?","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"b35239b94d4ddd634038b17bd435d4ba45b79ad6","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_86be7fd2","line":134,"range":{"start_line":134,"start_character":4,"end_line":134,"end_character":98},"updated":"2019-08-07 15:56:43.000000000","message":"Is this valid? This will produce a query string with a comma at the beginning and an array appended i.e.\n\n  \", [\"list\", \"of\", \"results\"]\"","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"4d15099216536d21d2ef54e4d8c4ceec0f358bc0","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_a6f05b93","line":134,"range":{"start_line":134,"start_character":38,"end_line":134,"end_character":62},"updated":"2019-08-07 16:08:23.000000000","message":"Please check this for exceptions, as this could cause a KeyError.\n\nIt would actually preferable to use the .get() method for arrays [0].\n\n[0] https://docs.python.org/3/library/stdtypes.html?highlight\u003dget#dict.get","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"c9c4c20553b3db7e456ee9537fbd3f2b717c8d46","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_e45e3275","line":134,"range":{"start_line":134,"start_character":73,"end_line":134,"end_character":96},"in_reply_to":"7faddb67_103ab097","updated":"2019-08-09 21:37:12.000000000","message":"I tested with the empty dict and looks okay. But added another \"if\" wrapper also.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"14467230f1b28ab089f377606ad1ffd22f112b1b","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_06c60f4b","line":134,"range":{"start_line":134,"start_character":4,"end_line":134,"end_character":98},"in_reply_to":"7faddb67_86be7fd2","updated":"2019-08-07 16:02:12.000000000","message":"Sorry, I was looking at the wrong join implementation. This is fine as long as the list comprehension statement works.\n\nI will re-review.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"5adb6d200de1a817899f152b8cbe2145df78f318","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027"},{"line_number":137,"context_line":"               \u0027 within the last %s minute(s). %s\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_103ab097","line":134,"range":{"start_line":134,"start_character":73,"end_line":134,"end_character":96},"in_reply_to":"7faddb67_c64237ac","updated":"2019-08-08 15:54:36.000000000","message":"Drew, I tested it with empty sets and didn\u0027t get any exceptions. But I\u0027ll add the conditional check for this.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"84f06808934ac0857f16e86caa589fe9ff135e09","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_10d737c1","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"updated":"2019-08-06 22:46:45.000000000","message":"Are these messages useful if the service/component is OK? Could it be too much clutter for the Nagios status panel?","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":28618,"name":"Drew Walters","email":"drewwalters@microsoft.com","username":"drewwalters96"},"change_message_id":"4d15099216536d21d2ef54e4d8c4ceec0f358bc0","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_86167fa7","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"in_reply_to":"7faddb67_10d737c1","updated":"2019-08-07 16:08:23.000000000","message":"\u003e Are these messages useful if the service/component is OK? Could it\n \u003e be too much clutter for the Nagios status panel?\n\nAgreed.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"5adb6d200de1a817899f152b8cbe2145df78f318","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4d166a58","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"in_reply_to":"7faddb67_10d737c1","updated":"2019-08-08 15:54:36.000000000","message":"yes, this is very useful, Operations normally view the dashboard. Right now they have the capability to see the actual personal attempted to login even below the threshold. And this will be a useful for the operations team,","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"5adb6d200de1a817899f152b8cbe2145df78f318","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_f05d94ec","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"in_reply_to":"7faddb67_86167fa7","updated":"2019-08-08 15:54:36.000000000","message":"Cliff \u0026 Drew, I\u0027m checking with Ops team on this.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"c9c4c20553b3db7e456ee9537fbd3f2b717c8d46","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_84d89ef0","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"in_reply_to":"7faddb67_86167fa7","updated":"2019-08-09 21:37:12.000000000","message":"Discussed with ops team and they want all the messages even if it is OK status","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"a25ac92277972d0dfb7f1f062765267178626f52","unresolved":false,"context_lines":[{"line_number":141,"context_line":"    if hits \u003e\u003d args.critical_threshold:"},{"line_number":142,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"        NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_dfb8a3e6","line":144,"range":{"start_line":144,"start_character":90,"end_line":144,"end_character":99},"in_reply_to":"7faddb67_f05d94ec","updated":"2019-08-08 20:01:04.000000000","message":"This is a nonstarter. Nagios stores information like this in the configured log file (which as it stands now, is mounted on /var/lib/kubelet).  You’re essentially barfing out a large volume of Information that adds no real value and that risks making the underlying host unstable.  This information is just adding a lot of noise, and I’m worried about the path forward here.","commit_id":"c9b0eced25889aeb5a959c1767f21758d62c3e8d"},{"author":{"_account_id":17591,"name":"Steve Wilkerson","email":"wilkers.steve@gmail.com","username":"srwilkers"},"change_message_id":"b9d8b82f5645dd1d73b2c74cbfe75a7b68564e1e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    parser.add_argument(\u0027--query_file\u0027, help\u003d\u0027elasticsearch query file name\u0027)"},{"line_number":96,"context_line":"    parser.add_argument(\u0027--query_clause\u0027, help\u003d\u0027elasticsearch query clause name\u0027)"},{"line_number":97,"context_line":"    parser.add_argument(\u0027--simple_query\u0027, help\u003d\u0027elasticsearch simple query str\u0027)"},{"line_number":98,"context_line":"    parser.add_argument(\u0027--simple_query_fields\u0027, type\u003dstr, required\u003dTrue, help\u003dsimple_query_fields_help)"},{"line_number":99,"context_line":"    parser.add_argument(\u0027--match\u0027, type\u003dcheck_match, help\u003dmatch_help)"},{"line_number":100,"context_line":"    parser.add_argument(\u0027--range\u0027, type\u003dcheck_range, default\u003d5,"},{"line_number":101,"context_line":"                        help\u003drange_help)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_12dd3440","line":98,"range":{"start_line":98,"start_character":59,"end_line":98,"end_character":72},"updated":"2019-08-19 18:46:36.000000000","message":"Why is this a required arg now?","commit_id":"ef4993063958dc41f69a268b90a42e90f0881fb3"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"2ed8a062255e1565eb278841277f185edb9c1731","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    parser.add_argument(\u0027--query_file\u0027, help\u003d\u0027elasticsearch query file name\u0027)"},{"line_number":96,"context_line":"    parser.add_argument(\u0027--query_clause\u0027, help\u003d\u0027elasticsearch query clause name\u0027)"},{"line_number":97,"context_line":"    parser.add_argument(\u0027--simple_query\u0027, help\u003d\u0027elasticsearch simple query str\u0027)"},{"line_number":98,"context_line":"    parser.add_argument(\u0027--simple_query_fields\u0027, type\u003dstr, required\u003dTrue, help\u003dsimple_query_fields_help)"},{"line_number":99,"context_line":"    parser.add_argument(\u0027--match\u0027, type\u003dcheck_match, help\u003dmatch_help)"},{"line_number":100,"context_line":"    parser.add_argument(\u0027--range\u0027, type\u003dcheck_range, default\u003d5,"},{"line_number":101,"context_line":"                        help\u003drange_help)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_72f02892","line":98,"range":{"start_line":98,"start_character":59,"end_line":98,"end_character":72},"in_reply_to":"7faddb67_12dd3440","updated":"2019-08-21 14:51:15.000000000","message":"Stevem this was one of the enhancement Drew asked.","commit_id":"ef4993063958dc41f69a268b90a42e90f0881fb3"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"1b19dc4c0e8ba4d682713df4c42caf1e58ca54d6","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":135,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences\u0027 \u0027 within the last %s minute(s).\u0027)"},{"line_number":136,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":137,"context_line":"        allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":138,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_d27cd573","line":135,"range":{"start_line":134,"start_character":0,"end_line":135,"end_character":90},"updated":"2019-08-13 16:05:05.000000000","message":"The args.critical_msg and args.ok_msg variables, which come from the API arguments, aren\u0027t even used here. Shouldn\u0027t that be part of the message and ok_message, respectively?","commit_id":"ef4993063958dc41f69a268b90a42e90f0881fb3"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"97b3a2b130c8c2969b5bf4bec732a7a9cee47861","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":135,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences\u0027 \u0027 within the last %s minute(s).\u0027)"},{"line_number":136,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":137,"context_line":"        allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":138,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_9fc72f99","line":135,"range":{"start_line":134,"start_character":0,"end_line":135,"end_character":90},"in_reply_to":"7faddb67_207b8cf4","updated":"2019-08-14 18:47:27.000000000","message":"Done","commit_id":"ef4993063958dc41f69a268b90a42e90f0881fb3"},{"author":{"_account_id":18295,"name":"John Lawrence","email":"jl401j@us.att.com","username":"jl401j"},"change_message_id":"345954d9d620d83ab5b1a72fdc07c845d7be73db","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":135,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences\u0027 \u0027 within the last %s minute(s).\u0027)"},{"line_number":136,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":137,"context_line":"        allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":138,"context_line":"        NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range, allmsgs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"7faddb67_207b8cf4","line":135,"range":{"start_line":134,"start_character":0,"end_line":135,"end_character":90},"in_reply_to":"7faddb67_d27cd573","updated":"2019-08-14 16:04:06.000000000","message":"This is a feedback we got and derived this change.  Because input messages are static message and not reflecting the accurate actual result.","commit_id":"ef4993063958dc41f69a268b90a42e90f0881fb3"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"26a9d702dfb7ce8575f1733d45b61c9d62f7159f","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    results \u003d response.json()"},{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    crit_message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":135,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). \u0027)"},{"line_number":136,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences\u0027 \u0027 within the last %s minute(s).\u0027)"},{"line_number":137,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":138,"context_line":"        if args.simple_query_fields:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_93446a1b","line":135,"range":{"start_line":135,"start_character":53,"end_line":135,"end_character":56},"updated":"2019-08-23 19:21:34.000000000","message":"if this is just on a single line do we need these () and a break like this here?","commit_id":"56da56dc46cdb43980b330533b8d810eedaa63fa"},{"author":{"_account_id":20466,"name":"Tin Lam","email":"tin@lam.wtf","username":"tinlam"},"change_message_id":"26a9d702dfb7ce8575f1733d45b61c9d62f7159f","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    hits \u003d len(results[\u0027hits\u0027][\u0027hits\u0027])"},{"line_number":134,"context_line":"    crit_message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). %s\u0027)"},{"line_number":135,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences\u0027 \u0027 within the last %s minute(s). \u0027)"},{"line_number":136,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences\u0027 \u0027 within the last %s minute(s).\u0027)"},{"line_number":137,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":138,"context_line":"        if args.simple_query_fields:"},{"line_number":139,"context_line":"           allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"7faddb67_3351f6da","line":136,"range":{"start_line":136,"start_character":55,"end_line":136,"end_character":58},"updated":"2019-08-23 19:21:34.000000000","message":"ditto","commit_id":"56da56dc46cdb43980b330533b8d810eedaa63fa"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"2d24e70b46da3aff5cdbebd8bd6b978815488dac","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    message \u003d (\u0027Found %s \u003e\u003d %s(threshold) occurrences within the last %s minute(s).\u0027)"},{"line_number":136,"context_line":"    ok_message \u003d (\u0027Found %s [threshold: %s] occurrences within the last %s minute(s).\u0027)"},{"line_number":137,"context_line":"    if hits \u003e args.critical_threshold:"},{"line_number":138,"context_line":"       if args.simple_query_fields:"},{"line_number":139,"context_line":"          allmsgs \u003d \u0027, \u0027.join([m[\"_source\"][args.simple_query_fields] for m in results[\u0027hits\u0027][\u0027hits\u0027]])"},{"line_number":140,"context_line":"          NagiosUtil.service_critical(crit_message % (str(hits), args.critical_threshold, args.range, allmsgs))"},{"line_number":141,"context_line":"       else:"},{"line_number":142,"context_line":"          NagiosUtil.service_critical(message % (str(hits), args.critical_threshold, args.range))"},{"line_number":143,"context_line":"    else:"},{"line_number":144,"context_line":"       NagiosUtil.service_ok(ok_message % (str(hits), args.critical_threshold, args.range))"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"def main():"}],"source_content_type":"text/x-python","patch_set":13,"id":"7faddb67_38d53c1c","line":144,"range":{"start_line":138,"start_character":0,"end_line":144,"end_character":91},"updated":"2019-08-26 16:09:07.000000000","message":"Standard python indention is 4 spaces. Somehow these lines had one of those spaces removed (except for line 143).  https://www.python.org/dev/peps/pep-0008/#indentation","commit_id":"1d7dd3e9c843dd66bda658fe868f29c72c25854d"},{"author":{"_account_id":22636,"name":"Cliff Parsons","email":"cliffhparsons@aol.com","username":"cliffparsons"},"change_message_id":"254cf6316281ca3dc0802ffbec72ae68b4d81eac","unresolved":false,"context_lines":[{"line_number":35,"context_line":"def check_range(value):"},{"line_number":36,"context_line":"    \"\"\"validate range\"\"\""},{"line_number":37,"context_line":"    try:"},{"line_number":38,"context_line":"       minutes \u003d int(value)"},{"line_number":39,"context_line":"    except ValueError:"},{"line_number":40,"context_line":"        raise argparse.ArgumentTypeError(\u0027%s is an invalid data type, Integer value expected.\u0027 % value)"},{"line_number":41,"context_line":"    if minutes \u003c 1 or minutes \u003e 1440:"}],"source_content_type":"text/x-python","patch_set":14,"id":"7faddb67_49c6286b","line":38,"range":{"start_line":38,"start_character":4,"end_line":38,"end_character":7},"updated":"2019-08-26 19:03:01.000000000","message":"Please fix this indention to be 4 spaces as well.","commit_id":"c72251d340c87a5699def8ded1dd0146b253b3e2"}]}
