Skip to content

Commit

Permalink
#1706 Make influxdb application parameter optional
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-gazo committed Mar 20, 2023
1 parent 08edd2a commit c9c6bdf
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions bzt/modules/influxdb_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,7 @@ def prepare(self):
super(InfluxdbStatusReporter, self).prepare()

self.send_data = self.parameters.get("send-data", self.send_data)

self.application = self.parameters.get("application", self.settings.get("application", self.application))
if not self.application:
raise bzt.TaurusConfigError("'application' property must be set. You should fix your configuration.")

self.measurement = self.settings.get("measurement", None)
host = self.settings.get("host", 'localhost')
port = self.settings.get("port", 8086)
Expand Down Expand Up @@ -346,11 +342,13 @@ def __report_bytes(self, kpi_set, sample_label=None, ts=None):
return metrics

def __compute_common_tags(self):
return {
self.TAG_APPLICATION: self.application,
common_tags = {
self.TAG_TRANSACTION: self.TAG_ALL,
self.TAG_STATUS: self.TAG_ALL,
}
if self.application is not None:
common_tags[self.TAG_APPLICATION] = self.application
return common_tags

@staticmethod
def __merge_tags(series, common_tags=None):
Expand Down

0 comments on commit c9c6bdf

Please sign in to comment.