Open
Description
When running the project with a config.yaml file that doesn't include the graphite key, the following error is raised:
Traceback (most recent call last):
...
File "/app/trawler.py", line 55, in __init__
if self.config['graphite']['enabled']:
KeyError: 'graphite'
This seems to indicate that the graphite key is expected in the config.yaml file, although it's not included in example configurations or documented.
Steps to Reproduce:
- Clone the project.
- Run the tests:
SECRETS=test-assets coverage run --source . -m py.test
- Run the application with a config.yaml that doesn't include the graphite key:
python3 trawler.py --config deployment/config.yaml
Expected Behavior:
The application should either run without requiring the graphite key or should provide a more descriptive error message if the key is required.
Suggested Solution:
Document the graphite Key: Update the example config.yaml file and documentation to include the graphite key. For example:
# Example configuration file
trawler:
frequency: 10
use_kubeconfig: false
logging:
level: debug
filters: trawler:trace
format: pretty
prometheus:
port: 63512
enabled: true
graphite:
enabled: false
nets:
datapower:
enabled: true
username: admin
namespace: apic
manager:
enabled: true
username: admin
namespace: apic
analytics:
enabled: true
namespace: apic
Metadata
Assignees
Labels
No labels