2024-02-13 16:14:12 +01:00
|
|
|
# Python Imports
|
|
|
|
|
|
|
|
# Project Imports
|
2024-03-13 18:31:18 +01:00
|
|
|
import src.logger.logger
|
2024-02-13 16:14:12 +01:00
|
|
|
from src.metrics.scrapper import Scrapper
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
2024-03-21 13:08:27 +01:00
|
|
|
config.load_kube_config("opal.yaml")
|
|
|
|
url = "http://thanos-query.svc.thanos.kubernetes:9090/api/v1/"
|
2024-02-21 19:18:01 +01:00
|
|
|
scrape_config = "scrape.yaml"
|
2024-02-13 16:14:12 +01:00
|
|
|
|
|
|
|
v1 = client.CoreV1Api()
|
|
|
|
|
2024-03-21 13:08:27 +01:00
|
|
|
scrapper = Scrapper(v1, url, scrape_config, "test/")
|
|
|
|
scrapper.query_and_dump_metrics()
|
2024-03-13 18:31:18 +01:00
|
|
|
|
2024-03-21 13:08:27 +01:00
|
|
|
# config_dict = file_utils.read_yaml_file("scrape.yaml")
|
|
|
|
# plotter = Plotter(config_dict["plotting"])
|
|
|
|
# plotter.create_plots()
|
|
|
|
# portforward_commands(v1)
|
2024-02-13 16:14:12 +01:00
|
|
|
|
2023-09-13 16:28:00 +02:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2024-02-13 16:14:12 +01:00
|
|
|
main()
|