Fix flake8 errors
Change-Id: Idb1c1fbe9484b118ec6fe20b7176e173c83694a1
This commit is contained in:
parent
674cefe1e7
commit
1f24f46332
@ -267,7 +267,7 @@ class Collector(util.Dimensions):
|
||||
if len(self.collection_results) >= self.pool_size:
|
||||
self.pool_full_count += 1
|
||||
if (self.pool_full_count > self.pool_full_max_retries):
|
||||
log.error('Thread Pool full and %d plugins still running for ' +
|
||||
log.error('Thread Pool full and %d plugins still running for '
|
||||
'%d collection cycles, exiting' %
|
||||
(len(self.collection_results), self.pool_full_count))
|
||||
os._exit(1)
|
||||
|
@ -123,7 +123,8 @@ class Apache(checks.AgentCheck):
|
||||
self.check(instance)
|
||||
else:
|
||||
return services_checks.Status.DOWN,
|
||||
"%s is DOWN, error: No metrics available.".format(service_check_name)
|
||||
"{} is DOWN, error: No metrics available.".format(
|
||||
service_check_name)
|
||||
else:
|
||||
log.debug("Collected {0} metrics for {1} Apache Web Server".format(apache_host,
|
||||
metric_count))
|
||||
|
@ -407,8 +407,8 @@ class Ceph(checks.AgentCheck):
|
||||
# In Luminous the format of output parsed here changed slightly.
|
||||
# Check for both known variations.
|
||||
ceph_status_plain = ceph_status_plain.split('\n')
|
||||
for l in ceph_status_plain:
|
||||
line = l.strip(' ')
|
||||
for raw_line in ceph_status_plain:
|
||||
line = raw_line.strip(' ')
|
||||
if line.startswith('recovery io') or line.startswith('recovery:'):
|
||||
metrics.update(self._get_recovery_io(line))
|
||||
elif line.startswith('client io') or line.startswith('client:'):
|
||||
|
@ -66,7 +66,8 @@ class TCPCheck(ServicesCheck):
|
||||
addr, port, socket_type, timeout, response_time = self._load_conf(instance)
|
||||
dimensions = self._set_dimensions(None, instance)
|
||||
if instance.get('host'):
|
||||
dimensions.update({'url': '%s:%s'.format(instance.get('host'), port)})
|
||||
dimensions.update({'url': '{}:{}'.format(instance.get('host'),
|
||||
port)})
|
||||
start = time.time()
|
||||
try:
|
||||
self.log.debug("Connecting to %s %s" % (addr, port))
|
||||
|
Loading…
Reference in New Issue
Block a user