Skip to content

Commit

Permalink
fix: make graphite key optional
Browse files Browse the repository at this point in the history
fix for #72
  • Loading branch information
rickymoorhouse committed Aug 30, 2023
1 parent 0b7e06b commit 73aeb21
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions trawler.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ def __init__(self, config_file=None):
port = self.config['prometheus'].get('port')
logger.info('Starting prometheus http port at http://0.0.0.0:{}'.format(port))
start_http_server(port)
if self.config['graphite']['enabled']:
self.graphite = metrics_graphite.instance(self.config['graphite'])
if 'graphite' in self.config:
if self.config['graphite']['enabled']:
self.graphite = metrics_graphite.instance(self.config['graphite'])

use_kubeconfig = False
if 'trawler' in self.config:
Expand Down

0 comments on commit 73aeb21

Please sign in to comment.