mirror of
https://github.com/vacp2p/10ksim.git
synced 2025-02-23 11:38:51 +00:00
23 lines
496 B
Python
23 lines
496 B
Python
# Python Imports
|
|
from kubernetes import client, config
|
|
|
|
# Project Imports
|
|
|
|
from src.metrics.scrapper import Scrapper
|
|
|
|
|
|
def main():
|
|
config.load_kube_config("your_kubeconfig.yaml")
|
|
url = "your_url"
|
|
namespace = "'zerotesting'"
|
|
metrics = ["container_network_receive_bytes_total", "container_network_sent_bytes_total"]
|
|
|
|
v1 = client.CoreV1Api()
|
|
|
|
scrapper = Scrapper(url, namespace, "test/", metrics)
|
|
scrapper.query_and_dump_metrics()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|