)]}'
{"conf.d/process.yaml.example":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":6,"context_line":"               only the process.pid_count metric is returned."},{"line_number":7,"context_line":"#    search_string: (required if user is not set) LIST OF STRINGS. If one of the elements in the list matches,"},{"line_number":8,"context_line":"#                    return the counter of all the processes that contain the string"},{"line_number":9,"context_line":"#    user: (required if search_string is not set) STRING. Will grab all processes owned by this user."},{"line_number":10,"context_line":"#    exact_match: (optional) Boolean. Default to True, if you want to look for an arbitrary"},{"line_number":11,"context_line":"#                 string, use exact_match: False"},{"line_number":12,"context_line":"#"}],"source_content_type":"application/octet-stream","patch_set":6,"id":"da6ed579_bdc4005f","line":9,"range":{"start_line":9,"start_character":5,"end_line":9,"end_character":9},"updated":"2016-01-13 19:52:39.000000000","message":"Would a better name be \u0027username\u0027?\n\nMaybe (optional if search_string set, otherwise required) is a little clearer.","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"}],"docs/Plugins.md":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":514,"context_line":"Also in the case of an error the value_meta contains an error message."},{"line_number":515,"context_line":""},{"line_number":516,"context_line":"## Process Checks"},{"line_number":517,"context_line":"Process checks can be performed to both verify that a set of named processes are running on the local system and grab system level metrics on those processes. The YAML file `process.yaml` contains the list of processes that are checked. "},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"The processes can be identified using a pattern match (which has the option for exact match on the process name) or by user that owns the process."},{"line_number":520,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"da6ed579_9dc57c3d","line":517,"range":{"start_line":517,"start_character":113,"end_line":517,"end_character":117},"updated":"2016-01-13 19:52:39.000000000","message":"collect/send instead of grab","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":516,"context_line":"## Process Checks"},{"line_number":517,"context_line":"Process checks can be performed to both verify that a set of named processes are running on the local system and grab system level metrics on those processes. The YAML file `process.yaml` contains the list of processes that are checked. "},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"The processes can be identified using a pattern match (which has the option for exact match on the process name) or by user that owns the process."},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"A Python script `process.py` runs each execution cycle to check that required processes are alive. If the process is running a value of 0 is sent, otherwise a value of 1 is sent to the Monasca API."},{"line_number":522,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"da6ed579_5d2ce401","line":519,"range":{"start_line":519,"start_character":21,"end_line":519,"end_character":31},"updated":"2016-01-13 19:52:39.000000000","message":"The processes that are monitored can be filtered using a pattern to specify the matching process names or distinctly identified by process name or by the username that owns the process.","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":520,"context_line":""},{"line_number":521,"context_line":"A Python script `process.py` runs each execution cycle to check that required processes are alive. If the process is running a value of 0 is sent, otherwise a value of 1 is sent to the Monasca API."},{"line_number":522,"context_line":""},{"line_number":523,"context_line":"Each process entry consists of one primary key: name. Besides that either search_string or user must be set. Optionally, if an exact match on name is required and the search_string is being used, the exact_match boolean can be added to the entry and set to True."},{"line_number":524,"context_line":""},{"line_number":525,"context_line":"To grab more process metrics beside the process.pid_count, which only shows that the process is up and running, the configuration option detailed must be set to true."},{"line_number":526,"context_line":""}],"source_content_type":"text/x-markdown","patch_set":6,"id":"da6ed579_fd5a784f","line":523,"range":{"start_line":523,"start_character":142,"end_line":523,"end_character":146},"updated":"2016-01-13 19:52:39.000000000","message":"Optionally, if an exact match on the username and a search_string is specified","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"}],"monasca_agent/collector/checks_d/process.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"be4060434d1b5d6a0fe46fbbb4211034f530531e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                for string in search_string:"},{"line_number":53,"context_line":"                    try:"},{"line_number":54,"context_line":"                        if search_string is not None:"},{"line_number":55,"context_line":"                            if exact_match:"},{"line_number":56,"context_line":"                                if proc.name() \u003d\u003d string:"},{"line_number":57,"context_line":"                                    found \u003d True"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_cb1765a1","line":54,"range":{"start_line":54,"start_character":27,"end_line":54,"end_character":40},"updated":"2016-01-11 21:24:02.000000000","message":"did you mean this to be \u0027string\u0027? if not this check should probably happen outside the loop.","commit_id":"5922f95b093bfb7c7a34d02d551139289696d795"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"be4060434d1b5d6a0fe46fbbb4211034f530531e","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"                            if found or string \u003d\u003d \u0027All\u0027:"},{"line_number":64,"context_line":"                                found_process_list.append(proc.pid)"},{"line_number":65,"context_line":"                        if user is not None:"},{"line_number":66,"context_line":"                            if proc.username() \u003d\u003d user:"},{"line_number":67,"context_line":"                                found_process_list.append(proc.pid)"},{"line_number":68,"context_line":"                    except psutil.NoSuchProcess:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_0b71fd0b","line":65,"range":{"start_line":65,"start_character":27,"end_line":65,"end_character":31},"updated":"2016-01-11 21:24:02.000000000","message":"Should this be inside the loop? It\u0027s already handled above.","commit_id":"5922f95b093bfb7c7a34d02d551139289696d795"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"d4b4345693d4c38d8bfce13f10514f4d60ba202c","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"                            if found or string \u003d\u003d \u0027All\u0027:"},{"line_number":64,"context_line":"                                found_process_list.append(proc.pid)"},{"line_number":65,"context_line":"                        if user is not None:"},{"line_number":66,"context_line":"                            if proc.username() \u003d\u003d user:"},{"line_number":67,"context_line":"                                found_process_list.append(proc.pid)"},{"line_number":68,"context_line":"                    except psutil.NoSuchProcess:"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_5666bced","line":65,"range":{"start_line":65,"start_character":27,"end_line":65,"end_character":31},"in_reply_to":"fa69d971_0b71fd0b","updated":"2016-01-11 21:28:19.000000000","message":"good catch left some logic in there i had before. need to fix them","commit_id":"5922f95b093bfb7c7a34d02d551139289696d795"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        except Exception:"},{"line_number":34,"context_line":"            return False"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    def find_pids(self, search_string, psutil, user, exact_match\u003dTrue):"},{"line_number":37,"context_line":"        \"\"\"Create a set of pids of selected processes."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        Search for search_string"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_5d32a411","line":36,"range":{"start_line":36,"start_character":47,"end_line":36,"end_character":51},"updated":"2016-01-13 19:52:39.000000000","message":"username","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            found \u003d False"},{"line_number":44,"context_line":"            if user is not None:"},{"line_number":45,"context_line":"                try:"},{"line_number":46,"context_line":"                    if proc.username() \u003d\u003d user:"},{"line_number":47,"context_line":"                        found_process_list.append(proc.pid)"},{"line_number":48,"context_line":"                except psutil.NoSuchProcess:"},{"line_number":49,"context_line":"                    # No way to log useful information here so just move on"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_5d194487","line":46,"range":{"start_line":46,"start_character":42,"end_line":46,"end_character":46},"updated":"2016-01-13 19:52:39.000000000","message":"username","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                except psutil.NoSuchProcess:"},{"line_number":49,"context_line":"                    # No way to log useful information here so just move on"},{"line_number":50,"context_line":"                    pass"},{"line_number":51,"context_line":"            else:"},{"line_number":52,"context_line":"                for string in search_string:"},{"line_number":53,"context_line":"                    try:"},{"line_number":54,"context_line":"                        if exact_match:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_f81cc614","line":51,"range":{"start_line":51,"start_character":12,"end_line":51,"end_character":16},"updated":"2016-01-13 19:52:39.000000000","message":"The way this code is written it either does the username test or it does the process name search_string test. But, it doesn\u0027t do both, if both are enabled, which doesn\u0027t match the documentation.\n\nThe documentation implies you have to do one or both, but you can\u0027t do none.\n\nAlthough, if you left both arguments as just optional, then that seems like it could be a valid setting, just nothing would every match.","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    except psutil.NoSuchProcess:"},{"line_number":65,"context_line":"                        # No way to log useful information here so just move on"},{"line_number":66,"context_line":"                        pass"},{"line_number":67,"context_line":"                    except psutil.AccessDenied as e:"},{"line_number":68,"context_line":"                        self.log.error(\u0027Access denied to %s process\u0027 % string)"},{"line_number":69,"context_line":"                        self.log.error(\u0027Error: %s\u0027 % e)"},{"line_number":70,"context_line":"                        raise"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_f8cda65d","line":67,"range":{"start_line":67,"start_character":20,"end_line":67,"end_character":26},"updated":"2016-01-13 19:52:39.000000000","message":"Should this exception also be added to the above code?","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"d76cabbe89f483697b960e7b92f0b72393e8135b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        found_process_list \u003d []"},{"line_number":42,"context_line":"        for proc in self._current_process_list:"},{"line_number":43,"context_line":"            found \u003d False"},{"line_number":44,"context_line":"            if username is not None:"},{"line_number":45,"context_line":"                try:"},{"line_number":46,"context_line":"                    if proc.username() \u003d\u003d username:"},{"line_number":47,"context_line":"                        found_process_list.append(proc.pid)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da6ed579_aeeda4f0","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":36},"updated":"2016-01-13 20:31:35.000000000","message":"This if should be inside the try catch, then you won\u0027t four catches with two each duplicated.","commit_id":"bed40f31fb8a6a9bbe95dee396e187b28c6912f6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"d76cabbe89f483697b960e7b92f0b72393e8135b","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    self.log.error(\u0027Error: %s\u0027 % e)"},{"line_number":54,"context_line":"                    raise"},{"line_number":55,"context_line":"            else:"},{"line_number":56,"context_line":"                for string in search_string:"},{"line_number":57,"context_line":"                    try:"},{"line_number":58,"context_line":"                        if exact_match:"},{"line_number":59,"context_line":"                            if proc.name() \u003d\u003d string:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da6ed579_aec4c45e","line":56,"range":{"start_line":56,"start_character":0,"end_line":56,"end_character":44},"updated":"2016-01-13 20:31:35.000000000","message":"found is only used inside this loop so it should be set to false inside here","commit_id":"bed40f31fb8a6a9bbe95dee396e187b28c6912f6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"d76cabbe89f483697b960e7b92f0b72393e8135b","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                                found \u003d True"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"                        if found or string \u003d\u003d \u0027All\u0027:"},{"line_number":67,"context_line":"                            found_process_list.append(proc.pid)"},{"line_number":68,"context_line":"                    except psutil.NoSuchProcess:"},{"line_number":69,"context_line":"                        # No way to log useful information here so just move on"},{"line_number":70,"context_line":"                        pass"}],"source_content_type":"text/x-python","patch_set":7,"id":"da6ed579_ee915c53","line":67,"range":{"start_line":67,"start_character":47,"end_line":67,"end_character":53},"updated":"2016-01-13 20:31:35.000000000","message":"If search_string is set up funny, this process could be found twice. Maybe there should be a break after the append?","commit_id":"bed40f31fb8a6a9bbe95dee396e187b28c6912f6"}],"monasca_setup/detection/utils.py":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"42ace3ea8533d6c91fcca919c456645d780971fd","unresolved":false,"context_lines":[{"line_number":88,"context_line":"    return config"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"def watch_process_by_user(user, process_name, service\u003dNone, component\u003dNone, detailed\u003dFalse):"},{"line_number":92,"context_line":"    \"\"\"Takes a user and returns a Plugins object with the config set for a process check by user."},{"line_number":93,"context_line":"        This was built as a helper as many plugins setup process watching."},{"line_number":94,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"da6ed579_d8f9c281","line":91,"range":{"start_line":91,"start_character":4,"end_line":91,"end_character":25},"updated":"2016-01-13 19:52:39.000000000","message":"username","commit_id":"af54109b71136ac9c0b55d200722d92b85e6c955"},{"author":{"_account_id":12133,"name":"Cindy O\u0027Neill","email":"cindy.o-neill@hpe.com","username":"oneilcin"},"change_message_id":"ac63e2eda82eb683fe0b14d6e70546f9a88337d5","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                         \u0027instances\u0027: [parameters]}"},{"line_number":107,"context_line":"    return config"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def service_api_check(name, url, pattern, service\u003dNone, component\u003dNone):"},{"line_number":111,"context_line":"    \"\"\"Setup a service api to be watched by the http_check plugin."},{"line_number":112,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_ea8f3521","line":109,"updated":"2016-01-21 16:35:32.000000000","message":"Didn\u0027t see where this is used.","commit_id":"69d9aa33da998f002a95a0f632af6633624653cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"d628bb030ef2ce1dc8b40326dd40ece699a6d8d2","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                         \u0027instances\u0027: [parameters]}"},{"line_number":107,"context_line":"    return config"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def service_api_check(name, url, pattern, service\u003dNone, component\u003dNone):"},{"line_number":111,"context_line":"    \"\"\"Setup a service api to be watched by the http_check plugin."},{"line_number":112,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"9a68dd71_8a7319e7","line":109,"in_reply_to":"9a68dd71_ea8f3521","updated":"2016-01-21 16:40:22.000000000","message":"see https://review.openstack.org/#/c/270875/","commit_id":"69d9aa33da998f002a95a0f632af6633624653cc"}]}
