)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Nikos Mimigiannis \u003cnmimi@intracom-telecom.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-13 04:02:28 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_ea3f70b1","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":4},"updated":"2019-03-13 08:29:10.000000000","message":"remove these extra spaces","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Nikos Mimigiannis \u003cnmimi@intracom-telecom.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-03-13 04:02:28 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_e15d5215","line":7,"range":{"start_line":7,"start_character":0,"end_line":7,"end_character":4},"in_reply_to":"5fc1f717_ea3f70b1","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2019-03-13 04:02:28 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0e3f1ae776ef76c039ec99da0b666c0c1e498566"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_4a78048f","line":8,"updated":"2019-03-13 08:29:10.000000000","message":"add story and task:\nTask: xxxxx\nStory: xxxxx","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":5,"context_line":"CommitDate: 2019-03-13 04:02:28 -0400"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0e3f1ae776ef76c039ec99da0b666c0c1e498566"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_819c8ec0","line":8,"in_reply_to":"5fc1f717_4a78048f","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0e3f1ae776ef76c039ec99da0b666c0c1e498566"},{"line_number":12,"context_line":"Signed-off-by: Nikos Mimigiannis \u003cnmimi@intracom-telecom.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_8a482c5c","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":4},"updated":"2019-03-13 08:29:10.000000000","message":"same thing here","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"    Create Helm test for nagios chart"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    This introduces a new test pod for testing nagios helm chart"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I0e3f1ae776ef76c039ec99da0b666c0c1e498566"},{"line_number":12,"context_line":"Signed-off-by: Nikos Mimigiannis \u003cnmimi@intracom-telecom.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fc1f717_a1a18afa","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":4},"in_reply_to":"5fc1f717_8a482c5c","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"}],"nagios/templates/pod_test_nagios.yaml":[{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":44,"context_line":"      env:"},{"line_number":45,"context_line":"        - name: NAGIOS_QUERY"},{"line_number":46,"context_line":"          value: \"http://nagios-metrics:80/nagios/cgi-bin/\""},{"line_number":47,"context_line":"        - name: service_arg"},{"line_number":48,"context_line":"          value: \"service_check\""},{"line_number":49,"context_line":"        - name: host_arg"},{"line_number":50,"context_line":"          value: \u0027host_check\u0027"},{"line_number":51,"context_line":"        - name: NAGIOSADMIN_USER"},{"line_number":52,"context_line":"          valueFrom:"},{"line_number":53,"context_line":"            secretKeyRef:"},{"line_number":54,"context_line":"              name: {{ $nagiosUserSecret }}"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"5fc1f717_2187dab7","line":51,"range":{"start_line":47,"start_character":8,"end_line":51,"end_character":32},"updated":"2019-03-13 14:16:26.000000000","message":"env variables could be upper-cased as a good practice","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":44,"context_line":"      env:"},{"line_number":45,"context_line":"        - name: NAGIOS_QUERY"},{"line_number":46,"context_line":"          value: \"http://nagios-metrics:80/nagios/cgi-bin/\""},{"line_number":47,"context_line":"        - name: service_arg"},{"line_number":48,"context_line":"          value: \"service_check\""},{"line_number":49,"context_line":"        - name: host_arg"},{"line_number":50,"context_line":"          value: \u0027host_check\u0027"},{"line_number":51,"context_line":"        - name: NAGIOSADMIN_USER"},{"line_number":52,"context_line":"          valueFrom:"},{"line_number":53,"context_line":"            secretKeyRef:"},{"line_number":54,"context_line":"              name: {{ $nagiosUserSecret }}"}],"source_content_type":"text/x-yaml","patch_set":3,"id":"5fc1f717_84afa67b","line":51,"range":{"start_line":47,"start_character":8,"end_line":51,"end_character":32},"in_reply_to":"5fc1f717_2187dab7","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"}],"nagios/templates/test/_nagios_test.sh.tpl":[{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":8,"context_line":"echo $host_arg"},{"line_number":9,"context_line":"echo $service_arg"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"apt-get update"},{"line_number":12,"context_line":"apt-get install python-pip -y"},{"line_number":13,"context_line":"apt-get install curl -y"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"check_host() {"},{"line_number":16,"context_line":"  curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_ea68d0b9","line":13,"range":{"start_line":11,"start_character":0,"end_line":13,"end_character":23},"updated":"2019-03-13 08:29:10.000000000","message":"can be changed to apt-get update \u0026\u0026 apt-get install -y curl python-pip","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":8,"context_line":"echo $host_arg"},{"line_number":9,"context_line":"echo $service_arg"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"apt-get update"},{"line_number":12,"context_line":"apt-get install python-pip -y"},{"line_number":13,"context_line":"apt-get install curl -y"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"check_host() {"},{"line_number":16,"context_line":"  curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_41a226fe","line":13,"range":{"start_line":11,"start_character":0,"end_line":13,"end_character":23},"in_reply_to":"5fc1f717_ea68d0b9","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":19,"context_line":"  -o /tmp/host_status.json"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"#python /tmp/python-nagios-tests.py $host_arg || exit"},{"line_number":22,"context_line":"python /tmp/python-nagios-tests.py $host_arg"},{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_aa5e480f","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":53},"updated":"2019-03-13 08:29:10.000000000","message":"what is the purpose of this line? maybe it is a leftover and you need to remove it.","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":18,"context_line":"  -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":19,"context_line":"  -o /tmp/host_status.json"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"#python /tmp/python-nagios-tests.py $host_arg || exit"},{"line_number":22,"context_line":"python /tmp/python-nagios-tests.py $host_arg"},{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_61a7220d","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":53},"in_reply_to":"5fc1f717_aa5e480f","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"},{"line_number":25,"context_line":"then"},{"line_number":26,"context_line":"  printf \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":27,"context_line":"else"},{"line_number":28,"context_line":"  printf \"TC check_host failed\""},{"line_number":29,"context_line":"  exit 1"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_cac71496","line":26,"range":{"start_line":26,"start_character":2,"end_line":26,"end_character":56},"updated":"2019-03-13 08:29:10.000000000","message":"I prefer echo \"PASS....\" instead of printf. In addition, I am not fun of colored output. I suppose this is the intention of \\033 right?.\n\nI would change all printf to echo","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"},{"line_number":25,"context_line":"then"},{"line_number":26,"context_line":"  printf \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":27,"context_line":"else"},{"line_number":28,"context_line":"  printf \"TC check_host failed\""},{"line_number":29,"context_line":"  exit 1"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_01b09e42","line":26,"range":{"start_line":26,"start_character":2,"end_line":26,"end_character":56},"in_reply_to":"5fc1f717_cac71496","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":13,"context_line":"apt-get install curl -y"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"check_host() {"},{"line_number":16,"context_line":"  curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"},{"line_number":17,"context_line":"  \"${NAGIOS_QUERY}/statusjson.cgi?query\u003dhostlist\u0026details\u003dtrue\" \\"},{"line_number":18,"context_line":"  -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":19,"context_line":"  -o /tmp/host_status.json"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"#python /tmp/python-nagios-tests.py $host_arg || exit"},{"line_number":22,"context_line":"python /tmp/python-nagios-tests.py $host_arg"},{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"},{"line_number":25,"context_line":"then"},{"line_number":26,"context_line":"  printf \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":27,"context_line":"else"},{"line_number":28,"context_line":"  printf \"TC check_host failed\""},{"line_number":29,"context_line":"  exit 1"},{"line_number":30,"context_line":"fi"},{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"check_service() {"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_eaf770d2","line":30,"range":{"start_line":16,"start_character":0,"end_line":30,"end_character":2},"updated":"2019-03-13 08:29:10.000000000","message":"Fix indentation of the code inside the function. Use two white spaces for each line","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":13,"context_line":"apt-get install curl -y"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"check_host() {"},{"line_number":16,"context_line":"  curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"},{"line_number":17,"context_line":"  \"${NAGIOS_QUERY}/statusjson.cgi?query\u003dhostlist\u0026details\u003dtrue\" \\"},{"line_number":18,"context_line":"  -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":19,"context_line":"  -o /tmp/host_status.json"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"#python /tmp/python-nagios-tests.py $host_arg || exit"},{"line_number":22,"context_line":"python /tmp/python-nagios-tests.py $host_arg"},{"line_number":23,"context_line":"rm /tmp/host_status.json"},{"line_number":24,"context_line":"if [ $? -eq 0 ]"},{"line_number":25,"context_line":"then"},{"line_number":26,"context_line":"  printf \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":27,"context_line":"else"},{"line_number":28,"context_line":"  printf \"TC check_host failed\""},{"line_number":29,"context_line":"  exit 1"},{"line_number":30,"context_line":"fi"},{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"check_service() {"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_c1b5b633","line":30,"range":{"start_line":16,"start_character":0,"end_line":30,"end_character":2},"in_reply_to":"5fc1f717_eaf770d2","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"check_service() {"},{"line_number":34,"context_line":" curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"},{"line_number":35,"context_line":" \"${NAGIOS_QUERY}/statusjson.cgi?query\u003dservicelist\u0026details\u003dtrue\" \\"},{"line_number":36,"context_line":" -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":37,"context_line":" -o /tmp/service_status.json"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"python /tmp/python-nagios-tests.py $service_arg"},{"line_number":40,"context_line":"rm /tmp/service_status.json"},{"line_number":41,"context_line":"if [ $? -eq 0 ]"},{"line_number":42,"context_line":"then"},{"line_number":43,"context_line":"  printf \"\\n\\033[1mPASS: Service checks are enabled\\033[0m\\n\""},{"line_number":44,"context_line":"else"},{"line_number":45,"context_line":"  printf \"TC check_service failed\""},{"line_number":46,"context_line":"  exit 1"},{"line_number":47,"context_line":"fi"},{"line_number":48,"context_line":"}"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"check_host"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_cafab4bb","line":47,"range":{"start_line":34,"start_character":0,"end_line":47,"end_character":2},"updated":"2019-03-13 08:29:10.000000000","message":"Fix indentation of the code inside the function. Use two white spaces for each line","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":31,"context_line":"}"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"check_service() {"},{"line_number":34,"context_line":" curl -K- \u003c\u003c\u003c \"--user ${NAGIOSADMIN_USER}:${NAGIOSADMIN_PASS}\" \\"},{"line_number":35,"context_line":" \"${NAGIOS_QUERY}/statusjson.cgi?query\u003dservicelist\u0026details\u003dtrue\" \\"},{"line_number":36,"context_line":" -H \u0027Content-Type: application/json\u0027 \\"},{"line_number":37,"context_line":" -o /tmp/service_status.json"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"python /tmp/python-nagios-tests.py $service_arg"},{"line_number":40,"context_line":"rm /tmp/service_status.json"},{"line_number":41,"context_line":"if [ $? -eq 0 ]"},{"line_number":42,"context_line":"then"},{"line_number":43,"context_line":"  printf \"\\n\\033[1mPASS: Service checks are enabled\\033[0m\\n\""},{"line_number":44,"context_line":"else"},{"line_number":45,"context_line":"  printf \"TC check_service failed\""},{"line_number":46,"context_line":"  exit 1"},{"line_number":47,"context_line":"fi"},{"line_number":48,"context_line":"}"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"check_host"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_e1b23249","line":47,"range":{"start_line":34,"start_character":0,"end_line":47,"end_character":2},"in_reply_to":"5fc1f717_cafab4bb","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  python /tmp/python-nagios-tests.py $host_arg"},{"line_number":20,"context_line":"  if [ $? -eq 0 ]"},{"line_number":21,"context_line":"  then"},{"line_number":22,"context_line":"    echo -e \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":23,"context_line":"  else"},{"line_number":24,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":25,"context_line":"    rm /tmp/host_status.json"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_81648e23","line":22,"range":{"start_line":22,"start_character":15,"end_line":22,"end_character":22},"updated":"2019-03-13 14:16:26.000000000","message":"what is the use of these characters?","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":19,"context_line":"  python /tmp/python-nagios-tests.py $host_arg"},{"line_number":20,"context_line":"  if [ $? -eq 0 ]"},{"line_number":21,"context_line":"  then"},{"line_number":22,"context_line":"    echo -e \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":23,"context_line":"  else"},{"line_number":24,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":25,"context_line":"    rm /tmp/host_status.json"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_a4b422d2","line":22,"range":{"start_line":22,"start_character":15,"end_line":22,"end_character":22},"in_reply_to":"5fc1f717_81648e23","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    echo -e \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":23,"context_line":"  else"},{"line_number":24,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":25,"context_line":"    rm /tmp/host_status.json"},{"line_number":26,"context_line":"    exit 1"},{"line_number":27,"context_line":"  fi"},{"line_number":28,"context_line":"  rm /tmp/host_status.json"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_41cea62d","line":25,"range":{"start_line":25,"start_character":4,"end_line":25,"end_character":28},"updated":"2019-03-13 14:16:26.000000000","message":"move this to line 20 (exactly after calling python script)","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    echo -e \"\\n\\033[1mPASS: Prometheus host is UP\\033[0m\\n\""},{"line_number":23,"context_line":"  else"},{"line_number":24,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":25,"context_line":"    rm /tmp/host_status.json"},{"line_number":26,"context_line":"    exit 1"},{"line_number":27,"context_line":"  fi"},{"line_number":28,"context_line":"  rm /tmp/host_status.json"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_44cd3e64","line":25,"range":{"start_line":25,"start_character":4,"end_line":25,"end_character":28},"in_reply_to":"5fc1f717_41cea62d","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    rm /tmp/host_status.json"},{"line_number":26,"context_line":"    exit 1"},{"line_number":27,"context_line":"  fi"},{"line_number":28,"context_line":"  rm /tmp/host_status.json"},{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"check_service() {"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_61d3a2d6","line":28,"range":{"start_line":28,"start_character":2,"end_line":28,"end_character":26},"updated":"2019-03-13 14:16:26.000000000","message":"...and remove this","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    rm /tmp/host_status.json"},{"line_number":26,"context_line":"    exit 1"},{"line_number":27,"context_line":"  fi"},{"line_number":28,"context_line":"  rm /tmp/host_status.json"},{"line_number":29,"context_line":"}"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"check_service() {"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_64caba4e","line":28,"range":{"start_line":28,"start_character":2,"end_line":28,"end_character":26},"in_reply_to":"5fc1f717_61d3a2d6","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"ef6d64c2737f7c45d7b581433c1205daf24eb6b7","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  rm /tmp/host_status.json"},{"line_number":22,"context_line":"  if [ $result -eq 0 ]"},{"line_number":23,"context_line":"  then"},{"line_number":24,"context_line":"    echo -e \"\\nPASS: Prometheus host is UP\\n\""},{"line_number":25,"context_line":"  else"},{"line_number":26,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"text/x-smarty","patch_set":5,"id":"5fc1f717_565dc144","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":45},"updated":"2019-03-18 11:01:48.000000000","message":"Can be converted to echo \"PASS: Prometheus host is UP\". (remove -e and \\n)\nThe same can be made for every echo command of this file.","commit_id":"bb35b180a2bafc27bdd2eb979960742647d371a4"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"5e933f7787582a5ccafcabdc7bf41c475fe93d8a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"  rm /tmp/host_status.json"},{"line_number":22,"context_line":"  if [ $result -eq 0 ]"},{"line_number":23,"context_line":"  then"},{"line_number":24,"context_line":"    echo -e \"\\nPASS: Prometheus host is UP\\n\""},{"line_number":25,"context_line":"  else"},{"line_number":26,"context_line":"    echo -e \"\\nTC check_host failed\""},{"line_number":27,"context_line":"    exit 1"}],"source_content_type":"text/x-smarty","patch_set":5,"id":"5fc1f717_f67b7126","line":24,"range":{"start_line":24,"start_character":4,"end_line":24,"end_character":45},"in_reply_to":"5fc1f717_565dc144","updated":"2019-03-19 10:45:12.000000000","message":"Done","commit_id":"bb35b180a2bafc27bdd2eb979960742647d371a4"}],"nagios/templates/test/_python_nagios_tests.py.tpl":[{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":7,"context_line":"class NagiosTest(object):"},{"line_number":8,"context_line":"    def check_host(self):"},{"line_number":9,"context_line":"        with open(\u0027/tmp/host_status.json\u0027) as f:"},{"line_number":10,"context_line":"            data \u003d json.load(f)"},{"line_number":11,"context_line":"        host_status \u003d data[\u0027data\u0027][\u0027hostlist\u0027][\u0027prometheus\u0027]"},{"line_number":12,"context_line":"        print(\"Host name is %s\" % host_status[\u0027name\u0027])"},{"line_number":13,"context_line":"        print(\"Host status is %s\" % host_status[\u0027plugin_output\u0027])"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_ea20d04a","line":10,"range":{"start_line":10,"start_character":12,"end_line":10,"end_character":16},"updated":"2019-03-13 08:29:10.000000000","message":"Data is a dict which can contain or not contain the keys you are accessing below. You need to either try/catch KeyError or use .get(\u0027key\u0027, \u0027default\u0027) method","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":7,"context_line":"class NagiosTest(object):"},{"line_number":8,"context_line":"    def check_host(self):"},{"line_number":9,"context_line":"        with open(\u0027/tmp/host_status.json\u0027) as f:"},{"line_number":10,"context_line":"            data \u003d json.load(f)"},{"line_number":11,"context_line":"        host_status \u003d data[\u0027data\u0027][\u0027hostlist\u0027][\u0027prometheus\u0027]"},{"line_number":12,"context_line":"        print(\"Host name is %s\" % host_status[\u0027name\u0027])"},{"line_number":13,"context_line":"        print(\"Host status is %s\" % host_status[\u0027plugin_output\u0027])"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_a18aea66","line":10,"range":{"start_line":10,"start_character":12,"end_line":10,"end_character":16},"in_reply_to":"5fc1f717_ea20d04a","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def check_service(self):"},{"line_number":20,"context_line":"        with open(\u0027/tmp/service_status.json\u0027) as f:"},{"line_number":21,"context_line":"            data \u003d json.load(f)"},{"line_number":22,"context_line":"        service_status \u003d data[\u0027data\u0027][\u0027servicelist\u0027][\u0027prometheus\u0027]"},{"line_number":23,"context_line":"        for service in service_status:"},{"line_number":24,"context_line":"            print(service_status[service][\u0027description\u0027])"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_8a190c23","line":21,"range":{"start_line":21,"start_character":12,"end_line":21,"end_character":16},"updated":"2019-03-13 08:29:10.000000000","message":"same","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    def check_service(self):"},{"line_number":20,"context_line":"        with open(\u0027/tmp/service_status.json\u0027) as f:"},{"line_number":21,"context_line":"            data \u003d json.load(f)"},{"line_number":22,"context_line":"        service_status \u003d data[\u0027data\u0027][\u0027servicelist\u0027][\u0027prometheus\u0027]"},{"line_number":23,"context_line":"        for service in service_status:"},{"line_number":24,"context_line":"            print(service_status[service][\u0027description\u0027])"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_417b067a","line":21,"range":{"start_line":21,"start_character":12,"end_line":21,"end_character":16},"in_reply_to":"5fc1f717_8a190c23","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f6df3e690713766e87a49b98d91b4745272c7ba6","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"},{"line_number":36,"context_line":"if (flag \u003d\u003d \"host_check\"):"},{"line_number":37,"context_line":"    nagios_test.check_host()"},{"line_number":38,"context_line":"else:"},{"line_number":39,"context_line":"    nagios_test.check_service()"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_cae874e3","line":36,"range":{"start_line":36,"start_character":3,"end_line":36,"end_character":25},"updated":"2019-03-13 08:29:10.000000000","message":"parentheses here can be omitted","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"30264fb08b87ce143141900e6fa1f50982a6c901","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"},{"line_number":36,"context_line":"if (flag \u003d\u003d \"host_check\"):"},{"line_number":37,"context_line":"    nagios_test.check_host()"},{"line_number":38,"context_line":"else:"},{"line_number":39,"context_line":"    nagios_test.check_service()"}],"source_content_type":"text/x-smarty","patch_set":2,"id":"5fc1f717_61808247","line":36,"range":{"start_line":36,"start_character":3,"end_line":36,"end_character":25},"in_reply_to":"5fc1f717_cae874e3","updated":"2019-03-13 13:38:18.000000000","message":"Done","commit_id":"ea21115164883b49611d532d2a263a3357a42512"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    def check_host(self):"},{"line_number":9,"context_line":"        with open(\u0027/tmp/host_status.json\u0027) as f:"},{"line_number":10,"context_line":"            data \u003d json.load(f)"},{"line_number":11,"context_line":"        host_status \u003d data.get(\u0027data\u0027).get(\u0027hostlist\u0027).get(\u0027prometheus\u0027)"},{"line_number":12,"context_line":"        print(\"Host name is %s\" % host_status.get(\u0027name\u0027))"},{"line_number":13,"context_line":"        print(\"Host status is %s\" % host_status.get(\u0027plugin_output\u0027))"},{"line_number":14,"context_line":"        assert host_status.get(\u0027status\u0027) \u003d\u003d 2,\\"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_01573e5a","line":11,"range":{"start_line":11,"start_character":22,"end_line":11,"end_character":72},"updated":"2019-03-13 14:16:26.000000000","message":"the .get.get.get is not the correct way to do it. You are going to receive the following error if any of the intermediate keys is absent: \"AttributeError: \u0027NoneType\u0027 object has no attribute \u0027get\u0027\"\n\nI suggest revert it to the previous format but wrap it up inside a try/catch block (L11-L17)","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":8,"context_line":"    def check_host(self):"},{"line_number":9,"context_line":"        with open(\u0027/tmp/host_status.json\u0027) as f:"},{"line_number":10,"context_line":"            data \u003d json.load(f)"},{"line_number":11,"context_line":"        host_status \u003d data.get(\u0027data\u0027).get(\u0027hostlist\u0027).get(\u0027prometheus\u0027)"},{"line_number":12,"context_line":"        print(\"Host name is %s\" % host_status.get(\u0027name\u0027))"},{"line_number":13,"context_line":"        print(\"Host status is %s\" % host_status.get(\u0027plugin_output\u0027))"},{"line_number":14,"context_line":"        assert host_status.get(\u0027status\u0027) \u003d\u003d 2,\\"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_04c3b639","line":11,"range":{"start_line":11,"start_character":22,"end_line":11,"end_character":72},"in_reply_to":"5fc1f717_01573e5a","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"f87894af86dad2e75066aebfe4a84923490f56af","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    def check_service(self):"},{"line_number":20,"context_line":"        with open(\u0027/tmp/service_status.json\u0027) as f:"},{"line_number":21,"context_line":"            data \u003d json.load(f)"},{"line_number":22,"context_line":"        service_status \u003d data.get(\u0027data\u0027).get(\u0027servicelist\u0027).get(\u0027prometheus\u0027)"},{"line_number":23,"context_line":"        for service in service_status:"},{"line_number":24,"context_line":"            print(service_status.get(service).get(\u0027description\u0027))"},{"line_number":25,"context_line":"            assert service_status.get(service).get(\u0027status\u0027) !\u003d 8,\\"},{"line_number":26,"context_line":"                \"FAIL: Service is unknown\\n\""},{"line_number":27,"context_line":"            print(service_status.get(service).get(\u0027plugin_output\u0027))"},{"line_number":28,"context_line":"            assert service_status.get(service).get(\u0027has_been_checked\u0027),\\"},{"line_number":29,"context_line":"                \"FAIL: Service %s has not been checked\\n\"\\"},{"line_number":30,"context_line":"                % (service_status.get(service).get(\u0027description\u0027))"},{"line_number":31,"context_line":"            print(\"Last service check: %d\\n\""},{"line_number":32,"context_line":"                  % service_status.get(service).get(\u0027last_check\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_2154ba52","line":32,"range":{"start_line":22,"start_character":0,"end_line":32,"end_character":66},"updated":"2019-03-13 14:16:26.000000000","message":"same","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"551162333b5f08a9907bff608ece16264f6896dd","unresolved":false,"context_lines":[{"line_number":19,"context_line":"    def check_service(self):"},{"line_number":20,"context_line":"        with open(\u0027/tmp/service_status.json\u0027) as f:"},{"line_number":21,"context_line":"            data \u003d json.load(f)"},{"line_number":22,"context_line":"        service_status \u003d data.get(\u0027data\u0027).get(\u0027servicelist\u0027).get(\u0027prometheus\u0027)"},{"line_number":23,"context_line":"        for service in service_status:"},{"line_number":24,"context_line":"            print(service_status.get(service).get(\u0027description\u0027))"},{"line_number":25,"context_line":"            assert service_status.get(service).get(\u0027status\u0027) !\u003d 8,\\"},{"line_number":26,"context_line":"                \"FAIL: Service is unknown\\n\""},{"line_number":27,"context_line":"            print(service_status.get(service).get(\u0027plugin_output\u0027))"},{"line_number":28,"context_line":"            assert service_status.get(service).get(\u0027has_been_checked\u0027),\\"},{"line_number":29,"context_line":"                \"FAIL: Service %s has not been checked\\n\"\\"},{"line_number":30,"context_line":"                % (service_status.get(service).get(\u0027description\u0027))"},{"line_number":31,"context_line":"            print(\"Last service check: %d\\n\""},{"line_number":32,"context_line":"                  % service_status.get(service).get(\u0027last_check\u0027))"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"}],"source_content_type":"text/x-smarty","patch_set":3,"id":"5fc1f717_24c0322a","line":32,"range":{"start_line":22,"start_character":0,"end_line":32,"end_character":66},"in_reply_to":"5fc1f717_2154ba52","updated":"2019-03-14 12:31:14.000000000","message":"Done","commit_id":"d071318ddeda1ae538262b9b90e52e2ee7a5464e"},{"author":{"_account_id":28014,"name":"Stamatis Katsaounis","email":"skatsaounis@admin.grnet.gr","username":"skatsaounis"},"change_message_id":"ef6d64c2737f7c45d7b581433c1205daf24eb6b7","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"},{"line_number":36,"context_line":"try:"},{"line_number":37,"context_line":"    if (flag \u003d\u003d \"host_check\"):"},{"line_number":38,"context_line":"        nagios_test.check_host()"},{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        nagios_test.check_service()"}],"source_content_type":"text/x-smarty","patch_set":5,"id":"5fc1f717_b64e6594","line":37,"range":{"start_line":37,"start_character":7,"end_line":37,"end_character":8},"updated":"2019-03-18 11:01:48.000000000","message":"parentheses can be omitted.","commit_id":"bb35b180a2bafc27bdd2eb979960742647d371a4"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"5e933f7787582a5ccafcabdc7bf41c475fe93d8a","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"nagios_test \u003d NagiosTest()"},{"line_number":36,"context_line":"try:"},{"line_number":37,"context_line":"    if (flag \u003d\u003d \"host_check\"):"},{"line_number":38,"context_line":"        nagios_test.check_host()"},{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        nagios_test.check_service()"}],"source_content_type":"text/x-smarty","patch_set":5,"id":"5fc1f717_d672f549","line":37,"range":{"start_line":37,"start_character":7,"end_line":37,"end_character":8},"in_reply_to":"5fc1f717_b64e6594","updated":"2019-03-19 10:45:12.000000000","message":"Done","commit_id":"bb35b180a2bafc27bdd2eb979960742647d371a4"},{"author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"change_message_id":"9d05d14ff9f5f852dcced7972d5a186ad73a6710","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import json"},{"line_number":2,"context_line":"import sys"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"flag \u003d str(sys.argv[1])"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_7ab83710","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":11},"updated":"2019-04-07 19:05:34.000000000","message":"#! ... \n?","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"},{"author":{"_account_id":23928,"name":"Pete Birley","email":"petebirley@gmail.com","username":"portdirect"},"change_message_id":"fd27f14d394fec75a290781ed3f6f50d81b0a408","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import json"},{"line_number":2,"context_line":"import sys"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"flag \u003d str(sys.argv[1])"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_83a569b7","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":11},"in_reply_to":"5fc1f717_3442c310","updated":"2019-04-08 20:44:46.000000000","message":"i think Chris is referring to the lack of shebang and other notices at the header of this file.","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"def74b5a5279e5f2d1f6060caee4a9a1e5b56a14","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import json"},{"line_number":2,"context_line":"import sys"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"flag \u003d str(sys.argv[1])"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_3442c310","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":11},"in_reply_to":"5fc1f717_7ab83710","updated":"2019-04-08 06:56:52.000000000","message":"json is imported in order to search the contents of files host_status.json and service_status.json, which have been obtained from curl to nagios server.","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"3788ff0c5c57ab647691e6773dfd75b125fb074e","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import json"},{"line_number":2,"context_line":"import sys"},{"line_number":3,"context_line":""},{"line_number":4,"context_line":"flag \u003d str(sys.argv[1])"}],"source_content_type":"text/x-smarty","patch_set":8,"id":"5fc1f717_bee8b315","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":11},"in_reply_to":"5fc1f717_83a569b7","updated":"2019-04-09 08:33:39.000000000","message":"I am not sure what do you mean about shebang and other notices. Maybe to include this header :\n{{/*\nCopyright 2019 The Openstack-Helm Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/}} ???\nCould you please tell me what do you have in mind?","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"}],"tools/deployment/multinode/110-nagios.sh":[{"author":{"_account_id":8898,"name":"Chris Wedgwood","email":"cw@f00f.org","username":"anticw"},"change_message_id":"9d05d14ff9f5f852dcced7972d5a186ad73a6710","unresolved":false,"context_lines":[{"line_number":44,"context_line":"NAGIOS_POD\u003d$(kubectl -n osh-infra get pods -l\u003d\u0027application\u003dnagios,component\u003dmonitoring\u0027 --output\u003djsonpath\u003d\u0027{.items[0].metadata.name}\u0027)"},{"line_number":45,"context_line":"kubectl exec $NAGIOS_POD  -n osh-infra -c nagios -- cat /opt/nagios/etc/objects/query_es_clauses.json | python -m json.tool"},{"line_number":46,"context_line":"#NOTE: Start Helm test"},{"line_number":47,"context_line":"helm test nagios --timeout 600"}],"source_content_type":"text/x-sh","patch_set":8,"id":"5fc1f717_1a37b3b2","line":47,"range":{"start_line":47,"start_character":27,"end_line":47,"end_character":30},"updated":"2019-04-07 19:05:34.000000000","message":"how long does it typically take?","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"},{"author":{"_account_id":29921,"name":"Mimigiannis Nikos","email":"nmimi@intracom-telecom.com","username":"nmimi"},"change_message_id":"def74b5a5279e5f2d1f6060caee4a9a1e5b56a14","unresolved":false,"context_lines":[{"line_number":44,"context_line":"NAGIOS_POD\u003d$(kubectl -n osh-infra get pods -l\u003d\u0027application\u003dnagios,component\u003dmonitoring\u0027 --output\u003djsonpath\u003d\u0027{.items[0].metadata.name}\u0027)"},{"line_number":45,"context_line":"kubectl exec $NAGIOS_POD  -n osh-infra -c nagios -- cat /opt/nagios/etc/objects/query_es_clauses.json | python -m json.tool"},{"line_number":46,"context_line":"#NOTE: Start Helm test"},{"line_number":47,"context_line":"helm test nagios --timeout 600"}],"source_content_type":"text/x-sh","patch_set":8,"id":"5fc1f717_347f2367","line":47,"range":{"start_line":47,"start_character":27,"end_line":47,"end_character":30},"in_reply_to":"5fc1f717_1a37b3b2","updated":"2019-04-08 06:56:52.000000000","message":"The period approximately  ranges from about 300 to 400s. I set the timeout to 600s for safety reasons.","commit_id":"03bd9a9f28a4d4caa9ec551c8de7c6a1d80c1237"}]}
