31 lines
887 B
Python
Executable File
31 lines
887 B
Python
Executable File
#! /usr/bin/python3
|
|
# aom_builder.py
|
|
# point of the builder is to generate a valid yaml config that could be read in to the main app by
|
|
# asking for clarifying questions on what to check and how to alert on it
|
|
# this comes from 4 questions:
|
|
# When to query
|
|
# What to query for
|
|
# Whats an alert
|
|
# Who to Alert
|
|
|
|
from webapp import app
|
|
from library.logger import AlertLogging
|
|
from library.args import get_builder_args
|
|
|
|
log = AlertLogging('aom')
|
|
log.start()
|
|
log.start_log_file("logs/aom_builder.log")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
# GET ARGS AND START LOGGING
|
|
args = get_builder_args()
|
|
# logger.init("logs/aom_builder.log", args['log_level'])
|
|
# aom_logger = logging.getLogger(__name__)
|
|
log.info("Logger Initialized")
|
|
# ENABLE SESSIONS TO KEEP YAML FILE STATE BETWEEN PAGES
|
|
log.info("Starting webapp")
|
|
app.run(host='localhost', port=args['port'], debug=True)
|
|
|
|
|