)]}'
{"docs/Agent.md":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":107,"context_line":"| skip_detection_plugins | Skip provided space separated list of detection plugins. | system |"},{"line_number":108,"context_line":"| overwrite | This is an optional parameter to overwrite the plugin configuration.  Use this if you don\u0027t want to keep the original configuration.  If this parameter is not specified, the configuration will be appended to the existing configuration, possibly creating duplicate checks.  **NOTE:** The agent config file, agent.yaml, will always be overwritten, even if this parameter is not specified. | |"},{"line_number":109,"context_line":"| detection_args | Some detection plugins can be passed arguments. This is a string that will be passed to the detection plugins. | \"hostname\u003dping.me\" |"},{"line_number":110,"context_line":"| detection_args_json | A JSON string can be passed to the detection plugin. | \u0027{\"process_config\":{\"process_names\":[\"monasca-api\",\"monasca-notification\"],\"dimensions\":{\"service\":\"monitoring\"}}}\u0027 |"},{"line_number":111,"context_line":"| max_measurement_buffer_size | Integer value for the maximum number of measurements to buffer locally while unable to connect to the monasca-api. If the queue exceeds this value, measurements will be dropped in batches. A value of \u0027-1\u0027 indicates no limit | 100000 |"},{"line_number":112,"context_line":"| backlog_send_rate | Integer value of how many batches of buffered measurements to send each time the forwarder flushes data | 1000 |"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"ba5da102_ba83bbcb","line":110,"range":{"start_line":110,"start_character":2,"end_line":110,"end_character":21},"updated":"2016-10-28 04:37:36.000000000","message":"In the examples you use -json. Where is it documented that -json is short for --detection_args_json?","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":107,"context_line":"| skip_detection_plugins | Skip provided space separated list of detection plugins. | system |"},{"line_number":108,"context_line":"| overwrite | This is an optional parameter to overwrite the plugin configuration.  Use this if you don\u0027t want to keep the original configuration.  If this parameter is not specified, the configuration will be appended to the existing configuration, possibly creating duplicate checks.  **NOTE:** The agent config file, agent.yaml, will always be overwritten, even if this parameter is not specified. | |"},{"line_number":109,"context_line":"| detection_args | Some detection plugins can be passed arguments. This is a string that will be passed to the detection plugins. | \"hostname\u003dping.me\" |"},{"line_number":110,"context_line":"| detection_args_json | A JSON string can be passed to the detection plugin. | \u0027{\"process_config\":{\"process_names\":[\"monasca-api\",\"monasca-notification\"],\"dimensions\":{\"service\":\"monitoring\"}}}\u0027 |"},{"line_number":111,"context_line":"| max_measurement_buffer_size | Integer value for the maximum number of measurements to buffer locally while unable to connect to the monasca-api. If the queue exceeds this value, measurements will be dropped in batches. A value of \u0027-1\u0027 indicates no limit | 100000 |"},{"line_number":112,"context_line":"| backlog_send_rate | Integer value of how many batches of buffered measurements to send each time the forwarder flushes data | 1000 |"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"ba5da102_0cea9c0f","line":110,"range":{"start_line":110,"start_character":2,"end_line":110,"end_character":21},"in_reply_to":"ba5da102_ba83bbcb","updated":"2016-10-28 22:50:55.000000000","message":"The help for monasca-setup shows it.  I didn\u0027t document it here, because we don\u0027t document any of the shortcut paths here (i.e. -d instead of --detection_args)  I will put a shortcut example within the detection process.py file.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"}],"docs/Plugins.md":[{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":1326,"context_line":"    \u0027{\"process_config\":{\"process_names\":[\"monasca-notification\",\"monasca-api\"],\"dimensions\":{\"service\":\"monitoring\"}}}\u0027"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"monasca-setup -d ProcessCheck -json \\"},{"line_number":1329,"context_line":"     \u0027{\"process_config\":{\"process_username\":\"dbadmin\",\"dimensions\":{\"service\":\"monitoring\",\"component\":\"vertica\"}}}\u0027"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"monasca-setup -d ProcessCheck -a \"conf_file_path\u003d/home/stack/myprocess.yaml\""},{"line_number":1332,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":9,"id":"ba5da102_30011139","line":1329,"range":{"start_line":1329,"start_character":65,"end_line":1329,"end_character":69},"updated":"2016-11-02 14:02:52.000000000","message":"Can I set up checks by user and name in the same call to the detection plugin? Kind of merging both of these together? Could we have process_config match to a list of dictionaries instead of a dictionary so i dont have to call this serveral times if i have a list of processes to monitor?\n\nAlso way to set the search string, exact match, or detailed? maybe include in the example","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"e625a00d80fc88dc76549e448b47d993da91c111","unresolved":false,"context_lines":[{"line_number":1326,"context_line":"    \u0027{\"process_config\":{\"process_names\":[\"monasca-notification\",\"monasca-api\"],\"dimensions\":{\"service\":\"monitoring\"}}}\u0027"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"monasca-setup -d ProcessCheck -json \\"},{"line_number":1329,"context_line":"     \u0027{\"process_config\":{\"process_username\":\"dbadmin\",\"dimensions\":{\"service\":\"monitoring\",\"component\":\"vertica\"}}}\u0027"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"monasca-setup -d ProcessCheck -a \"conf_file_path\u003d/home/stack/myprocess.yaml\""},{"line_number":1332,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":9,"id":"ba5da102_d1ea8d0e","line":1329,"range":{"start_line":1329,"start_character":65,"end_line":1329,"end_character":69},"in_reply_to":"ba5da102_30011139","updated":"2016-11-02 17:33:15.000000000","message":"Good suggestions, I will look into supporting them","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"36f6f728c6f5628a9ee8aded397ea7e6bd54253d","unresolved":false,"context_lines":[{"line_number":1326,"context_line":"    \u0027{\"process_config\":{\"process_names\":[\"monasca-notification\",\"monasca-api\"],\"dimensions\":{\"service\":\"monitoring\"}}}\u0027"},{"line_number":1327,"context_line":""},{"line_number":1328,"context_line":"monasca-setup -d ProcessCheck -json \\"},{"line_number":1329,"context_line":"     \u0027{\"process_config\":{\"process_username\":\"dbadmin\",\"dimensions\":{\"service\":\"monitoring\",\"component\":\"vertica\"}}}\u0027"},{"line_number":1330,"context_line":""},{"line_number":1331,"context_line":"monasca-setup -d ProcessCheck -a \"conf_file_path\u003d/home/stack/myprocess.yaml\""},{"line_number":1332,"context_line":"```"}],"source_content_type":"text/x-markdown","patch_set":9,"id":"ba5da102_4f5583c4","line":1329,"range":{"start_line":1329,"start_character":65,"end_line":1329,"end_character":69},"in_reply_to":"ba5da102_30011139","updated":"2016-11-07 00:56:16.000000000","message":"I exposed exact_match so this can be changed.  I did not expose detailed because in the Service_Plugin.py review I was asked not to expose this because we think it should always be detailed\u003dTrue so that we get the right level of process information.  I have changed process_config to accept a list of dictionaries so you can specify multiple configurations in one call (great suggestion!).  You cannot combine username with process_names (caused component dimension ambiguity when I looked at that), but can add two separate entries to do this.","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"}],"monasca_setup/detection/plugins/process.py":[{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"84401fd972e597374edb238465717b6a23960952","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def monitor_by_process_username(self, process_username, exact_match\u003dTrue, detailed\u003dTrue, dimensions\u003dNone):"},{"line_number":114,"context_line":"        config \u003d monasca_setup.agent_config.Plugins()"},{"line_number":115,"context_line":"        instance \u003d {\u0027name\u0027: dimensions[\u0027component\u0027],"},{"line_number":116,"context_line":"                    \u0027detailed\u0027: detailed,"},{"line_number":117,"context_line":"                    \u0027username\u0027: process_username,"},{"line_number":118,"context_line":"                    \u0027dimensions\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_a17184e2","line":115,"range":{"start_line":115,"start_character":28,"end_line":115,"end_character":51},"updated":"2016-09-23 23:38:39.000000000","message":"Looks like \u0027component\u0027 is required in monasca-setup command. If it is required, we should probably add it in the error message. Because right now if I run monasca-setup -d ProcessCheck --detection_args_json \u0027{\"process_config\":{\"process_username\":\"dbadmin\",\"dimensions\":{\"service\":\"monitoring\"}}}\u0027 and it only returns: WARNING: Failed detection of plugin ProcessCheck. Possible causes: Service not found or missing arguments.","commit_id":"bf9c401b9fc4cbaa0bffdd633636ac13dc5644c3"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"f763fe673ee2de7f33d4e848e4533539e64e42ab","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def monitor_by_process_username(self, process_username, exact_match\u003dTrue, detailed\u003dTrue, dimensions\u003dNone):"},{"line_number":114,"context_line":"        config \u003d monasca_setup.agent_config.Plugins()"},{"line_number":115,"context_line":"        instance \u003d {\u0027name\u0027: dimensions[\u0027component\u0027],"},{"line_number":116,"context_line":"                    \u0027detailed\u0027: detailed,"},{"line_number":117,"context_line":"                    \u0027username\u0027: process_username,"},{"line_number":118,"context_line":"                    \u0027dimensions\u0027: {}}"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a8bc5a2_de754a98","line":115,"range":{"start_line":115,"start_character":28,"end_line":115,"end_character":51},"in_reply_to":"5a8bc5a2_a17184e2","updated":"2016-09-26 17:21:41.000000000","message":"I agree that will be a good change, thanks!","commit_id":"bf9c401b9fc4cbaa0bffdd633636ac13dc5644c3"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self.process_username \u003d None"},{"line_number":50,"context_line":"        self.conf_file_path \u003d None"},{"line_number":51,"context_line":"        if self.args:"},{"line_number":52,"context_line":"            self.conf_file_path \u003d self.args.get(\u0027conf_file_path\u0027, None)"},{"line_number":53,"context_line":"        if self.conf_file_path:"},{"line_number":54,"context_line":"            self._read_config(self.conf_file_path)"},{"line_number":55,"context_line":"        elif self.process_config:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_bad1fbcf","line":52,"range":{"start_line":52,"start_character":49,"end_line":52,"end_character":63},"updated":"2016-10-28 04:37:36.000000000","message":"Is this documented in Plugins.md?","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":49,"context_line":"        self.process_username \u003d None"},{"line_number":50,"context_line":"        self.conf_file_path \u003d None"},{"line_number":51,"context_line":"        if self.args:"},{"line_number":52,"context_line":"            self.conf_file_path \u003d self.args.get(\u0027conf_file_path\u0027, None)"},{"line_number":53,"context_line":"        if self.conf_file_path:"},{"line_number":54,"context_line":"            self._read_config(self.conf_file_path)"},{"line_number":55,"context_line":"        elif self.process_config:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_2ceda025","line":52,"range":{"start_line":52,"start_character":49,"end_line":52,"end_character":63},"in_reply_to":"ba5da102_bad1fbcf","updated":"2016-10-28 22:50:55.000000000","message":"Yes, I have an example using it.  I will change it to a yam file though.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        elif self.process_config:"},{"line_number":56,"context_line":"            self._init_from_json_data(self.process_config)"},{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            log.warn(\"\\tMissing configuration.\")"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _init_from_json_data(self, json_data):"},{"line_number":61,"context_line":"        if \u0027process_names\u0027 in json_data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_3a4fabbe","line":58,"range":{"start_line":58,"start_character":12,"end_line":58,"end_character":20},"updated":"2016-10-28 04:37:36.000000000","message":"Shouldn\u0027t it fail in this case? It was unable to get any configuration","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        elif self.process_config:"},{"line_number":56,"context_line":"            self._init_from_json_data(self.process_config)"},{"line_number":57,"context_line":"        else:"},{"line_number":58,"context_line":"            log.warn(\"\\tMissing configuration.\")"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def _init_from_json_data(self, json_data):"},{"line_number":61,"context_line":"        if \u0027process_names\u0027 in json_data:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_4cf494f1","line":58,"range":{"start_line":58,"start_character":12,"end_line":58,"end_character":20},"in_reply_to":"ba5da102_3a4fabbe","updated":"2016-10-28 22:50:55.000000000","message":"Good idea.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.dimensions.update(json_data[\u0027dimensions\u0027])"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _read_config(self, config_file):"},{"line_number":70,"context_line":"        log.info(\"\\tUsing client credentials from {}\".format(config_file))"},{"line_number":71,"context_line":"        with open(config_file) as data_file:"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                data \u003d json.load(data_file)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_dad6afc4","line":70,"range":{"start_line":70,"start_character":26,"end_line":70,"end_character":44},"updated":"2016-10-28 04:37:36.000000000","message":"??","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            self.dimensions.update(json_data[\u0027dimensions\u0027])"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _read_config(self, config_file):"},{"line_number":70,"context_line":"        log.info(\"\\tUsing client credentials from {}\".format(config_file))"},{"line_number":71,"context_line":"        with open(config_file) as data_file:"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                data \u003d json.load(data_file)"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_6cf798f5","line":70,"range":{"start_line":70,"start_character":26,"end_line":70,"end_character":44},"in_reply_to":"ba5da102_dad6afc4","updated":"2016-10-28 22:50:55.000000000","message":"Good catch, cut and paste error.  Will re-word.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        log.info(\"\\tUsing client credentials from {}\".format(config_file))"},{"line_number":71,"context_line":"        with open(config_file) as data_file:"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                data \u003d json.load(data_file)"},{"line_number":74,"context_line":"                self._init_from_json_data(data)"},{"line_number":75,"context_line":"            except ValueError as e:"},{"line_number":76,"context_line":"                exception_msg \u003d (\"Could not read config file. Invalid json format detected. {0}.\".format(e))"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_fadb73eb","line":73,"range":{"start_line":73,"start_character":23,"end_line":73,"end_character":27},"updated":"2016-10-28 04:37:36.000000000","message":"I think it makes a lot more sense for this to be a yaml file. So much easier for people to get right","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        log.info(\"\\tUsing client credentials from {}\".format(config_file))"},{"line_number":71,"context_line":"        with open(config_file) as data_file:"},{"line_number":72,"context_line":"            try:"},{"line_number":73,"context_line":"                data \u003d json.load(data_file)"},{"line_number":74,"context_line":"                self._init_from_json_data(data)"},{"line_number":75,"context_line":"            except ValueError as e:"},{"line_number":76,"context_line":"                exception_msg \u003d (\"Could not read config file. Invalid json format detected. {0}.\".format(e))"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_8cdeac6b","line":73,"range":{"start_line":73,"start_character":23,"end_line":73,"end_character":27},"in_reply_to":"ba5da102_fadb73eb","updated":"2016-10-28 22:50:55.000000000","message":"I will change this to use a yaml file.  I originally picked JSON since the format would be exactly the same for command line or file.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if self.not_found_processes:"},{"line_number":93,"context_line":"            log.info(\"\\tDid not discover process_name(s): {0}.\".format(\",\".join(self.not_found_processes)))"},{"line_number":94,"context_line":"            if self.process_names and not self.found_processes:"},{"line_number":95,"context_line":"                log.warn(\"\\tProcess names must be discovered to enable monitoring by process_names\")"},{"line_number":96,"context_line":"        if self.found_processes:"},{"line_number":97,"context_line":"            self.available \u003d True"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_3ae6cbb4","line":95,"range":{"start_line":95,"start_character":27,"end_line":95,"end_character":35},"updated":"2016-10-28 04:37:36.000000000","message":"At least one Process","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        if self.not_found_processes:"},{"line_number":93,"context_line":"            log.info(\"\\tDid not discover process_name(s): {0}.\".format(\",\".join(self.not_found_processes)))"},{"line_number":94,"context_line":"            if self.process_names and not self.found_processes:"},{"line_number":95,"context_line":"                log.warn(\"\\tProcess names must be discovered to enable monitoring by process_names\")"},{"line_number":96,"context_line":"        if self.found_processes:"},{"line_number":97,"context_line":"            self.available \u003d True"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_acd9b085","line":95,"range":{"start_line":95,"start_character":27,"end_line":95,"end_character":35},"in_reply_to":"ba5da102_3ae6cbb4","updated":"2016-10-28 22:50:55.000000000","message":"will do.","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"5109cdba1daaeff006712401aa23f3d95a2c0f16","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            else:"},{"line_number":104,"context_line":"                log.error(\"\\tMissing required component dimension, when monitoring by process_username.\")"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def monitor_by_process_name(self, process_name, exact_match\u003dTrue, detailed\u003dTrue, dimensions\u003dNone):"},{"line_number":107,"context_line":"        config \u003d monasca_setup.agent_config.Plugins()"},{"line_number":108,"context_line":"        instance \u003d {\u0027name\u0027: process_name,"},{"line_number":109,"context_line":"                    \u0027detailed\u0027: detailed,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_bae81b7e","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":31},"updated":"2016-10-28 04:37:36.000000000","message":"Is this a public or private method?","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a4af4f40e8d941acfb363c94992b1dc260bc8183","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            else:"},{"line_number":104,"context_line":"                log.error(\"\\tMissing required component dimension, when monitoring by process_username.\")"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def monitor_by_process_name(self, process_name, exact_match\u003dTrue, detailed\u003dTrue, dimensions\u003dNone):"},{"line_number":107,"context_line":"        config \u003d monasca_setup.agent_config.Plugins()"},{"line_number":108,"context_line":"        instance \u003d {\u0027name\u0027: process_name,"},{"line_number":109,"context_line":"                    \u0027detailed\u0027: detailed,"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_cce8a413","line":106,"range":{"start_line":106,"start_character":8,"end_line":106,"end_character":31},"in_reply_to":"ba5da102_bae81b7e","updated":"2016-10-28 22:50:55.000000000","message":"Private, will change","commit_id":"a1af34085d3c1679d40934ebe8d827ff2abc2bcc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        elif self.process_config:"},{"line_number":57,"context_line":"            self._init_from_json_data(self.process_config)"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            log.error(\"\\tMissing configuration.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _init_from_json_data(self, json_data):"},{"line_number":62,"context_line":"        if \u0027process_names\u0027 in json_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_766aa2b4","line":59,"range":{"start_line":59,"start_character":16,"end_line":59,"end_character":21},"updated":"2016-11-02 14:02:52.000000000","message":"what am i missing? If i was new to this I would be okay what should i pass in","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"e625a00d80fc88dc76549e448b47d993da91c111","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        elif self.process_config:"},{"line_number":57,"context_line":"            self._init_from_json_data(self.process_config)"},{"line_number":58,"context_line":"        else:"},{"line_number":59,"context_line":"            log.error(\"\\tMissing configuration.\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def _init_from_json_data(self, json_data):"},{"line_number":62,"context_line":"        if \u0027process_names\u0027 in json_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_f164f1b9","line":59,"range":{"start_line":59,"start_character":16,"end_line":59,"end_character":21},"in_reply_to":"ba5da102_766aa2b4","updated":"2016-11-02 17:33:15.000000000","message":"Hmmm, not sure what you are asking, This means no args at all were passed in, and they must be passed in.  I could make the error message clearer.  It used to be a warning, but changed it to error from another review.","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                if \u0027process_config\u0027 in data:"},{"line_number":76,"context_line":"                    self._init_from_json_data(data[\u0027process_config\u0027])"},{"line_number":77,"context_line":"                else:"},{"line_number":78,"context_line":"                    log.error(\"\\tInvalid format yaml file, missing key: process_config\")"},{"line_number":79,"context_line":"            except yaml.YAMLError as e:"},{"line_number":80,"context_line":"                exception_msg \u003d (\"Could not read config file. Invalid yaml format detected. {0}.\".format(e))"},{"line_number":81,"context_line":"                raise Exception(exception_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_b6c6fa65","line":78,"range":{"start_line":78,"start_character":66,"end_line":78,"end_character":67},"updated":"2016-11-02 14:02:52.000000000","message":"weird that this is a error and below is an exception isnt it the same behavior you can not parse or read the yaml file?","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"e625a00d80fc88dc76549e448b47d993da91c111","unresolved":false,"context_lines":[{"line_number":75,"context_line":"                if \u0027process_config\u0027 in data:"},{"line_number":76,"context_line":"                    self._init_from_json_data(data[\u0027process_config\u0027])"},{"line_number":77,"context_line":"                else:"},{"line_number":78,"context_line":"                    log.error(\"\\tInvalid format yaml file, missing key: process_config\")"},{"line_number":79,"context_line":"            except yaml.YAMLError as e:"},{"line_number":80,"context_line":"                exception_msg \u003d (\"Could not read config file. Invalid yaml format detected. {0}.\".format(e))"},{"line_number":81,"context_line":"                raise Exception(exception_msg)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_31ae6998","line":78,"range":{"start_line":78,"start_character":66,"end_line":78,"end_character":67},"in_reply_to":"ba5da102_b6c6fa65","updated":"2016-11-02 17:33:15.000000000","message":"This is because we are requireing a \u0027process_config\u0027 key.  This would not generate a yaml exception.  A yaml exception is caused by invalid yaml syntax","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                self.not_found_processes.append(process)"},{"line_number":95,"context_line":"        # monitoring by process_names"},{"line_number":96,"context_line":"        if self.not_found_processes:"},{"line_number":97,"context_line":"            log.info(\"\\tDid not discover process_name(s): {0}.\".format(\",\".join(self.not_found_processes)))"},{"line_number":98,"context_line":"            if self.process_names and not self.found_processes:"},{"line_number":99,"context_line":"                log.warn(\"\\tAt least one process name must be discovered to enable monitoring by process_names\")"},{"line_number":100,"context_line":"        if self.found_processes:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_b618ba1f","line":97,"range":{"start_line":97,"start_character":31,"end_line":97,"end_character":32},"updated":"2016-11-02 14:02:52.000000000","message":"skipping configuration of them? (maybe include that in the plugin)","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"e625a00d80fc88dc76549e448b47d993da91c111","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                self.not_found_processes.append(process)"},{"line_number":95,"context_line":"        # monitoring by process_names"},{"line_number":96,"context_line":"        if self.not_found_processes:"},{"line_number":97,"context_line":"            log.info(\"\\tDid not discover process_name(s): {0}.\".format(\",\".join(self.not_found_processes)))"},{"line_number":98,"context_line":"            if self.process_names and not self.found_processes:"},{"line_number":99,"context_line":"                log.warn(\"\\tAt least one process name must be discovered to enable monitoring by process_names\")"},{"line_number":100,"context_line":"        if self.found_processes:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_31858906","line":97,"range":{"start_line":97,"start_character":31,"end_line":97,"end_character":32},"in_reply_to":"ba5da102_b618ba1f","updated":"2016-11-02 17:33:15.000000000","message":"Yes this error message means the processes were not found so we are skipping the ones here.  There might have been some processes in the list that were ok, so we still configure for those.","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if self.found_processes:"},{"line_number":101,"context_line":"            self.available \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        # monitoring by process_username requires a component dimension"},{"line_number":104,"context_line":"        if self.process_username:"},{"line_number":105,"context_line":"            if \u0027component\u0027 in self.dimensions:"},{"line_number":106,"context_line":"                self.available \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_f6d15258","line":103,"range":{"start_line":103,"start_character":10,"end_line":103,"end_character":20},"updated":"2016-11-02 14:02:52.000000000","message":"if both are set what is the behavior in your plugin i think it will create separate instances right?","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"36f6f728c6f5628a9ee8aded397ea7e6bd54253d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if self.found_processes:"},{"line_number":101,"context_line":"            self.available \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        # monitoring by process_username requires a component dimension"},{"line_number":104,"context_line":"        if self.process_username:"},{"line_number":105,"context_line":"            if \u0027component\u0027 in self.dimensions:"},{"line_number":106,"context_line":"                self.available \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_6f8de77a","line":103,"range":{"start_line":103,"start_character":10,"end_line":103,"end_character":20},"in_reply_to":"ba5da102_d1b7edd5","updated":"2016-11-07 00:56:16.000000000","message":"You can set both by creating another dictionary entry in the process_config list.  I looked at combining, but there are different rules for the component dimension making it hard to combine.  Also the check has logic for one or the other in each instance.","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"e625a00d80fc88dc76549e448b47d993da91c111","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        if self.found_processes:"},{"line_number":101,"context_line":"            self.available \u003d True"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        # monitoring by process_username requires a component dimension"},{"line_number":104,"context_line":"        if self.process_username:"},{"line_number":105,"context_line":"            if \u0027component\u0027 in self.dimensions:"},{"line_number":106,"context_line":"                self.available \u003d True"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_d1b7edd5","line":103,"range":{"start_line":103,"start_character":10,"end_line":103,"end_character":20},"in_reply_to":"ba5da102_f6d15258","updated":"2016-11-02 17:33:15.000000000","message":"Yes it will, That is how it works today.","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":156,"context_line":"                                                           dimensions\u003dself.dimensions))"},{"line_number":157,"context_line":"        return config"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"    def dependencies_installed(self):"},{"line_number":160,"context_line":"        \"\"\"Return True if dependencies are installed."},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"        \"\"\""},{"line_number":163,"context_line":"        return True"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_d69a8e6d","line":163,"range":{"start_line":159,"start_character":0,"end_line":163,"end_character":19},"updated":"2016-11-02 14:02:52.000000000","message":"i think you can take this out i dont believe it gets called. To be honest i wonder if we take it out of the super class since we dont call it besides within the plugins. We can address that in another review tho","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"}],"monasca_setup/main.py":[{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"1185543ad1b39cef3772405ba0a7c7e27c1228fe","unresolved":false,"context_lines":[{"line_number":298,"context_line":"    \"\"\""},{"line_number":299,"context_line":"    plugin_config \u003d agent_config.Plugins()"},{"line_number":300,"context_line":"    if detection_args_json:"},{"line_number":301,"context_line":"        json_data \u003d json.loads(detection_args_json)"},{"line_number":302,"context_line":"    for detect_class in plugins:"},{"line_number":303,"context_line":"        # todo add option to install dependencies"},{"line_number":304,"context_line":"        if detection_args_json:"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba5da102_b6ab5a74","line":301,"range":{"start_line":301,"start_character":25,"end_line":301,"end_character":30},"updated":"2016-11-02 14:02:52.000000000","message":"should we have a try catch around this for ValueError","commit_id":"84e027b5e624d41d7d681ee2c00e111b5155262c"}],"tests/detection/test_process_check.py":[{"author":{"_account_id":18179,"name":"Kaiyan Sheng","email":"kaiyan.sheng@hpe.com","username":"kaiyan-sheng"},"change_message_id":"5d4bd3cc71cd9f77f6614fb4e4eb9f7ceffc8ed7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertEqual(result[\u0027process\u0027][\u0027instances\u0027][0][\u0027search_string\u0027][0],"},{"line_number":88,"context_line":"                         \u0027monasca-api\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_build_config_process_username(self):"},{"line_number":91,"context_line":"        self.proc_plugin.process_config \u003d {\u0027process_username\u0027: \u0027dbadmin\u0027, \u0027dimensions\u0027: {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027vertica\u0027}}"},{"line_number":92,"context_line":"        self.proc_plugin._get_config()"},{"line_number":93,"context_line":"        self.proc_plugin.found_processes \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a8bc5a2_824d139c","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":49},"updated":"2016-09-26 23:08:28.000000000","message":"You can also add some negative tests for example test_build_config_process_username_without_component_dimension","commit_id":"90d2fbc7d08e9171e2be57699e116bf48f9ef80b"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"a15c60596eeac097dc33541c245cf24df4d2ca8e","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.assertEqual(result[\u0027process\u0027][\u0027instances\u0027][0][\u0027search_string\u0027][0],"},{"line_number":88,"context_line":"                         \u0027monasca-api\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def test_build_config_process_username(self):"},{"line_number":91,"context_line":"        self.proc_plugin.process_config \u003d {\u0027process_username\u0027: \u0027dbadmin\u0027, \u0027dimensions\u0027: {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027vertica\u0027}}"},{"line_number":92,"context_line":"        self.proc_plugin._get_config()"},{"line_number":93,"context_line":"        self.proc_plugin.found_processes \u003d []"}],"source_content_type":"text/x-python","patch_set":4,"id":"3a98d1f4_3717df52","line":90,"range":{"start_line":90,"start_character":4,"end_line":90,"end_character":49},"in_reply_to":"5a8bc5a2_824d139c","updated":"2016-09-28 15:35:25.000000000","message":"build_config would not be called if the component arg is missing for process_username, because _detect would not set self.available\u003dTrue.","commit_id":"90d2fbc7d08e9171e2be57699e116bf48f9ef80b"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"80c909216ca36352460657e8da977eb86731a29d","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            if by_process_name:"},{"line_number":52,"context_line":"                self.assertTrue(mock_process_iter.called)"},{"line_number":53,"context_line":"            self.assertFalse(mock_isfile.called)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def test_detect_process_not_found(self):"},{"line_number":56,"context_line":"        PSUtilGetProc.cmdLine \u003d []"},{"line_number":57,"context_line":"        self.proc_plugin.process_config \u003d [{\u0027process_names\u0027: [\u0027monasca-api\u0027], \u0027dimensions\u0027: {\u0027service\u0027: \u0027monitoring\u0027}}]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a629dbe_e5357846","line":54,"updated":"2016-11-08 18:46:51.000000000","message":"Should there be a test for reading from the yaml file?","commit_id":"782280cf300b1ec6f612b77e75cd5b25e274349c"}]}
