In my v1 python extension I have a definition “initialize” that only will be executed during a first run, also referencing to a HealthcheckHost.json file
def initialize(self, **kwargs):
#will only be executed during the first run. #capture parameters and save them in memmory script_dir = os.path.dirname(__file__) file_path = os.path.join(script_dir, “HealthcheckHosts.json”)
#read in parameters self.url = self.config[“url”] self.hostpattern = self.config[“hosts”] self.disableAlertBool = self.config[“disableAllerting”] self.httpmethod = self.config[“httpmethod”] self.rqmethod = self.config[“requestmethod”] self.port = 9000 self.applicationcheckname = self.config[“app”] splits = self.url.split(‘/’) self.appextentionname = splits[1] self.warningSend = False…Can somebody explain me where I need to put this definition in the new extension v2 structure???
cfr: Extension Structure — dt-sdk 1.0.0 documentation (dynatrace-extensions.github.io)
