diff --git a/environment.yaml b/environment.yaml index f426837..1f13784 100644 --- a/environment.yaml +++ b/environment.yaml @@ -9,16 +9,6 @@ euprod-coco: - resolution: "1M" - fromDate: "now-6M" - toDate: "now" -euprod-gcdm: - - name: "euprod" - - env-url: "https://moh22956.live.dynatrace.com" - - env-token-name: "EUPRODSAAS_TOKEN_VAR" - - jenkins: "https://jaws.bmwgroup.net/opapm/" - - type: "gcdm" - - metricSelector: "builtin:dashboards.viewCount:splitBy(id):sort(value(auto,ascending))" - - resolution: "1M" - - fromDate: "now-6M" - - toDate: "now" eupreprod-coco: - name: "eupreprod" - env-url: "https://qqk70169.live.dynatrace.com" @@ -61,7 +51,7 @@ cnprod-coco: - toDate: "now" cnpreprod-coco: - name: "cnpreprod" - - env-url: "https://dynatracemgd-tsp.bmwgroup.net/e/ab88c03b-b7fc-45f0-9115-9e9ecc0ced35" + - env-url: "https://dyna-synth-cn.bmwgroup.com.cn/e/ab88c03b-b7fc-45f0-9115-9e9ecc0ced35" - env-token-name: "CNPREPROD_TOKEN_VAR" - jenkins: "https://jaws-china.bmwgroup.net/opmaas/" - type: "coco" diff --git a/main.py b/main.py index ad98d36..20e20ad 100644 --- a/main.py +++ b/main.py @@ -22,7 +22,7 @@ def getDashboards(DT_CLIENT): if __name__ == "__main__": - logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s') + logging.basicConfig(level=logging.WARNING, format='%(levelname)s: %(message)s') with open(os.path.basename("./environment.yaml")) as env_cfg: environment = yaml.safe_load(env_cfg) @@ -40,7 +40,7 @@ if __name__ == "__main__": logging.info(item, " init Dynatrace client ...") DT_CLIENT = Dynatrace(DT_URL, DT_TOKEN, logging.Logger("ERROR"), - None, None, 0, 2*1000) + None, None, 0, 10*1000) logging.info(item, " fetching all dashboards ...") dashboards = getDashboards(DT_CLIENT) @@ -50,4 +50,3 @@ if __name__ == "__main__": viewcounts = getDashboardsWithViewCount(DT_CLIENT, METRIC_SELECTOR, RESOLUTION, FROM_DATE, TO_DATE) - \ No newline at end of file