)]}'
{"docs/Plugins.md":[{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":118,"context_line":""},{"line_number":119,"context_line":"| Setup Plugin Name | Dot File  | Detail                 |"},{"line_number":120,"context_line":"| ----------------- | --------- | ---------------------- |"},{"line_number":121,"context_line":"| a10_system_check |  |  |"},{"line_number":122,"context_line":"| apache | /root/.apache.cnf | Apache web server |"},{"line_number":123,"context_line":"| cacti |  |  |"},{"line_number":124,"context_line":"| cert_check |  |  |"}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_5a3c8d93","line":121,"updated":"2017-01-19 14:57:34.000000000","message":"maybe \u0027a10\u0027 or \u0027a10_lb\u0027?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"| Detection Plugin Name | Type                 |"},{"line_number":292,"context_line":"| --------------------- | ---------------------- |"},{"line_number":293,"context_line":"| a10_system_check | Plugin |"},{"line_number":294,"context_line":"| apache | Plugin |"},{"line_number":295,"context_line":"| barbican | ServicePlugin |"},{"line_number":296,"context_line":"| bind | Plugin |"}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_1ae5a536","line":293,"updated":"2017-01-19 14:57:34.000000000","message":"i don\u0027t think we\u0027re providing a detection plugin, nor do i think that makes sense in this case, so I think you can remove this","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":290,"context_line":""},{"line_number":291,"context_line":"| Detection Plugin Name | Type                 |"},{"line_number":292,"context_line":"| --------------------- | ---------------------- |"},{"line_number":293,"context_line":"| a10_system_check | Plugin |"},{"line_number":294,"context_line":"| apache | Plugin |"},{"line_number":295,"context_line":"| barbican | ServicePlugin |"},{"line_number":296,"context_line":"| bind | Plugin |"}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_66b5e2ec","line":293,"in_reply_to":"5a3905b3_1ae5a536","updated":"2017-01-20 20:21:25.000000000","message":"Why does it make sense to not have a detection plugin?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"| Metric Name | Dimensions | Semantics |"},{"line_number":460,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":461,"context_line":"| a10.memory.total |  | Total memory listed out in Kilobytes"},{"line_number":462,"context_line":"| a10.memory.used |  | Memory used listed out in Kilobytes"},{"line_number":463,"context_line":"| a10.memory.free |  | Free memory listed out in Kilobytes"},{"line_number":464,"context_line":"| a10.memory.percentage |  | Percentage of memory listed out in Gigabytes"}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_badd7172","line":461,"updated":"2017-01-19 14:57:34.000000000","message":"see comment in python code about naming these so KB/GB is obvious in the name...","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"| Metric Name | Dimensions | Semantics |"},{"line_number":460,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":461,"context_line":"| a10.memory.total |  | Total memory listed out in Kilobytes"},{"line_number":462,"context_line":"| a10.memory.used |  | Memory used listed out in Kilobytes"},{"line_number":463,"context_line":"| a10.memory.free |  | Free memory listed out in Kilobytes"},{"line_number":464,"context_line":"| a10.memory.percentage |  | Percentage of memory listed out in Gigabytes"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"## Apache"},{"line_number":467,"context_line":"This section describes the Apache Web Server check that can be performed by the Agent.  The Apache check gathers metrics on the Apache Web Server.  The Apache check requires a configuration file called apache.yaml to be available in the agent conf.d configuration directory.  The config file must contain the server url, username and password (If you are using authentication) that you are interested in monitoring."}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_e66392da","line":464,"range":{"start_line":461,"start_character":0,"end_line":464,"end_character":73},"updated":"2017-01-20 20:21:25.000000000","message":"All of these should be have an _ instead of . after memory to be consistent with other Monasca metrics","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":461,"context_line":"| a10.memory.total |  | Total memory listed out in Kilobytes"},{"line_number":462,"context_line":"| a10.memory.used |  | Memory used listed out in Kilobytes"},{"line_number":463,"context_line":"| a10.memory.free |  | Free memory listed out in Kilobytes"},{"line_number":464,"context_line":"| a10.memory.percentage |  | Percentage of memory listed out in Gigabytes"},{"line_number":465,"context_line":""},{"line_number":466,"context_line":"## Apache"},{"line_number":467,"context_line":"This section describes the Apache Web Server check that can be performed by the Agent.  The Apache check gathers metrics on the Apache Web Server.  The Apache check requires a configuration file called apache.yaml to be available in the agent conf.d configuration directory.  The config file must contain the server url, username and password (If you are using authentication) that you are interested in monitoring."}],"source_content_type":"text/x-markdown","patch_set":6,"id":"5a3905b3_a6b0aa44","line":464,"range":{"start_line":464,"start_character":64,"end_line":464,"end_character":73},"updated":"2017-01-20 20:21:25.000000000","message":"How can a percentage be in Gigabytes?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8e0af7250b4d66c7bfc8b64cb161e177d2bf51c2","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"| Metric Name | Dimensions | Semantics |"},{"line_number":460,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":461,"context_line":"| a10.memory_total_kbytes |  | Total memory presented in kbytes"},{"line_number":462,"context_line":"| a10.memory_used_kbytes |  | Memory used presented in kbytes"},{"line_number":463,"context_line":"| a10.memory_free_kbytes |  | Free memory presented in kbytes"},{"line_number":464,"context_line":"| a10.memory_percentage |  | Percentage of memory"}],"source_content_type":"text/x-markdown","patch_set":7,"id":"3a461143_d0a06093","line":461,"range":{"start_line":461,"start_character":27,"end_line":461,"end_character":28},"updated":"2017-01-26 00:46:07.000000000","message":"The code adds a hostname dimension so it should be documented here.","commit_id":"2eb2480fc5e6b3427c95f5d9dd18d8964b594b9a"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ae5e2d216a283b442504ca2243d8f6d930dc6896","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"| Metric Name | Dimensions | Semantics |"},{"line_number":460,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":461,"context_line":"| a10.memory_total_mb |  | Total memory presented in MB"},{"line_number":462,"context_line":"| a10.memory_used_mb |  | Memory used presented in  MB"},{"line_number":463,"context_line":"| a10.memory_free_mb |  | Free memory presented in MB"},{"line_number":464,"context_line":"| a10.memory_used |  | Realtime Memory Usage"}],"source_content_type":"text/x-markdown","patch_set":12,"id":"3a461143_f70a1225","line":461,"range":{"start_line":461,"start_character":24,"end_line":461,"end_character":25},"updated":"2017-01-31 02:07:30.000000000","message":"The code adds service and a10_device dimensions so that should be documented here.","commit_id":"aa9d592c4a994f2846b8e507640f2e5e0d775e3f"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"14b27ba4de85549a7f39c762af4051ec9e4c59f7","unresolved":false,"context_lines":[{"line_number":462,"context_line":"| a10.memory_used_mb |  | Memory used presented in  MB"},{"line_number":463,"context_line":"| a10.memory_free_mb |  | Free memory presented in MB"},{"line_number":464,"context_line":"| a10.memory_used |  | Realtime Memory Usage"},{"line_number":465,"context_line":"| a10.device  |  | A10 Device IP"},{"line_number":466,"context_line":"| a10.service |  | A10 Networking Service"},{"line_number":467,"context_line":""},{"line_number":468,"context_line":"## Apache"},{"line_number":469,"context_line":"This section describes the Apache Web Server check that can be performed by the Agent.  The Apache check gathers metrics on the Apache Web Server.  The Apache check requires a configuration file called apache.yaml to be available in the agent conf.d configuration directory.  The config file must contain the server url, username and password (If you are using authentication) that you are interested in monitoring."}],"source_content_type":"text/x-markdown","patch_set":13,"id":"3a461143_8119487c","line":466,"range":{"start_line":465,"start_character":0,"end_line":466,"end_character":41},"updated":"2017-02-01 15:18:14.000000000","message":"a10_device and service are dimensions. They go in the middle column of the table for the first four rows which are the metrics output by this plugin. Look at how the table is filled in for other plugins to get an idea of its format.","commit_id":"632add21ba3857e3f6dea355b03e416c0ba32913"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":458,"context_line":""},{"line_number":459,"context_line":"| Metric Name | Dimensions | Semantics |"},{"line_number":460,"context_line":"| ----------- | ---------- | --------- |"},{"line_number":461,"context_line":"| a10.memory_total_mb | device, service\u003dnetworking  | Total memory presented in MB"},{"line_number":462,"context_line":"| a10.memory_used_mb |  device, service\u003dnetworking   | Memory used presented in  MB"},{"line_number":463,"context_line":"| a10.memory_free_mb |  device, service\u003dnetworking   | Free memory presented in MB"},{"line_number":464,"context_line":"| a10.memory_used |  device, service\u003dnetworking   | Realtime Memory Usage"}],"source_content_type":"text/x-markdown","patch_set":14,"id":"3a461143_d31074ae","line":461,"range":{"start_line":461,"start_character":24,"end_line":461,"end_character":30},"updated":"2017-02-01 22:29:17.000000000","message":"a10_device","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"}],"monasca_agent/collector/checks_d/a10_system_check.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":10,"context_line":"from requests.packages.urllib3.poolmanager import PoolManager"},{"line_number":11,"context_line":"import ssl"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"REQUEST_HEADER \u003d {\"content-type\": \"application/json\"}"},{"line_number":14,"context_line":"urllib3.disable_warnings()"},{"line_number":15,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":16,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_a64c2a43","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":14},"updated":"2017-01-20 20:21:25.000000000","message":"Is this a constant? It seems to be changed in get_memory_stats","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":11,"context_line":"import ssl"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"REQUEST_HEADER \u003d {\"content-type\": \"application/json\"}"},{"line_number":14,"context_line":"urllib3.disable_warnings()"},{"line_number":15,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_f7fc7440","line":14,"updated":"2017-01-19 14:57:34.000000000","message":"i\u0027m thinking we shouldn\u0027t disable warnings, but instead if we get ssl warnings, log as WARN?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":26,"context_line":"class A10Session(object):"},{"line_number":27,"context_line":"    \"\"\" Gets Memory Statistics from the A10 Load Balancers."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    The data the is returned from the A10 is in kilobytes\"\"\""},{"line_number":30,"context_line":"    def __init__(self, device, username, passwd, ssl):"},{"line_number":31,"context_line":"        self.device \u003d device"},{"line_number":32,"context_line":"        self.username \u003d username"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_57c1c8e3","line":29,"updated":"2017-01-19 14:57:34.000000000","message":"seems like these comments should be closer to where the metrics are gathered?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        super(A10MemoryCheck, self).__init__(name, init_config, agent_config)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"    def check(self, instance):"},{"line_number":56,"context_line":"        dimensions \u003d self._set_dimensions(None, instance)"},{"line_number":57,"context_line":"        a10_device \u003d instance.get(\"a10_device\")"},{"line_number":58,"context_line":"        username \u003d instance.get(\u0027a10_username\u0027)"},{"line_number":59,"context_line":"        password \u003d instance.get(\u0027a10_password\u0027)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_17d90022","line":56,"updated":"2017-01-19 14:57:34.000000000","message":"I think we should use base dimensions, which sets region, hostname, etc.","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        try:"},{"line_number":64,"context_line":"            memory_data \u003d self.get_memory_stats(a10_device)"},{"line_number":65,"context_line":"            for key, value in memory_data.items():"},{"line_number":66,"context_line":"                print (key, value)"},{"line_number":67,"context_line":"                self.gauge(key, value, {\u0027hostname\u0027: a10_device}, dimensions)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_06009ea9","line":66,"range":{"start_line":66,"start_character":16,"end_line":66,"end_character":21},"updated":"2017-01-20 20:21:25.000000000","message":"Remove this line","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"0b13817f115b0016819157cc18c9e4f1970bb709","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                self.gauge(key, value, {\u0027hostname\u0027: a10_device}, dimensions)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            log.exception(e)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        finally:"},{"line_number":73,"context_line":"            authed_session.log_out(self.auth_sig)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_a6c50a8f","line":70,"range":{"start_line":70,"start_character":12,"end_line":70,"end_character":15},"updated":"2017-01-20 20:21:25.000000000","message":"Use self.log. That is inherited from checks.AgentCheck","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"cca35fddc8023be9ec337376e9a73274b91b1beb","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            request \u003d requests.get(url\u003durl, headers\u003dREQUEST_HEADER, verify\u003dFalse)"},{"line_number":81,"context_line":"            data \u003d request.json()"},{"line_number":82,"context_line":"            percent \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Usage\u0027]"},{"line_number":83,"context_line":"            memory_data.update({\u0027a10.memory.total\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Total\u0027]})"},{"line_number":84,"context_line":"            memory_data.update({\u0027a10.memory.used\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Used\u0027]})"},{"line_number":85,"context_line":"            memory_data.update({\u0027a10.memory.free\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Free\u0027]})"},{"line_number":86,"context_line":"            memory_data.update({\u0027a10.memory.percentage\u0027: percent[:4]})"}],"source_content_type":"text/x-python","patch_set":6,"id":"5a3905b3_f72f149f","line":83,"updated":"2017-01-19 14:57:34.000000000","message":"many metric names attempt to be self explanatory -- in terms of KB, MB, etc. (io.read_kbytes_sec, vm.mem.total_mb..).  the names of these sould probably make it clear what units they are?","commit_id":"0e6ba6a146ffce17ed2a6b7694decf1c828d76ed"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8e0af7250b4d66c7bfc8b64cb161e177d2bf51c2","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        return authorization_signature"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    def log_out(self, auth_sig):"},{"line_number":44,"context_line":"        REQUEST_HEADER \u003d {\"Content-type\": \"application/json\", \"Authorization\": \"A10 %s\" % auth_sig}"},{"line_number":45,"context_line":"        url \u003d \"https://\" + self.device + \"/axapi/v3/logoff\""},{"line_number":46,"context_line":"        requests.post(url\u003durl, headers\u003dREQUEST_HEADER, verify\u003dFalse)"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a461143_10d90822","line":44,"range":{"start_line":44,"start_character":8,"end_line":44,"end_character":22},"updated":"2017-01-26 00:46:07.000000000","message":"This name being in all caps implies it is a constant. It really isn\u0027t so just use lower case. You can always have REQUEST_HEADER defined at the top level and then clone and add to it when you need the Authorization header.","commit_id":"2eb2480fc5e6b3427c95f5d9dd18d8964b594b9a"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8e0af7250b4d66c7bfc8b64cb161e177d2bf51c2","unresolved":false,"context_lines":[{"line_number":58,"context_line":"        password \u003d instance.get(\u0027a10_password\u0027)"},{"line_number":59,"context_line":"        ssl \u003d SSLHTTPAdapter"},{"line_number":60,"context_line":"        authed_session \u003d A10Session(a10_device, username, password, ssl)"},{"line_number":61,"context_line":"        self.auth_sig \u003d authed_session.get_authorization_signature()"},{"line_number":62,"context_line":"        try:"},{"line_number":63,"context_line":"            memory_data \u003d self.get_memory_stats(a10_device)"},{"line_number":64,"context_line":"            for key, value in memory_data.items():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a461143_3079a4fd","line":61,"range":{"start_line":61,"start_character":24,"end_line":61,"end_character":68},"updated":"2017-01-26 00:46:07.000000000","message":"This will fail and throw an Exception if the device is down, auth is incorrect, etc. I think you should put it inside the try","commit_id":"2eb2480fc5e6b3427c95f5d9dd18d8964b594b9a"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8e0af7250b4d66c7bfc8b64cb161e177d2bf51c2","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            self.log.exception(e)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        finally:"},{"line_number":71,"context_line":"            authed_session.log_out(self.auth_sig)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def get_memory_stats(self, a10_device):"},{"line_number":74,"context_line":"        REQUEST_HEADER \u003d {\"Content-type\": \"application/json\", \"Authorization\": \"A10 %s\" % self.auth_sig}"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a461143_d06a201a","line":71,"range":{"start_line":71,"start_character":27,"end_line":71,"end_character":34},"updated":"2017-01-26 00:46:07.000000000","message":"This could fail as well and throw an Exception","commit_id":"2eb2480fc5e6b3427c95f5d9dd18d8964b594b9a"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"8e0af7250b4d66c7bfc8b64cb161e177d2bf51c2","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            request \u003d requests.get(url\u003durl, headers\u003dREQUEST_HEADER, verify\u003dFalse)"},{"line_number":79,"context_line":"            data \u003d request.json()"},{"line_number":80,"context_line":"            percent \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Usage\u0027]"},{"line_number":81,"context_line":"            memory_data.update({\u0027a10.memory_total_kbytes\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Total\u0027]})"},{"line_number":82,"context_line":"            memory_data.update({\u0027a10.memory_used_kbytes\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Used\u0027]})"},{"line_number":83,"context_line":"            memory_data.update({\u0027a10.memory_free_kbytes\u0027: data[\u0027memory\u0027][\u0027oper\u0027][\u0027Free\u0027]})"},{"line_number":84,"context_line":"            memory_data.update({\u0027a10.memory_percentage\u0027: percent[:4]})"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a461143_700c0c95","line":81,"range":{"start_line":81,"start_character":12,"end_line":81,"end_character":92},"updated":"2017-01-26 00:46:07.000000000","message":"Why is this better than:\nmemory_data.update[\u0027a10.memory_total_kbytes\u0027] \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Total\u0027]\n\nYours is more verbose and creates more objects but has the same affect","commit_id":"2eb2480fc5e6b3427c95f5d9dd18d8964b594b9a"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"09161b3548e7414e640f1bb6a1d69b3bd8a41b7f","unresolved":false,"context_lines":[{"line_number":11,"context_line":"import ssl"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"urllib3.disable_warnings()"},{"line_number":14,"context_line":"log \u003d logging.getLogger(__name__)"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"class SSLHTTPAdapter(HTTPAdapter):"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a461143_772ae92d","line":14,"updated":"2017-01-27 18:18:38.000000000","message":"can remove since we use self.log","commit_id":"173d7d83b79d5c08362d8fba9cdcbf120b7f1620"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"09161b3548e7414e640f1bb6a1d69b3bd8a41b7f","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        a10_device \u003d instance.get(\"a10_device\")"},{"line_number":55,"context_line":"        username \u003d instance.get(\u0027a10_username\u0027)"},{"line_number":56,"context_line":"        password \u003d instance.get(\u0027a10_password\u0027)"},{"line_number":57,"context_line":"        dimensions \u003d self._set_dimensions({\u0027a10_device\u0027: a10_device})"},{"line_number":58,"context_line":"        ssl \u003d SSLHTTPAdapter"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a461143_77af4994","line":57,"updated":"2017-01-27 18:18:38.000000000","message":"i think we should add a \u0027service\u0027 dimension, could be \u0027networking\u0027 like haproxy is?","commit_id":"173d7d83b79d5c08362d8fba9cdcbf120b7f1620"},{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"09161b3548e7414e640f1bb6a1d69b3bd8a41b7f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                                                     \"Authorization\": \"A10 %s\" % self.auth_sig}, verify\u003dFalse)"},{"line_number":84,"context_line":"            data \u003d request.json()"},{"line_number":85,"context_line":"            percent \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Usage\u0027]"},{"line_number":86,"context_line":"            memory_data[\u0027a10.memory_total_kbytes\u0027] \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Total\u0027]"},{"line_number":87,"context_line":"            memory_data[\u0027a10.memory_used_kbytes\u0027] \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Used\u0027]"},{"line_number":88,"context_line":"            memory_data[\u0027a10.memory_free_kbytes\u0027] \u003d data[\u0027memory\u0027][\u0027oper\u0027][\u0027Free\u0027]"},{"line_number":89,"context_line":"            memory_data[\u0027a10.memory_percentage\u0027] \u003d  int(percent[:2])"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a461143_77b829e6","line":86,"updated":"2017-01-27 18:18:38.000000000","message":"i\u0027m now thinking these should be MB -- so we don\u0027t have to shift decimals\n\n   \"metric\":{\n      \"name\":\"a10.memory_free_kbytes\",\n      \"dimensions\":{\n         \"region\":\"BFD02\",\n         \"a10_device\":\"REDACTED\",\n         \"hostname\":\"REDACTED\",\n         \"hostrole\":\"monascadb\"\n      },\n            \"timestamp\":1485539711160,\n      \"value\":2.1390516E7\n   },","commit_id":"173d7d83b79d5c08362d8fba9cdcbf120b7f1620"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"b904c84a4e413f53061b76476aea141f2bd1443b","unresolved":false,"context_lines":[{"line_number":1,"context_line":"#!/usr/bin/python"},{"line_number":2,"context_line":""},{"line_number":3,"context_line":"import json"},{"line_number":4,"context_line":"import logging"},{"line_number":5,"context_line":"import monasca_agent.collector.checks as checks"},{"line_number":6,"context_line":"import requests"},{"line_number":7,"context_line":"import requests.adapters"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_e5d767eb","line":4,"range":{"start_line":4,"start_character":7,"end_line":4,"end_character":14},"updated":"2017-02-01 22:40:35.000000000","message":"never used","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"import json"},{"line_number":4,"context_line":"import logging"},{"line_number":5,"context_line":"import monasca_agent.collector.checks as checks"},{"line_number":6,"context_line":"import requests"},{"line_number":7,"context_line":"import requests.adapters"},{"line_number":8,"context_line":"from requests.adapters import HTTPAdapter"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_93ac2c8e","line":5,"range":{"start_line":5,"start_character":7,"end_line":5,"end_character":20},"updated":"2017-02-01 22:29:17.000000000","message":"this should be seperated out from the rest of the imports. See other checks.","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":25,"context_line":"        self.device \u003d device"},{"line_number":26,"context_line":"        self.username \u003d username"},{"line_number":27,"context_line":"        self.passwd \u003d passwd"},{"line_number":28,"context_line":"        self.ssl \u003d ssl"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def get_authorization_signature(self):"},{"line_number":31,"context_line":"        url \u003d \"https://\" + self.device + \"/axapi/v3/auth\""}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_7308a02e","line":28,"range":{"start_line":28,"start_character":13,"end_line":28,"end_character":16},"updated":"2017-02-01 22:29:17.000000000","message":"where is this used? You set it but it is never used.","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        username \u003d instance.get(\u0027a10_username\u0027)"},{"line_number":57,"context_line":"        password \u003d instance.get(\u0027a10_password\u0027)"},{"line_number":58,"context_line":"        dimensions \u003d self._set_dimensions({\u0027service\u0027: \u0027networking\u0027, \u0027a10_device\u0027: a10_device}, instance)"},{"line_number":59,"context_line":"        ssl \u003d SSLHTTPAdapter"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            authed_session \u003d A10Session(a10_device, username, password, ssl)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_d35eb478","line":59,"range":{"start_line":59,"start_character":14,"end_line":59,"end_character":28},"updated":"2017-02-01 22:29:17.000000000","message":"why do this? instead of just passing in the class in the session call. My opinion easier to follow","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        ssl \u003d SSLHTTPAdapter"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"        try:"},{"line_number":62,"context_line":"            authed_session \u003d A10Session(a10_device, username, password, ssl)"},{"line_number":63,"context_line":"            self.auth_sig \u003d authed_session.get_authorization_signature()"},{"line_number":64,"context_line":"        except Exception as e:"},{"line_number":65,"context_line":"            self.log.exception(e)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_13d03cc9","line":62,"range":{"start_line":62,"start_character":72,"end_line":62,"end_character":75},"updated":"2017-02-01 22:29:17.000000000","message":"actually,l why is this configurable. doesnt seem to change based on the instance can you not just use that class in the A10Session class?","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":62,"context_line":"            authed_session \u003d A10Session(a10_device, username, password, ssl)"},{"line_number":63,"context_line":"            self.auth_sig \u003d authed_session.get_authorization_signature()"},{"line_number":64,"context_line":"        except Exception as e:"},{"line_number":65,"context_line":"            self.log.exception(e)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        try:"},{"line_number":68,"context_line":"            memory_data \u003d self.get_memory_stats(a10_device)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_33ec588f","line":65,"range":{"start_line":65,"start_character":21,"end_line":65,"end_character":30},"updated":"2017-02-01 22:29:17.000000000","message":"should you raise exception here? instead of just logging. Do you want the plugin to continue on?\n\nSame question for all your self.log.exceptions","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"},{"author":{"_account_id":15027,"name":"Michael Hoppal","email":"michael.jam.hoppal@hpe.com","username":"michael-hoppal"},"change_message_id":"8f70e4edee84ee101753dd073de74cef1a5e3268","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        except Exception as e:"},{"line_number":65,"context_line":"            self.log.exception(e)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        try:"},{"line_number":68,"context_line":"            memory_data \u003d self.get_memory_stats(a10_device)"},{"line_number":69,"context_line":"            for key, value in memory_data.items():"},{"line_number":70,"context_line":"                self.gauge(key, value, dimensions)"}],"source_content_type":"text/x-python","patch_set":14,"id":"3a461143_b3a68851","line":67,"range":{"start_line":67,"start_character":8,"end_line":67,"end_character":11},"updated":"2017-02-01 22:29:17.000000000","message":"dont get what the try except gets you here as you try catch everything in the method you are calling.","commit_id":"31efbe854aa9f2770549f6e54549192f8cafd1cc"}]}
