Pull request #4: Adding support for GCDM environments
Merge in OPAPM/global_dashboard_as_code from OPMAAS-4025 to master * commit '3a31327bdbe23f47a7232ca683571e134545277e': FIX URL BUG Adding support for GCDM environmentsmaster
commit
8f6778e5d6
|
|
@ -413,12 +413,14 @@ def main(slo_path):
|
|||
"euprod":
|
||||
{
|
||||
"offset": offsets[0],
|
||||
"remote_url": 'https://xxu26128.live.dynatrace.com'
|
||||
"remote_url": 'https://xxu26128.live.dynatrace.com',
|
||||
"remote_url_gcdm": 'https://moh22956.live.dynatrace.com'
|
||||
},
|
||||
"naprod":
|
||||
{
|
||||
"offset": offsets[1],
|
||||
"remote_url": 'https://wgv50241.live.dynatrace.com'
|
||||
"remote_url": 'https://wgv50241.live.dynatrace.com',
|
||||
"remote_url_gcdm": 'https://pcj77768.live.dynatrace.com'
|
||||
},
|
||||
"cnprod":
|
||||
{
|
||||
|
|
@ -471,18 +473,22 @@ def main(slo_path):
|
|||
cnslourl = hub_config["cnprod"]["remote_url"] + "/ui/slo?id="+configuration["ids"]["cn"]+"&sloexp="+configuration["ids"]["cn"]+"&slovis=Table"
|
||||
dashboard_json.append(get_DataExplorerTile_Markdown(slo_display, slo_department, get_bounds(((boundindex)*(3)) , 0 , 7 , 3), configuration["ops_dashboard"]["emea"], configuration["ops_dashboard"]["na"], configuration["ops_dashboard"]["cn"],configuration["doc_url"],emeaslourl,naslourl,cnslourl,slorelevant,args.wall))
|
||||
for hub,tiles in configuration["hubs"].items():
|
||||
if(configuration["hubs"][hub]["type"] == "gcdm"):
|
||||
remoteurl = hub_config[hub]["remote_url_gcdm"]
|
||||
else:
|
||||
remoteurl = hub_config[hub]["remote_url"]
|
||||
if 'actual' in tiles["tiles"]:
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 7 + hub_config[hub]["offset"] , 4 , 3), timeframe_actual, slo_graphThreshold_SingleValue))
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 7 + hub_config[hub]["offset"] , 4 , 3), timeframe_actual, slo_graphThreshold_SingleValue))
|
||||
if "graph" in tiles["tiles"]:
|
||||
if(args.wall):
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 12 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), remoteurl, get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 12 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
else:
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 6 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
dashboard_json.append(get_DataExplorerTile_Graph(slo_name, configuration["metric"], configuration["selector_var"].replace("~",""), remoteurl, get_bounds(((boundindex)*(3)) , 11 + hub_config[hub]["offset"] , 6 , 3), timeframe_graph, "97", "100.1", slo_graphThreshold_Graph, getSloReqCountSelector(getSloSrvNames(hub_config, configuration, doc, hub)),getSloReqTimeSelector(getSloSrvNames(hub_config, configuration, doc, hub))))
|
||||
if "ytd" in tiles["tiles"]:
|
||||
if(args.wall):
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 23 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 23 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
else:
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], hub_config[hub]["remote_url"], get_bounds(((boundindex)*(3)) , 17 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
dashboard_json.append(get_DataExplorerTile_SingleValue(slo_name, configuration["metric"], remoteurl, get_bounds(((boundindex)*(3)) , 17 + hub_config[hub]["offset"] , 4 , 3), timeframe_ytd, slo_graphThreshold_SingleValue))
|
||||
boundindex = boundindex+1
|
||||
if rowcount > 0 and boundindex > rowcount:
|
||||
with open("dashboard_tiles_"+str(dahboardcount)+".json", "w") as file:
|
||||
|
|
|
|||
Loading…
Reference in New Issue