)]}'
{"conf.d/influxdb.yaml.example":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"e624fad1b2458da4c0eb550945d0b680c67cd437","unresolved":false,"context_lines":[{"line_number":75,"context_line":"#       This mapping allows the user to make statuses unique so generic alarms will"},{"line_number":76,"context_line":"#       not trigger on a unique metric.  Conversely the same applies to generic alarms"},{"line_number":77,"context_line":"#       and metric names."},{"line_number":78,"context_line":"        metricmap: !!map"},{"line_number":79,"context_line":"          response_time        : [ influx.db.http.latency.curr,             gauge ]"},{"line_number":80,"context_line":"          http_status          : [ influx.db.http.status.curr,              gauge ]"},{"line_number":81,"context_line":"          broadcastMessageTx   : [ influx.db.broadcastMessageTx.cnt.curr,   rate  ]"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"fa32b979_938619da","line":78,"updated":"2015-06-26 20:29:16.000000000","message":"I don\u0027t understand the use case to have this in the configuration. Do you expect that someone will modify the names of the metrics for some reason? I\u0027m not necessarily opposed to it but it just seems simpler to name them in the plugin once rather than maintain a configurable mapping.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5bc8e513e9ac27842a87de4c1ef2f24a18fc4e4e","unresolved":false,"context_lines":[{"line_number":75,"context_line":"#       This mapping allows the user to make statuses unique so generic alarms will"},{"line_number":76,"context_line":"#       not trigger on a unique metric.  Conversely the same applies to generic alarms"},{"line_number":77,"context_line":"#       and metric names."},{"line_number":78,"context_line":"        metricmap: !!map"},{"line_number":79,"context_line":"          response_time        : [ influx.db.http.latency.curr,             gauge ]"},{"line_number":80,"context_line":"          http_status          : [ influx.db.http.status.curr,              gauge ]"},{"line_number":81,"context_line":"          broadcastMessageTx   : [ influx.db.broadcastMessageTx.cnt.curr,   rate  ]"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"fa32b979_69e604b2","line":78,"in_reply_to":"fa32b979_938619da","updated":"2015-06-26 21:24:35.000000000","message":"This gives the user the option to choose the name of the metric without having to edit the code.\n\nIf the mapping is absent or they use the same name on the right and left the metric show up in that manner. So we actually support both models this way.\n\nTake http_status for example.  By allowing the name change the user could have a separate alarm definition that sends an alert to the InfluxDB admins.  If it were hard-coded then all http_status metrics affect the statistics and alarms.  This model allows custom naming, facilitates customized querying, standardization, and data retention. All of this with the understanding that we also have dimensions and value_meta to further describe the data.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"60f51eaecc4cd2e4fe12309d8097bc10182b0a6a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"#       not trigger on a unique metric.  Conversely the same applies to generic alarms"},{"line_number":77,"context_line":"#       and metric names."},{"line_number":78,"context_line":"        metricmap: !!map"},{"line_number":79,"context_line":"          response_time        : [ influx.db.http.latency.curr,             gauge ]"},{"line_number":80,"context_line":"          http_status          : [ influx.db.http.status.curr,              gauge ]"},{"line_number":81,"context_line":"          broadcastMessageTx   : [ influx.db.broadcastMessageTx.cnt.curr,   rate  ]"},{"line_number":82,"context_line":"          writeSeriesMessageTx : [ influx.db.writeSeriesMessageTx.cnt.curr, rate  ]"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"fa32b979_66cab470","line":79,"updated":"2015-06-26 20:01:35.000000000","message":"I think these should be influxdb instead of influxd.db. There is no other influx other than influxdb.\n\nAlso, the format should be influxdb.http_latency_curr. Only one dot and underscores after that","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5bc8e513e9ac27842a87de4c1ef2f24a18fc4e4e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"#       not trigger on a unique metric.  Conversely the same applies to generic alarms"},{"line_number":77,"context_line":"#       and metric names."},{"line_number":78,"context_line":"        metricmap: !!map"},{"line_number":79,"context_line":"          response_time        : [ influx.db.http.latency.curr,             gauge ]"},{"line_number":80,"context_line":"          http_status          : [ influx.db.http.status.curr,              gauge ]"},{"line_number":81,"context_line":"          broadcastMessageTx   : [ influx.db.broadcastMessageTx.cnt.curr,   rate  ]"},{"line_number":82,"context_line":"          writeSeriesMessageTx : [ influx.db.writeSeriesMessageTx.cnt.curr, rate  ]"}],"source_content_type":"application/octet-stream","patch_set":3,"id":"fa32b979_6c5612d0","line":79,"in_reply_to":"fa32b979_66cab470","updated":"2015-06-26 21:24:35.000000000","message":"I wresled with influxdb vs. influx.db too.  Splitting them gives us the category of this metric at offset after the split.  I was trying to stick with a pattern of proper_noun.noun.measurement.type.qualifier so we\u0027d have some consistency with everything in the data store and that allows easy exportation, parsing, and analysis since we have 5 named fields and a predefined dot separator which is required for Grafana.\n\nYour thoughts?","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"instances:"},{"line_number":4,"context_line":"    -   name: InfluxDB"},{"line_number":5,"context_line":"        url: http://localhost:8086/query?"},{"line_number":6,"context_line":"        timeout: 1"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"         # If your service uses basic authentication, you can optionally"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_1449c78b","line":5,"updated":"2016-01-12 12:34:40.000000000","message":"I think this contradicts the code - in checks_d/influxdb.py in __init__ it has;\n\n    endpoint \u003d base_url + \u0027/query\u0027\n\nwhich won\u0027t work with this example","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":2,"context_line":""},{"line_number":3,"context_line":"instances:"},{"line_number":4,"context_line":"    -   name: InfluxDB"},{"line_number":5,"context_line":"        url: http://localhost:8086/query?"},{"line_number":6,"context_line":"        timeout: 1"},{"line_number":7,"context_line":""},{"line_number":8,"context_line":"         # If your service uses basic authentication, you can optionally"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_e8d1affc","line":5,"in_reply_to":"da6ed579_1449c78b","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":40,"context_line":"#       HTTP parameters k/v pairs.  Generally used to supply URL parameters"},{"line_number":41,"context_line":"#       to query InfluxDB"},{"line_number":42,"context_line":"#       params:"},{"line_number":43,"context_line":"#          q : SHOW STATS"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#        Params will be urlencoded"},{"line_number":46,"context_line":"        urlencode: !!bool true"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_e581dbfc","line":43,"updated":"2016-01-12 12:34:40.000000000","message":"I don\u0027t think the \u0027params\u0027 key is actually used by the check code","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":40,"context_line":"#       HTTP parameters k/v pairs.  Generally used to supply URL parameters"},{"line_number":41,"context_line":"#       to query InfluxDB"},{"line_number":42,"context_line":"#       params:"},{"line_number":43,"context_line":"#          q : SHOW STATS"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"#        Params will be urlencoded"},{"line_number":46,"context_line":"        urlencode: !!bool true"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_a8dbb71a","line":43,"in_reply_to":"da6ed579_e581dbfc","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":45,"context_line":"#        Params will be urlencoded"},{"line_number":46,"context_line":"        urlencode: !!bool true"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        dimensions: !!map"},{"line_number":49,"context_line":"          service : monitoring"},{"line_number":50,"context_line":"          component : influxdb"},{"line_number":51,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_2aba60e2","line":48,"updated":"2016-01-12 12:34:40.000000000","message":"I don\u0027t think you need the typecast (both here and in the other cases elsewhere in the file)","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        urlencode: !!bool true"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        dimensions: !!map"},{"line_number":49,"context_line":"          service : monitoring"},{"line_number":50,"context_line":"          component : influxdb"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"#       A list of metrics that will be published.  The names here should be the"}],"source_content_type":"application/octet-stream","patch_set":17,"id":"da6ed579_6ac85875","line":49,"updated":"2016-01-12 12:34:40.000000000","message":"minor nit; the space before the colon is inconsistent with above","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"}],"monasca_agent/collector/checks_d/influxdb.py":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"e624fad1b2458da4c0eb550945d0b680c67cd437","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            raise Exception(\"Bad configuration. You must specify a url\")"},{"line_number":42,"context_line":"        ssl \u003d instance.get(\u0027disable_ssl_validation\u0027, True)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        return url, username, password, timeout, headers, whitelist, \\"},{"line_number":45,"context_line":"               metricmap, params, uencode, response_time, ssl"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _create_status_event(self, status, msg, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_b3ec7d93","line":44,"updated":"2015-06-26 20:29:16.000000000","message":"Why not set these all the instance variables rather than returning a big list?","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5bc8e513e9ac27842a87de4c1ef2f24a18fc4e4e","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            raise Exception(\"Bad configuration. You must specify a url\")"},{"line_number":42,"context_line":"        ssl \u003d instance.get(\u0027disable_ssl_validation\u0027, True)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        return url, username, password, timeout, headers, whitelist, \\"},{"line_number":45,"context_line":"               metricmap, params, uencode, response_time, ssl"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def _create_status_event(self, status, msg, instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_2988fcc5","line":44,"in_reply_to":"fa32b979_b3ec7d93","updated":"2015-06-26 21:24:35.000000000","message":"Another duplication of what the http_check plugin does.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"e624fad1b2458da4c0eb550945d0b680c67cd437","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _check(self, instance):"},{"line_number":54,"context_line":"        addr, username, password, timeout, headers, whitelist, metricmap, \\"},{"line_number":55,"context_line":"        params, encode, response_time, disable_ssl_validation, \u003d \\"},{"line_number":56,"context_line":"            self._load_conf(instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_330b8d2d","line":53,"updated":"2015-06-26 20:29:16.000000000","message":"Ryan just finished making a chuck of http connection code in http_check.py reusable for the http_metrics.py plugin. This was to allow code reuse without duplication. It seems to me that this is another use case for that exact class he just made as much of this seems a near duplicate to that class.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5bc8e513e9ac27842a87de4c1ef2f24a18fc4e4e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def _check(self, instance):"},{"line_number":54,"context_line":"        addr, username, password, timeout, headers, whitelist, metricmap, \\"},{"line_number":55,"context_line":"        params, encode, response_time, disable_ssl_validation, \u003d \\"},{"line_number":56,"context_line":"            self._load_conf(instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_2c124a59","line":53,"in_reply_to":"fa32b979_330b8d2d","updated":"2015-06-26 21:24:35.000000000","message":"It was derived from http_check.  I actually considered subclassing, but went this direction to get something functional very quickly.\n\nI probably need to sync up with Ryan to see how we can consolidate/subclass this based off his work.\n\nThere is also some duplication in http_check and this plugin that can be cleaned up.  Specifically around making gauge vs. rate calls.  That should be moved to its own method like the MySQL plugin does it in _collect_system_metrics().","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8db85b4268e420066535ba725e3c0dbce9d1161d","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        response_time \u003d instance.get(\u0027collect_response_time\u0027, False)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        if url is None:"},{"line_number":41,"context_line":"            raise Exception(\"Bad configuration. You must specify a url\")"},{"line_number":42,"context_line":"        ssl \u003d instance.get(\u0027disable_ssl_validation\u0027, True)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        return url, username, password, timeout, headers, whitelist, \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_9676a8a2","line":41,"updated":"2015-07-14 21:58:49.000000000","message":"Do you want to log an error message prior to raising an exception?","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"f592f7aad9ec64d16b99797793267bd19eb5fdfd","unresolved":false,"context_lines":[{"line_number":38,"context_line":"        response_time \u003d instance.get(\u0027collect_response_time\u0027, False)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        if url is None:"},{"line_number":41,"context_line":"            raise Exception(\"Bad configuration. You must specify a url\")"},{"line_number":42,"context_line":"        ssl \u003d instance.get(\u0027disable_ssl_validation\u0027, True)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"        return url, username, password, timeout, headers, whitelist, \\"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_ad159a49","line":41,"in_reply_to":"9a41bdd9_9676a8a2","updated":"2015-07-14 22:05:13.000000000","message":"Will do.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"79cab8d3715f9576c66c173bb8016e5bbc9d1b18","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                        self.rate(response_time_mname, running_time,"},{"line_number":175,"context_line":"                                  dimensions\u003ddimensions)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            if int(resp.status) \u003e\u003d 400:"},{"line_number":178,"context_line":"                error_string \u003d \u0027{0} is DOWN, error code: {1}\u0027\\"},{"line_number":179,"context_line":"                    .format(addr, str(resp.status))"},{"line_number":180,"context_line":"                self.log.info(error_string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_8d76a23c","line":177,"updated":"2015-12-02 10:34:59.000000000","message":"400 status codes are client errors, and don\u0027t mean the server is down - for example, a credential error may result in a 401, which probably shouldn\u0027t give a \"server is down\" error, but could mean the monitoring is misconfigured","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":174,"context_line":"                        self.rate(response_time_mname, running_time,"},{"line_number":175,"context_line":"                                  dimensions\u003ddimensions)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"            if int(resp.status) \u003e\u003d 400:"},{"line_number":178,"context_line":"                error_string \u003d \u0027{0} is DOWN, error code: {1}\u0027\\"},{"line_number":179,"context_line":"                    .format(addr, str(resp.status))"},{"line_number":180,"context_line":"                self.log.info(error_string)"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_ca3240f2","line":177,"in_reply_to":"9a8ffd7b_8d76a23c","updated":"2017-12-18 08:23:41.000000000","message":"good point. It will issue a warning now to the agent framework, not reporting any metrics in this case. This in turn will cause a gap in measurements, yielding UNKNOWN status for alarms.","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"79cab8d3715f9576c66c173bb8016e5bbc9d1b18","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        data \u003d json.loads(content)"},{"line_number":224,"context_line":"        self.log.debug(\"data %s\" % (data))"},{"line_number":225,"context_line":"        if data and \u0027results\u0027 in data and \u0027series\u0027 in data[\u0027results\u0027][0]:"},{"line_number":226,"context_line":"            for d in data[\u0027results\u0027][0][\u0027series\u0027]:"},{"line_number":227,"context_line":"                if \u0027name\u0027 in d:"},{"line_number":228,"context_line":"                    name \u003d d[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_8db9c230","line":225,"updated":"2015-12-02 10:34:59.000000000","message":"you could inverse the condition in this if and return early when there\u0027s no data, which would reduce the nesting...","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        data \u003d json.loads(content)"},{"line_number":224,"context_line":"        self.log.debug(\"data %s\" % (data))"},{"line_number":225,"context_line":"        if data and \u0027results\u0027 in data and \u0027series\u0027 in data[\u0027results\u0027][0]:"},{"line_number":226,"context_line":"            for d in data[\u0027results\u0027][0][\u0027series\u0027]:"},{"line_number":227,"context_line":"                if \u0027name\u0027 in d:"},{"line_number":228,"context_line":"                    name \u003d d[\u0027name\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_8abe7863","line":225,"in_reply_to":"9a8ffd7b_8db9c230","updated":"2017-12-18 08:23:41.000000000","message":"I did some IDE-based extract-method refactorings to mitigate. Since I did not invent this code I want to keep it at that. Otherwise I would change many more things ...","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"79cab8d3715f9576c66c173bb8016e5bbc9d1b18","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            for d in data[\u0027results\u0027][0][\u0027series\u0027]:"},{"line_number":227,"context_line":"                if \u0027name\u0027 in d:"},{"line_number":228,"context_line":"                    name \u003d d[\u0027name\u0027]"},{"line_number":229,"context_line":"                    if \u0027server\u0027 in name:"},{"line_number":230,"context_line":"                        columns \u003d d[\u0027columns\u0027]"},{"line_number":231,"context_line":"                        values \u003d d[\u0027values\u0027][0]"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_724d5b98","line":229,"updated":"2015-12-02 10:34:59.000000000","message":"as name isn\u0027t used again, you could just have\n    if \u0027name\u0027 in d and \u0027server\u0027 in d[\u0027name\u0027]:\nor\n    if \u0027server\u0027 in d.get(\u0027name\u0027, \u0027\u0027):\nand save a level of indentation","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"79cab8d3715f9576c66c173bb8016e5bbc9d1b18","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                           % (status, statuses, metric_name,"},{"line_number":269,"context_line":"                              metric_type, measurements))"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"            if value is not None:"},{"line_number":272,"context_line":"                if metric_type \u003d\u003d RATE:"},{"line_number":273,"context_line":"                    self.rate(metric_name, value, dimensions\u003ddimensions)"},{"line_number":274,"context_line":"                elif metric_type \u003d\u003d GAUGE:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_cd726a7c","line":271,"updated":"2015-12-02 10:34:59.000000000","message":"As value is cast to a float a couple of lines up, it can\u0027t be None.\n\nIf this means that the underlying measurements[metric_name] can sometimes be None then the float() cast will raise a TypeError.","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":268,"context_line":"                           % (status, statuses, metric_name,"},{"line_number":269,"context_line":"                              metric_type, measurements))"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"            if value is not None:"},{"line_number":272,"context_line":"                if metric_type \u003d\u003d RATE:"},{"line_number":273,"context_line":"                    self.rate(metric_name, value, dimensions\u003ddimensions)"},{"line_number":274,"context_line":"                elif metric_type \u003d\u003d GAUGE:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_aa32545d","line":271,"in_reply_to":"9a8ffd7b_cd726a7c","updated":"2017-12-18 08:23:41.000000000","message":"Done, taking minimal invasive approach.","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        base_url \u003d instance.get(\u0027url\u0027, None)"},{"line_number":95,"context_line":"        username \u003d instance.get(\u0027username\u0027, None)"},{"line_number":96,"context_line":"        password \u003d instance.get(\u0027password\u0027, None)"},{"line_number":97,"context_line":"        timeout \u003d int(instance.get(\u0027timeout\u0027, \u00271\u0027))"},{"line_number":98,"context_line":"        headers \u003d instance.get(\u0027headers\u0027, {})"},{"line_number":99,"context_line":"        whitelist \u003d instance.get(\u0027whitelist\u0027, DEFAULT_METRICS_WHITELIST)"},{"line_number":100,"context_line":"        metricdef \u003d instance.get(\u0027metricdef\u0027, DEFAULT_METRICS_DEF)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_a0e4393b","line":97,"updated":"2016-01-12 12:34:40.000000000","message":"requests supports non-integer timeouts - any particular reason to force them to be integer?","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        base_url \u003d instance.get(\u0027url\u0027, None)"},{"line_number":95,"context_line":"        username \u003d instance.get(\u0027username\u0027, None)"},{"line_number":96,"context_line":"        password \u003d instance.get(\u0027password\u0027, None)"},{"line_number":97,"context_line":"        timeout \u003d int(instance.get(\u0027timeout\u0027, \u00271\u0027))"},{"line_number":98,"context_line":"        headers \u003d instance.get(\u0027headers\u0027, {})"},{"line_number":99,"context_line":"        whitelist \u003d instance.get(\u0027whitelist\u0027, DEFAULT_METRICS_WHITELIST)"},{"line_number":100,"context_line":"        metricdef \u003d instance.get(\u0027metricdef\u0027, DEFAULT_METRICS_DEF)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_0b5c3d4a","line":97,"in_reply_to":"da6ed579_a0e4393b","updated":"2017-12-18 08:23:41.000000000","message":"never saw a floating point value in Monasca config files.\nAfter looking close at other plugins I agree","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                           \"(url) found in config!\")"},{"line_number":111,"context_line":"            raise Exception(\"Bad configuration. You must specify a url\")"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        endpoint \u003d base_url + \u0027/query\u0027"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"        return endpoint, username, password, timeout, headers, dimensions, whitelist, metricdef, \\"},{"line_number":116,"context_line":"               collect_response_time, disable_ssl_validation"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_40a1bda8","line":113,"updated":"2016-01-12 12:34:40.000000000","message":"This will result in failures if the base_url is specified with a trailing /","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                if mod in whitelist:  # pre-filter by module"},{"line_number":138,"context_line":"                    trans[mod] \u003d {}"},{"line_number":139,"context_line":"                    i \u003d 0"},{"line_number":140,"context_line":"                    for col in ser[\u0027columns\u0027]:"},{"line_number":141,"context_line":"                        self.log.debug(\"\")"},{"line_number":142,"context_line":"                        trans[mod][col] \u003d ser[\u0027values\u0027][0][i]"},{"line_number":143,"context_line":"                        i +\u003d 1"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_34888b22","line":140,"updated":"2016-01-12 12:34:40.000000000","message":"could use;\n\n    for i, col in enumerate(ser[\u0027columns\u0027]):\n\nand lose the i\u003d0 and i+\u003d1","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                if mod in whitelist:  # pre-filter by module"},{"line_number":138,"context_line":"                    trans[mod] \u003d {}"},{"line_number":139,"context_line":"                    i \u003d 0"},{"line_number":140,"context_line":"                    for col in ser[\u0027columns\u0027]:"},{"line_number":141,"context_line":"                        self.log.debug(\"\")"},{"line_number":142,"context_line":"                        trans[mod][col] \u003d ser[\u0027values\u0027][0][i]"},{"line_number":143,"context_line":"                        i +\u003d 1"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_6e82a754","line":140,"in_reply_to":"da6ed579_34888b22","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    trans[mod] \u003d {}"},{"line_number":139,"context_line":"                    i \u003d 0"},{"line_number":140,"context_line":"                    for col in ser[\u0027columns\u0027]:"},{"line_number":141,"context_line":"                        self.log.debug(\"\")"},{"line_number":142,"context_line":"                        trans[mod][col] \u003d ser[\u0027values\u0027][0][i]"},{"line_number":143,"context_line":"                        i +\u003d 1"},{"line_number":144,"context_line":"                    trans[mod][DIMENSIONS_KEY] \u003d ser[\u0027tags\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_74ada387","line":141,"updated":"2016-01-12 12:34:40.000000000","message":"This doesn\u0027t seem necessary?","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                    trans[mod] \u003d {}"},{"line_number":139,"context_line":"                    i \u003d 0"},{"line_number":140,"context_line":"                    for col in ser[\u0027columns\u0027]:"},{"line_number":141,"context_line":"                        self.log.debug(\"\")"},{"line_number":142,"context_line":"                        trans[mod][col] \u003d ser[\u0027values\u0027][0][i]"},{"line_number":143,"context_line":"                        i +\u003d 1"},{"line_number":144,"context_line":"                    trans[mod][DIMENSIONS_KEY] \u003d ser[\u0027tags\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_cb4b85af","line":141,"in_reply_to":"da6ed579_74ada387","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        endpoint, username, password, timeout, headers, dimensions, whitelist, metricdef, \\"},{"line_number":175,"context_line":"        collect_response_time, disable_ssl_validation \u003d self._load_conf(instance)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        start_time \u003d time.time()"},{"line_number":178,"context_line":"        merged_dimensions \u003d self._set_dimensions("},{"line_number":179,"context_line":"                {\u0027component\u0027: \u0027influxdb\u0027, \u0027url\u0027: endpoint}.update(dimensions.copy()), instance)"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_a3f9a34f","line":177,"updated":"2016-01-12 12:34:40.000000000","message":"Could use the Timer code in util;\n\nhttps://github.com/openstack/monasca-agent/blob/24d170fbb5d43fb8efa8459c0c19584f3cde4b04/monasca_agent/common/util.py#L129\n\n(and see also https://review.openstack.org/#/c/264395/6)","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        endpoint, username, password, timeout, headers, dimensions, whitelist, metricdef, \\"},{"line_number":175,"context_line":"        collect_response_time, disable_ssl_validation \u003d self._load_conf(instance)"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"        start_time \u003d time.time()"},{"line_number":178,"context_line":"        merged_dimensions \u003d self._set_dimensions("},{"line_number":179,"context_line":"                {\u0027component\u0027: \u0027influxdb\u0027, \u0027url\u0027: endpoint}.update(dimensions.copy()), instance)"},{"line_number":180,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_ae773f01","line":177,"in_reply_to":"da6ed579_a3f9a34f","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            auth \u003d (username, password)"},{"line_number":186,"context_line":"            self.log.debug(\u0027Query InfluxDB using GET to %s\u0027, endpoint)"},{"line_number":187,"context_line":"            resp \u003d requests.get(endpoint, params\u003dparams, headers\u003dmerged_headers, auth\u003dauth, timeout\u003dself.timeout,"},{"line_number":188,"context_line":"                                verify\u003dnot disable_ssl_validation)"},{"line_number":189,"context_line":"            content \u003d resp.json()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"            # report response time first, even when there is HTTP errors"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_85d81e55","line":188,"updated":"2016-01-12 12:34:40.000000000","message":"If user/password aren\u0027t specified in the config file, then this will pass in auth\u003d(None, None). Requests casts these to strings, so this is the equivalent of passing in auth\u003d(\"None\", \"None\"), which is presumably not what was intended.","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            auth \u003d (username, password)"},{"line_number":186,"context_line":"            self.log.debug(\u0027Query InfluxDB using GET to %s\u0027, endpoint)"},{"line_number":187,"context_line":"            resp \u003d requests.get(endpoint, params\u003dparams, headers\u003dmerged_headers, auth\u003dauth, timeout\u003dself.timeout,"},{"line_number":188,"context_line":"                                verify\u003dnot disable_ssl_validation)"},{"line_number":189,"context_line":"            content \u003d resp.json()"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"            # report response time first, even when there is HTTP errors"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_2e6d8f04","line":188,"in_reply_to":"da6ed579_85d81e55","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            # check HTTP errors"},{"line_number":198,"context_line":"            if int(resp.status_code) \u003e\u003d 500:"},{"line_number":199,"context_line":"                error_string \u003d \u0027{0} is DOWN, error code: {1}\u0027.format(endpoint, str(resp.status_code))"},{"line_number":200,"context_line":"                self._push_error(error_string, merged_dimensions)"},{"line_number":201,"context_line":"                return services_checks.Status.DOWN, error_string"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_d6481730","line":199,"updated":"2016-01-12 12:34:40.000000000","message":"You don\u0027t need to cast resp.status_code to a string; str.format() will do that for you (also various other places below)","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"            # check HTTP errors"},{"line_number":198,"context_line":"            if int(resp.status_code) \u003e\u003d 500:"},{"line_number":199,"context_line":"                error_string \u003d \u0027{0} is DOWN, error code: {1}\u0027.format(endpoint, str(resp.status_code))"},{"line_number":200,"context_line":"                self._push_error(error_string, merged_dimensions)"},{"line_number":201,"context_line":"                return services_checks.Status.DOWN, error_string"},{"line_number":202,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_8e903697","line":199,"in_reply_to":"da6ed579_d6481730","updated":"2017-12-18 08:23:41.000000000","message":"Good to know. I started that way, but after I got an exception introduced str(...). Probably I interpreted the exception wrongly. Thanks for the hint.\n\nDONE","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            length \u003d int((time.time() - start_time) * 1000)"},{"line_number":230,"context_line":"            error_string \u003d \u0027{0} did not respond within {2} ms, error: {1}.\u0027.format(endpoint,"},{"line_number":231,"context_line":"                                                                                   repr(e),"},{"line_number":232,"context_line":"                                                                                   length)"},{"line_number":233,"context_line":"            self._push_error(error_string, merged_dimensions)"},{"line_number":234,"context_line":"            return services_checks.Status.DOWN, error_string"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_746283da","line":232,"updated":"2016-01-12 12:34:40.000000000","message":"This won\u0027t show the actual timeout, which is the value of self.timeout - it\u0027ll show the elapsed time including the python code execution (which will be included in the formatted exception, which will contradict this message.)\n\nAlso, elsewhere you\u0027ve formatted str(e), while here it\u0027s repr(e).","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":229,"context_line":"            length \u003d int((time.time() - start_time) * 1000)"},{"line_number":230,"context_line":"            error_string \u003d \u0027{0} did not respond within {2} ms, error: {1}.\u0027.format(endpoint,"},{"line_number":231,"context_line":"                                                                                   repr(e),"},{"line_number":232,"context_line":"                                                                                   length)"},{"line_number":233,"context_line":"            self._push_error(error_string, merged_dimensions)"},{"line_number":234,"context_line":"            return services_checks.Status.DOWN, error_string"},{"line_number":235,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_8e4b5659","line":232,"in_reply_to":"da6ed579_746283da","updated":"2017-12-18 08:23:41.000000000","message":"For diagnostics purpose, I am rather interested in the actual timeout rather than the configured timeout (which I can get from the config anyway). There is a difference, but I expect it to be neglegible.","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"}],"monasca_setup/detection/plugins/influxdb.py":[{"author":{"_account_id":11094,"name":"Tim Kuhlman","email":"timothy.kuhlman@canonical.com","username":"kuhlmant"},"change_message_id":"e624fad1b2458da4c0eb550945d0b680c67cd437","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    def _detect(self):"},{"line_number":16,"context_line":"        \"\"\"Run detection, set self.available True if the service is detected."},{"line_number":17,"context_line":"        \"\"\""},{"line_number":18,"context_line":"        self.available \u003d self._check_required_args([\u0027url\u0027])"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    def build_config(self):"},{"line_number":21,"context_line":"        \"\"\"Build the config as a Plugins object and return."}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_f6e51338","line":18,"updated":"2015-06-26 20:29:16.000000000","message":"I like the use of args. I was just thinking myself about how we could better use that. However there is one disadvantage of requiring the args, the plugin will not work without them.\nFor monasca-setup there are two use cases the first is that someone installs the agent and wants an automatic config that is as close as possible. Influxdb will not work in this state.\n\nI would be nice if it tries localhost with the standard influxdb port or uses the argument. That way someone could start up a vm, install influxdb, install the agent and run monasca-setup to get it monitored without having to parse through all the docs and details on how to add arguments to monasca-setup.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"5bc8e513e9ac27842a87de4c1ef2f24a18fc4e4e","unresolved":false,"context_lines":[{"line_number":15,"context_line":"    def _detect(self):"},{"line_number":16,"context_line":"        \"\"\"Run detection, set self.available True if the service is detected."},{"line_number":17,"context_line":"        \"\"\""},{"line_number":18,"context_line":"        self.available \u003d self._check_required_args([\u0027url\u0027])"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"    def build_config(self):"},{"line_number":21,"context_line":"        \"\"\"Build the config as a Plugins object and return."}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_cc2f1e3d","line":18,"in_reply_to":"fa32b979_f6e51338","updated":"2015-06-26 21:24:35.000000000","message":"Completely agree.  I need to see if there\u0027s a better way to simply get rid of this.  The setup step is a little awkward passing in the URL.\n\nI also need to provide some better defaults so it would work out of the box with no config and write out a config.  I\u0027ll have to add a check on a default URL.  If we get back a 200 then create the config and enable the check during setup.","commit_id":"51a2021bd95506c3b64dac9672c17d46b483fbdc"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8db85b4268e420066535ba725e3c0dbce9d1161d","unresolved":false,"context_lines":[{"line_number":10,"context_line":"metricmap \u003d {\u0027response_time\u0027: [\u0027influx.db.http.latency.curr\u0027, \u0027gauge\u0027],"},{"line_number":11,"context_line":"             \u0027http_status\u0027:"},{"line_number":12,"context_line":"                 [\u0027influx.db.http.status.curr\u0027, \u0027gauge\u0027],"},{"line_number":13,"context_line":"             \u0027broadcastMessageTx\u0027:"},{"line_number":14,"context_line":"                 [\u0027influx.db.broadcastMessageTx.cnt.curr\u0027, \u0027rate\u0027],"},{"line_number":15,"context_line":"             \u0027writeSeriesMessageTx\u0027:"},{"line_number":16,"context_line":"                 [\u0027influx.db.writeSeriesMessageTx.cnt.curr\u0027, \u0027rate\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_6aaf78e2","line":13,"updated":"2015-07-14 21:58:49.000000000","message":"So, the way I\u0027m reading this is that you\u0027re going to have a Monasca metric name of broadcastMessageTx. Is that correct?\n\nWe\u0027ve been using snake case for metric names.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"f592f7aad9ec64d16b99797793267bd19eb5fdfd","unresolved":false,"context_lines":[{"line_number":10,"context_line":"metricmap \u003d {\u0027response_time\u0027: [\u0027influx.db.http.latency.curr\u0027, \u0027gauge\u0027],"},{"line_number":11,"context_line":"             \u0027http_status\u0027:"},{"line_number":12,"context_line":"                 [\u0027influx.db.http.status.curr\u0027, \u0027gauge\u0027],"},{"line_number":13,"context_line":"             \u0027broadcastMessageTx\u0027:"},{"line_number":14,"context_line":"                 [\u0027influx.db.broadcastMessageTx.cnt.curr\u0027, \u0027rate\u0027],"},{"line_number":15,"context_line":"             \u0027writeSeriesMessageTx\u0027:"},{"line_number":16,"context_line":"                 [\u0027influx.db.writeSeriesMessageTx.cnt.curr\u0027, \u0027rate\u0027],"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_6d7792d3","line":13,"in_reply_to":"9a41bdd9_6aaf78e2","updated":"2015-07-14 22:05:13.000000000","message":"No, that is what comes back from InfluxDB.  We map it to the dotted notation to the right (or whatever is there) and assign a metric type that\u0027s in the far right.  In this case rate.\n\n\u0027broadcastMessageTx\u0027: [\u0027influx.db.broadcastMessageTx.cnt.curr\u0027, \u0027rate\u0027],","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8db85b4268e420066535ba725e3c0dbce9d1161d","unresolved":false,"context_lines":[{"line_number":27,"context_line":"             \u0027pointWriteRx\u0027:"},{"line_number":28,"context_line":"                 [\u0027influx.db.pointWriteRx.cnt.curr\u0027, \u0027rate\u0027]}"},{"line_number":29,"context_line":"params \u003d {\u0027q\u0027: \u0027SHOW STATS\u0027}"},{"line_number":30,"context_line":"dimensions \u003d {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027database\u0027}"},{"line_number":31,"context_line":"timeout \u003d 1"},{"line_number":32,"context_line":"url \u003d \u0027http://localhost:8086/query?\u0027"},{"line_number":33,"context_line":"collect_response_time \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_0a026cb4","line":30,"updated":"2015-07-14 21:58:49.000000000","message":"Similar to the comment for Vertica, should we have a \n\nservice: monitoring\ncomponent: influxdb\n\nor\n\nservice: influxdb\ncomponent: influxdb\n\n\nIn my comments on the Vertica plugin, I think I said that the service should be vertica, which aligns with MySQL. But, I\u0027m not sure that is best now, after reviewing what you have here.\n\nPossibly, service\u003dmonitoring, and component\u003dinfluxd is better.\n\nThat would imply for Vertica\n\nservice\u003dmonitoring and component\u003dvertica is correct. \n\nThere would also be a process check for the \"spread\" spread in the case of Vertica.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"f592f7aad9ec64d16b99797793267bd19eb5fdfd","unresolved":false,"context_lines":[{"line_number":27,"context_line":"             \u0027pointWriteRx\u0027:"},{"line_number":28,"context_line":"                 [\u0027influx.db.pointWriteRx.cnt.curr\u0027, \u0027rate\u0027]}"},{"line_number":29,"context_line":"params \u003d {\u0027q\u0027: \u0027SHOW STATS\u0027}"},{"line_number":30,"context_line":"dimensions \u003d {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027database\u0027}"},{"line_number":31,"context_line":"timeout \u003d 1"},{"line_number":32,"context_line":"url \u003d \u0027http://localhost:8086/query?\u0027"},{"line_number":33,"context_line":"collect_response_time \u003d True"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_4d616e04","line":30,"in_reply_to":"9a41bdd9_0a026cb4","updated":"2015-07-14 22:05:13.000000000","message":"Yeah we probably need to align on this to determine what works best for filtering, alarming, etc.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"8db85b4268e420066535ba725e3c0dbce9d1161d","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                    in resp[\u0027content-type\u0027]:"},{"line_number":93,"context_line":"                return True"},{"line_number":94,"context_line":"        except Exception as e:"},{"line_number":95,"context_line":"            log.warn(\u0027Unable to access the InfluxDB diagnostics URL \u0027"},{"line_number":96,"context_line":"                     \u0027--\u003e ({:s})\u0027.format(uri))"},{"line_number":97,"context_line":"        return False"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_4ad15422","line":95,"updated":"2015-07-14 21:58:49.000000000","message":"Hmmm, might be better to log an error or exception here, rather than a warning.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":12149,"name":"Dexter Fryar","email":"dexter.fryar@protonmail.com","username":"dlfryar"},"change_message_id":"f592f7aad9ec64d16b99797793267bd19eb5fdfd","unresolved":false,"context_lines":[{"line_number":92,"context_line":"                    in resp[\u0027content-type\u0027]:"},{"line_number":93,"context_line":"                return True"},{"line_number":94,"context_line":"        except Exception as e:"},{"line_number":95,"context_line":"            log.warn(\u0027Unable to access the InfluxDB diagnostics URL \u0027"},{"line_number":96,"context_line":"                     \u0027--\u003e ({:s})\u0027.format(uri))"},{"line_number":97,"context_line":"        return False"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_2d2bca95","line":95,"in_reply_to":"9a41bdd9_4ad15422","updated":"2015-07-14 22:05:13.000000000","message":"Seems reasonable.  I\u0027ll make that change.","commit_id":"b3bfef9725f5fb1f3257745c865c404f42954f6d"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"2e5ce1f4a963e921bb8f34972fd0c49930c35938","unresolved":false,"context_lines":[{"line_number":25,"context_line":"             \u0027batchWriteRx\u0027:"},{"line_number":26,"context_line":"                 [\u0027influx.db.batchWriteRx.cnt.curr\u0027, \u0027rate\u0027],"},{"line_number":27,"context_line":"             \u0027pointWriteRx\u0027:"},{"line_number":28,"context_line":"                 [\u0027influx.db.pointWriteRx.cnt.curr\u0027, \u0027rate\u0027]}"},{"line_number":29,"context_line":"params \u003d {\u0027q\u0027: \u0027SHOW STATS\u0027}"},{"line_number":30,"context_line":"dimensions \u003d {\u0027service\u0027: \u0027monitoring\u0027, \u0027component\u0027: \u0027database\u0027}"},{"line_number":31,"context_line":"timeout \u003d 1"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_6ef42d5a","line":28,"updated":"2015-07-15 21:02:31.000000000","message":"I made some comments on the Vertica Agent plugin, but I think the same one\u0027s are applicable to the metric names used here too. I think we should get together and discuss this further.","commit_id":"127ba42cc322c439729c86e785033029854b88b6"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ba17b243ec3836a201ae60f8a688d50472807f24","unresolved":false,"context_lines":[{"line_number":27,"context_line":"             \u0027pointWriteRx\u0027:"},{"line_number":28,"context_line":"                 [\u0027influxdb.point_write_rx\u0027, \u0027rate\u0027]}"},{"line_number":29,"context_line":"params \u003d {\u0027q\u0027: \u0027SHOW STATS\u0027}"},{"line_number":30,"context_line":"dimensions \u003d {\u0027component\u0027: \u0027influxdb\u0027}"},{"line_number":31,"context_line":"timeout \u003d 1"},{"line_number":32,"context_line":"url \u003d \u0027http://localhost:8086/query?\u0027"},{"line_number":33,"context_line":"collect_response_time \u003d True"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_e2b201e5","line":30,"updated":"2015-12-01 18:31:55.000000000","message":"This should be \"service\" not component","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":27,"context_line":"             \u0027pointWriteRx\u0027:"},{"line_number":28,"context_line":"                 [\u0027influxdb.point_write_rx\u0027, \u0027rate\u0027]}"},{"line_number":29,"context_line":"params \u003d {\u0027q\u0027: \u0027SHOW STATS\u0027}"},{"line_number":30,"context_line":"dimensions \u003d {\u0027component\u0027: \u0027influxdb\u0027}"},{"line_number":31,"context_line":"timeout \u003d 1"},{"line_number":32,"context_line":"url \u003d \u0027http://localhost:8086/query?\u0027"},{"line_number":33,"context_line":"collect_response_time \u003d True"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_6cdb2950","line":30,"in_reply_to":"9a8ffd7b_e2b201e5","updated":"2017-12-18 08:23:41.000000000","message":"that was by intention. I brought this up on the meeting on dec. 2nd to get clarification. summary: service refers to e.g. an OpenStack service, i.e. a capability in my terms. For technical services other plugins, most notably mon.py, chose \"component\" for that. Which has the advantage that generic components like MySQL, Apache etc. do not occupy the service dimension. Last not least there is a dimension called \u0027process_name\u0027 which is used to capture the actual OS-level service (deamon).","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ba17b243ec3836a201ae60f8a688d50472807f24","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                                self.collect_response_time,"},{"line_number":66,"context_line":"                            \u0027timeout\u0027: self.timeout,"},{"line_number":67,"context_line":"                            \u0027params\u0027: self.params,"},{"line_number":68,"context_line":"                            \u0027dimensions\u0027: self.dimensions}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"                config[\u0027influxdb\u0027] \u003d {\u0027init_config\u0027: None,"},{"line_number":71,"context_line":"                                      \u0027instances\u0027: [instance]}"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_e2e9a1b8","line":68,"updated":"2015-12-01 18:31:55.000000000","message":"There should also be username and password entries here. It will be most common that influxdb is configured with authentication","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ba17b243ec3836a201ae60f8a688d50472807f24","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"            h \u003d httplib2.Http(timeout\u003dself.timeout)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"            uri \u003d self.url + urlencode(self.params)"},{"line_number":88,"context_line":"            resp, content \u003d h.request(uri, \"GET\")"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"            if \u0027content-type\u0027 in resp and \u0027application/json\u0027 in resp[\u0027content-type\u0027]:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_82b0d58c","line":87,"updated":"2015-12-01 18:31:55.000000000","message":"Also need username and password here","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ba17b243ec3836a201ae60f8a688d50472807f24","unresolved":false,"context_lines":[{"line_number":112,"context_line":"            for arg in self.args:"},{"line_number":113,"context_line":"                if arg \u003d\u003d \u0027url\u0027:"},{"line_number":114,"context_line":"                    self.url \u003d self.args.get(\u0027url\u0027, url)"},{"line_number":115,"context_line":"                else:"},{"line_number":116,"context_line":"                    log.warn(\"Ignoring addition unsupported setup argument: {0}\".format(arg))"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_a272b9e1","line":115,"updated":"2015-12-01 18:31:55.000000000","message":"And username and password here","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            self.version \u003d resp.headers.get(\u0027x-influxdb-version\u0027, \u00270 (unknown)\u0027)"},{"line_number":66,"context_line":"            log.info(\u0027Discovered InfluxDB version %s\u0027, self.version)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            supported \u003d self.version \u003e\u003d \u00270.9.4\u0027"},{"line_number":69,"context_line":"            if not supported:"},{"line_number":70,"context_line":"                log.error(\u0027Unsupported InfluxDB version\u0027)"},{"line_number":71,"context_line":"            return supported"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_4cad7987","line":68,"updated":"2016-01-12 12:34:40.000000000","message":"This will do a lexicographic comparison based on the numeric value of each character (see https://docs.python.org/2/reference/expressions.html#not-in) which I don\u0027t think is meaningful. For example, \"0.9.10\" \u003e\u003d \"0.9.4\" evaluates to False.","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"            supported \u003d self.version \u003e\u003d \u00270.9.4\u0027"},{"line_number":69,"context_line":"            if not supported:"},{"line_number":70,"context_line":"                log.error(\u0027Unsupported InfluxDB version\u0027)"},{"line_number":71,"context_line":"            return supported"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_2ce285d6","line":70,"updated":"2016-01-12 12:34:40.000000000","message":"Logging the version in the error would be helpful (if the log level is set to warning/error or above, then the info log.info would have been omitted)","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"eaab15e868184cb6147c5d3bc7a03e4684efc571","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            return supported"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            log.error(\u0027Unable to access the InfluxDB query URL %s: %s\u0027, self.url, str(e))"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        return False"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da6ed579_c03a8dcd","line":74,"updated":"2016-01-12 12:34:40.000000000","message":"Should be log.exception","commit_id":"d6969e74964e6f56171c76c508946931f909d3d9"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"f0083ff80edc6c8130bb6adfbd66b6c5fd99be48","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            log.info(\u0027Discovered InfluxDB version %s\u0027, self.version)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            # this will work for 0.9.4 but not necessarily future stable releases (e.g. 1.0.11)"},{"line_number":68,"context_line":"            supported \u003d self.version \u003e\u003d \u00270.9.4\u0027"},{"line_number":69,"context_line":"            if not supported:"},{"line_number":70,"context_line":"                log.error(\u0027Unsupported InfluxDB version: {0}\u0027.format(self.version))"},{"line_number":71,"context_line":"            return supported"}],"source_content_type":"text/x-python","patch_set":27,"id":"da6ed579_d937adae","line":68,"updated":"2016-01-13 08:50:25.000000000","message":"This will break for 0.10.0, which is due out this month (https://influxdata.com/time-series-platform/influxdb/)","commit_id":"9a1e0d6b6809c9259f0afcfbeeeadf11028284b2"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":65,"context_line":"            log.info(\u0027Discovered InfluxDB version %s\u0027, self.version)"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"            # this will work for 0.9.4 but not necessarily future stable releases (e.g. 1.0.11)"},{"line_number":68,"context_line":"            supported \u003d self.version \u003e\u003d \u00270.9.4\u0027"},{"line_number":69,"context_line":"            if not supported:"},{"line_number":70,"context_line":"                log.error(\u0027Unsupported InfluxDB version: {0}\u0027.format(self.version))"},{"line_number":71,"context_line":"            return supported"}],"source_content_type":"text/x-python","patch_set":27,"id":"da6ed579_1e1d0f0f","line":68,"in_reply_to":"da6ed579_d937adae","updated":"2017-12-18 08:23:41.000000000","message":"very true, I have submitted my second attempt to fix and have to await internal test results.\n\nFIXED","commit_id":"9a1e0d6b6809c9259f0afcfbeeeadf11028284b2"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"1d5d26d66e0628bd6d85028874313d0723e5d768","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            self.version \u003d resp.headers.get(\u0027x-influxdb-version\u0027, \u00270 (unknown)\u0027)"},{"line_number":73,"context_line":"            log.info(\u0027Discovered InfluxDB version %s\u0027, self.version)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            supported \u003d self._compare_versions(self.version, \u00270.9.4\u0027) \u003e\u003d 0"},{"line_number":76,"context_line":"            if not supported:"},{"line_number":77,"context_line":"                log.error(\u0027Unsupported InfluxDB version: %s\u0027, self.version)"},{"line_number":78,"context_line":"            return supported"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba63e191_7eb76bd8","line":75,"updated":"2016-01-20 11:06:56.000000000","message":"self._compare_versions raises ValueError if it gets passed the default \u00270 (unknown)\u0027 string defined above. Because you\u0027re using log.exception() below, this means the console gets a lot of messy stack traces (which look a lot like serious errors) even during a successful run.","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            self.version \u003d resp.headers.get(\u0027x-influxdb-version\u0027, \u00270 (unknown)\u0027)"},{"line_number":73,"context_line":"            log.info(\u0027Discovered InfluxDB version %s\u0027, self.version)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"            supported \u003d self._compare_versions(self.version, \u00270.9.4\u0027) \u003e\u003d 0"},{"line_number":76,"context_line":"            if not supported:"},{"line_number":77,"context_line":"                log.error(\u0027Unsupported InfluxDB version: %s\u0027, self.version)"},{"line_number":78,"context_line":"            return supported"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a5de9d1_23b7c0d9","line":75,"in_reply_to":"ba63e191_7eb76bd8","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"1d5d26d66e0628bd6d85028874313d0723e5d768","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return supported"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            log.exception(\u0027Unable to access the InfluxDB query URL %s: %s\u0027, uri, repr(e))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return False"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"ba63e191_be7883f3","line":81,"updated":"2016-01-20 11:06:56.000000000","message":"Other detection plugins use log.error() here to avoid long stacktraces during routine operation. If you want to have stacktraces for genuine errors vs. routine errors (I see a lot of SSLErrors) then you\u0027ll need more handlers","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            return supported"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            log.exception(\u0027Unable to access the InfluxDB query URL %s: %s\u0027, uri, repr(e))"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"        return False"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"7a5de9d1_231340ba","line":81,"in_reply_to":"ba63e191_be7883f3","updated":"2017-12-18 08:23:41.000000000","message":"Done\n- should be sufficient for diagnostics","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"1d5d26d66e0628bd6d85028874313d0723e5d768","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            return self._connection_test(self.url) or self._discover_config()"},{"line_number":112,"context_line":"        else:"},{"line_number":113,"context_line":"            log.warning(\"No username and password supplied to InfluxDB detection!\")"},{"line_number":114,"context_line":"            return self._discover_config()"}],"source_content_type":"text/x-python","patch_set":28,"id":"ba63e191_1e5bcf55","line":114,"updated":"2016-01-20 11:06:56.000000000","message":"_discover_config doesn\u0027t set values for self.username etc., so in this case build_config fails with an AttributeError.\n\nI\u0027d suggest setting default values of all properties in the constructor (which is generally best practice anyway.)","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"            return self._connection_test(self.url) or self._discover_config()"},{"line_number":112,"context_line":"        else:"},{"line_number":113,"context_line":"            log.warning(\"No username and password supplied to InfluxDB detection!\")"},{"line_number":114,"context_line":"            return self._discover_config()"}],"source_content_type":"text/x-python","patch_set":28,"id":"7a5de9d1_f5095f2d","line":114,"in_reply_to":"ba63e191_1e5bcf55","updated":"2017-12-18 08:23:41.000000000","message":"by default influxdb does not need credentials (https://docs.influxdata.com/influxdb/v0.9/administration/authentication_and_authorization/#set-up-authentication). I believe this is the  scenario where discovery brings the most value.","commit_id":"d536c3520ea6249fdbfe89fc0ab544bf0e1a15cb"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"4fac4921d0b2d3cb80626b7e2db32cd65e14a1e8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                                self.collect_response_time,"},{"line_number":41,"context_line":"                            }"},{"line_number":42,"context_line":"                if self.username is not None and self.password is not None:"},{"line_number":43,"context_line":"                    instance[\u0027username\u0027] \u003d self.username"},{"line_number":44,"context_line":"                    instance[\u0027password\u0027] \u003d self.password"},{"line_number":45,"context_line":"                if self.timeout is not None:"},{"line_number":46,"context_line":"                    instance[\u0027timeout\u0027] \u003d self.timeout"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a5de9d1_c8668829","line":43,"updated":"2016-02-01 11:11:28.000000000","message":"This will *always* raise an AttributeError","commit_id":"9bc243b13410e0018c527755deb62ca21179ca76"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                                self.collect_response_time,"},{"line_number":41,"context_line":"                            }"},{"line_number":42,"context_line":"                if self.username is not None and self.password is not None:"},{"line_number":43,"context_line":"                    instance[\u0027username\u0027] \u003d self.username"},{"line_number":44,"context_line":"                    instance[\u0027password\u0027] \u003d self.password"},{"line_number":45,"context_line":"                if self.timeout is not None:"},{"line_number":46,"context_line":"                    instance[\u0027timeout\u0027] \u003d self.timeout"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a5ae5dd_58cffb28","line":43,"in_reply_to":"7a5de9d1_c8668829","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"9bc243b13410e0018c527755deb62ca21179ca76"},{"author":{"_account_id":15799,"name":"Ben Motz","email":"ben.launchpad@ouat.co.uk","username":"bmotz"},"change_message_id":"4fac4921d0b2d3cb80626b7e2db32cd65e14a1e8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # discover API port"},{"line_number":88,"context_line":"        for conn in self.influxd.connections(\u0027inet\u0027):"},{"line_number":89,"context_line":"            for protocol in [\u0027http\u0027, \u0027https\u0027]:"},{"line_number":90,"context_line":"                u \u003d \u0027{0}://localhost:{1}\u0027.format(protocol, conn.laddr[0])"},{"line_number":91,"context_line":"                if self._connection_test(u):"},{"line_number":92,"context_line":"                    self.url \u003d u"},{"line_number":93,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a5de9d1_a800ec66","line":90,"updated":"2016-02-01 11:11:28.000000000","message":"The laddr tuple returned by the connections() method of the Process class of the psutil library is a tuple containing (ip, port) (see http://pythonhosted.org/psutil/#psutil.Process.connections). Here you\u0027re substituting the IP address in for the port.\n\nThis could never have worked. Have you tested this code?","commit_id":"9bc243b13410e0018c527755deb62ca21179ca76"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        # discover API port"},{"line_number":88,"context_line":"        for conn in self.influxd.connections(\u0027inet\u0027):"},{"line_number":89,"context_line":"            for protocol in [\u0027http\u0027, \u0027https\u0027]:"},{"line_number":90,"context_line":"                u \u003d \u0027{0}://localhost:{1}\u0027.format(protocol, conn.laddr[0])"},{"line_number":91,"context_line":"                if self._connection_test(u):"},{"line_number":92,"context_line":"                    self.url \u003d u"},{"line_number":93,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":33,"id":"5a5ae5dd_b8f5cf57","line":90,"in_reply_to":"7a5de9d1_a800ec66","updated":"2017-12-18 08:23:41.000000000","message":"Done","commit_id":"9bc243b13410e0018c527755deb62ca21179ca76"}],"monasca_setup/detection/plugins/mon.py":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"ba17b243ec3836a201ae60f8a688d50472807f24","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    def build_config(self):"},{"line_number":267,"context_line":"        \"\"\"Build the config as a Plugins object and return.\"\"\""},{"line_number":268,"context_line":"        log.info(\"\\tEnabling the Monasca InfluxDB check\")"},{"line_number":269,"context_line":"        return watch_process([\u0027influxd\u0027], component\u003d\u0027influxdb\u0027,"},{"line_number":270,"context_line":"                             exact_match\u003dFalse)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def dependencies_installed(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a8ffd7b_024aa583","line":269,"updated":"2015-12-01 18:31:55.000000000","message":"This should be service not component","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"},{"author":{"_account_id":17244,"name":"Joachim Barheine","email":"joachim.barheine@sap.com","username":"jobrs"},"change_message_id":"898521f50d46b9973c159692d090e82cb78a5d1a","unresolved":false,"context_lines":[{"line_number":266,"context_line":"    def build_config(self):"},{"line_number":267,"context_line":"        \"\"\"Build the config as a Plugins object and return.\"\"\""},{"line_number":268,"context_line":"        log.info(\"\\tEnabling the Monasca InfluxDB check\")"},{"line_number":269,"context_line":"        return watch_process([\u0027influxd\u0027], component\u003d\u0027influxdb\u0027,"},{"line_number":270,"context_line":"                             exact_match\u003dFalse)"},{"line_number":271,"context_line":""},{"line_number":272,"context_line":"    def dependencies_installed(self):"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a740942_cc8fbd28","line":269,"in_reply_to":"9a8ffd7b_024aa583","updated":"2017-12-18 08:23:41.000000000","message":"see my response in influxdb.py","commit_id":"50fa93f853a72d42081d1fdfc969e0eb30c2c385"}]}
