)]}'
{"monasca_agent/collector/checks_d/cacti.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"2c3384a3be4089a751cb5c87ec995a11e3dac087","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        num_hosts \u003d len(set([r[0] for r in res]))"},{"line_number":229,"context_line":"        self.gauge(\u0027cacti.rrd.count\u0027, len(res), dimensions\u003dself.dimensions)"},{"line_number":230,"context_line":"        self.gauge(\u0027cacti.hosts.count\u0027, num_hosts, dimensions\u003dself.dimensions)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return res"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_632a0b92","line":231,"updated":"2015-02-13 18:35:18.000000000","message":"is this assignment here necessary?","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"6611de0dd5c33e645184b8c20256d6725c023b74","unresolved":false,"context_lines":[{"line_number":228,"context_line":"        num_hosts \u003d len(set([r[0] for r in res]))"},{"line_number":229,"context_line":"        self.gauge(\u0027cacti.rrd.count\u0027, len(res), dimensions\u003dself.dimensions)"},{"line_number":230,"context_line":"        self.gauge(\u0027cacti.hosts.count\u0027, num_hosts, dimensions\u003dself.dimensions)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        return res"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_79ce3cb9","line":231,"in_reply_to":"da86d52c_632a0b92","updated":"2015-02-13 19:00:34.000000000","message":"See similar comment in kyototycoon.py","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"}],"monasca_agent/collector/checks_d/haproxy.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4583cddbad147e99010c04a1907a74f3edf0a279","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            status \u003d status.lower()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            status_dimensions.update({\u0027status\u0027: status, \u0027service\u0027: service})"},{"line_number":159,"context_line":"            self.gauge(\"haproxy.count_per_status\", count, dimensions\u003dstatus_dimensions)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            if \u0027up\u0027 in status:"},{"line_number":162,"context_line":"                agg_statuses[service][\u0027available\u0027] +\u003d count"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_d4860fdb","line":159,"updated":"2015-02-13 20:00:39.000000000","message":"Does the gauge method make a copy of dimensions?If not, I worry all the gauges will end up with the last value for service. You might need to copy each time","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"c93ced117a25f1d41fb7c10cb247d29bba707584","unresolved":false,"context_lines":[{"line_number":156,"context_line":"            status \u003d status.lower()"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            status_dimensions.update({\u0027status\u0027: status, \u0027service\u0027: service})"},{"line_number":159,"context_line":"            self.gauge(\"haproxy.count_per_status\", count, dimensions\u003dstatus_dimensions)"},{"line_number":160,"context_line":""},{"line_number":161,"context_line":"            if \u0027up\u0027 in status:"},{"line_number":162,"context_line":"                agg_statuses[service][\u0027available\u0027] +\u003d count"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_e5335a60","line":159,"in_reply_to":"da86d52c_d4860fdb","updated":"2015-02-13 22:20:23.000000000","message":"This works because the service and status change with each iteration of the loop.  Since the gauge is within the loop and after the update, it will get updated each time with the correct service and status.  The metrics are stored based on name, dimensions, hostname and a couple other values when gauge is called.  This makes a unique hash to store the metrics under and it will change each time time through the loop.","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"}],"monasca_agent/collector/checks_d/iis.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4583cddbad147e99010c04a1907a74f3edf0a279","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            # Tag with the site name if we\u0027re not using the aggregate"},{"line_number":84,"context_line":"            if iis_site.Name !\u003d \u0027_Total\u0027:"},{"line_number":85,"context_line":"                dimensions.update({\u0027site\u0027: iis_site.Name})"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            for metric, mtype, wmi_val in self.METRICS:"},{"line_number":88,"context_line":"                if not hasattr(iis_site, wmi_val):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_74ec8393","line":85,"updated":"2015-02-13 20:00:39.000000000","message":"This seems weird. Each new value oft iis_site.Name is going to overwrite the dimension value for  \u0027site\u0027. Last one in wins","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"88a60f245c5a6c8a7d5022018107e4a7897840bb","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            # Tag with the site name if we\u0027re not using the aggregate"},{"line_number":84,"context_line":"            if iis_site.Name !\u003d \u0027_Total\u0027:"},{"line_number":85,"context_line":"                dimensions.update({\u0027site\u0027: iis_site.Name})"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            for metric, mtype, wmi_val in self.METRICS:"},{"line_number":88,"context_line":"                if not hasattr(iis_site, wmi_val):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_8e8b9b67","line":85,"in_reply_to":"da86d52c_28db877e","updated":"2015-02-13 23:33:59.000000000","message":"Good point.  I will fix that.","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"2c0c535aab39c1eb01cf91700b593b933b807de2","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            # Tag with the site name if we\u0027re not using the aggregate"},{"line_number":84,"context_line":"            if iis_site.Name !\u003d \u0027_Total\u0027:"},{"line_number":85,"context_line":"                dimensions.update({\u0027site\u0027: iis_site.Name})"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            for metric, mtype, wmi_val in self.METRICS:"},{"line_number":88,"context_line":"                if not hasattr(iis_site, wmi_val):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_28db877e","line":85,"in_reply_to":"da86d52c_4568a621","updated":"2015-02-13 22:30:16.000000000","message":"That makes sense. How about if the first one is some named site and the second one is _Total. Do you need to remove the \u0027site\u0027 dimension for the _Total case since it would still be set to the first named site?","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"c93ced117a25f1d41fb7c10cb247d29bba707584","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"            # Tag with the site name if we\u0027re not using the aggregate"},{"line_number":84,"context_line":"            if iis_site.Name !\u003d \u0027_Total\u0027:"},{"line_number":85,"context_line":"                dimensions.update({\u0027site\u0027: iis_site.Name})"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            for metric, mtype, wmi_val in self.METRICS:"},{"line_number":88,"context_line":"                if not hasattr(iis_site, wmi_val):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_4568a621","line":85,"in_reply_to":"da86d52c_74ec8393","updated":"2015-02-13 22:20:23.000000000","message":"Yes, that is correct.  A webserver such as iis can have many websites.  We want to store the metrics under the correct site name.  Similar to the situation in the haproxy.py comment.","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"}],"monasca_agent/collector/checks_d/kyototycoon.py":[{"author":{"_account_id":12512,"name":"Deklan Dieterly","email":"deklan.dieterly@hpe.com","username":"deklan"},"change_message_id":"2c3384a3be4089a751cb5c87ec995a11e3dac087","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    k, v \u003d part.split(\u0027\u003d\u0027, 1)"},{"line_number":84,"context_line":"                    if k in self.DB_GAUGES:"},{"line_number":85,"context_line":"                        name \u003d self.DB_GAUGES[k]"},{"line_number":86,"context_line":"                        self.gauge(\u0027kyototycoon.%s\u0027 % name, float(v), dimensions\u003ddb_dimensions)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            if key in self.TOTALS:"},{"line_number":89,"context_line":"                totals[self.TOTALS[key]] +\u003d float(value)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_7672cbb1","line":86,"updated":"2015-02-13 18:35:18.000000000","message":"is self.gauge expecting kwargs? is that why the assignment is done?","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"6611de0dd5c33e645184b8c20256d6725c023b74","unresolved":false,"context_lines":[{"line_number":83,"context_line":"                    k, v \u003d part.split(\u0027\u003d\u0027, 1)"},{"line_number":84,"context_line":"                    if k in self.DB_GAUGES:"},{"line_number":85,"context_line":"                        name \u003d self.DB_GAUGES[k]"},{"line_number":86,"context_line":"                        self.gauge(\u0027kyototycoon.%s\u0027 % name, float(v), dimensions\u003ddb_dimensions)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"            if key in self.TOTALS:"},{"line_number":89,"context_line":"                totals[self.TOTALS[key]] +\u003d float(value)"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_598b3868","line":86,"in_reply_to":"da86d52c_7672cbb1","updated":"2015-02-13 19:00:34.000000000","message":"The method signature for gauge looks like this:\n    def gauge(self, metric, value, dimensions\u003dNone, delegated_tenant\u003dNone,\n              hostname\u003dNone, device_name\u003dNone, timestamp\u003dNone):\n\nSo, no the named parameter probably isn\u0027t necessary but I think it makes it clearer.","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"}],"monasca_agent/collector/checks_d/redisdb.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"4583cddbad147e99010c04a1907a74f3edf0a279","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        db_dimensions \u003d dimensions.copy()"},{"line_number":165,"context_line":"        for key in info.keys():"},{"line_number":166,"context_line":"            if self.db_key_pattern.match(key):"},{"line_number":167,"context_line":"                db_dimensions.update({\u0027redis_db\u0027: key})"},{"line_number":168,"context_line":"                for subkey in self.subkeys:"},{"line_number":169,"context_line":"                    # Old redis module on ubuntu 10.04 (python-redis 0.6.1) does not"},{"line_number":170,"context_line":"                    # returns a dict for those key but a string: keys\u003d3,expires\u003d0"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_d447ef75","line":167,"updated":"2015-02-13 20:00:39.000000000","message":"Could have problem here if gauge doesn\u0027t copy the dimensions","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"},{"author":{"_account_id":12108,"name":"Gary Hessler","email":"gary.hessler@hp.com","username":"garyh"},"change_message_id":"c93ced117a25f1d41fb7c10cb247d29bba707584","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        db_dimensions \u003d dimensions.copy()"},{"line_number":165,"context_line":"        for key in info.keys():"},{"line_number":166,"context_line":"            if self.db_key_pattern.match(key):"},{"line_number":167,"context_line":"                db_dimensions.update({\u0027redis_db\u0027: key})"},{"line_number":168,"context_line":"                for subkey in self.subkeys:"},{"line_number":169,"context_line":"                    # Old redis module on ubuntu 10.04 (python-redis 0.6.1) does not"},{"line_number":170,"context_line":"                    # returns a dict for those key but a string: keys\u003d3,expires\u003d0"}],"source_content_type":"text/x-python","patch_set":4,"id":"da86d52c_05ecee8e","line":167,"in_reply_to":"da86d52c_d447ef75","updated":"2015-02-13 22:20:23.000000000","message":"This is OK.  See reply to similar comments.","commit_id":"dbb3e46fad12117200b78322c9019de8e0c60202"}]}
