def register_hop_response_graph(): new_graph = { "title": _("Hop response times"), "metrics": [], "optional_metrics": [], } # type: Dict[str, Any] for idx in range(1, MAX_NUMBER_HOPS): color = indexed_color(idx, MAX_NUMBER_HOPS) new_graph["metrics"].append( ("hop_%d_response_time%s" % (idx, parse_color_into_hexrgb(color)), "line")) if idx > 0: new_graph["optional_metrics"].append(("hop_%d_response_time" % (idx + 1))) graph_info["hop_response_time"] = new_graph
def register_oracle_metrics(): # waitclass totals metric_info["oracle_wait_class_total"] = { "title": _("ORACLE Total waited"), "unit": "1/s", "color": "#100", } metric_info["oracle_wait_class_total_fg"] = { "title": _("ORACLE Total waited (FG)"), "unit": "1/s", "color": "#100", } # waitclasses for index, waitclass in enumerate(oracle_waitclasses): metric_info[waitclass.metric] = { "title": _("ORACLE %s wait class") % waitclass.name, "unit": "1/s", "color": indexed_color(index + 1, len(oracle_waitclasses)), } metric_info[waitclass.metric_fg] = { "title": _("ORACLE %s wait class (FG)") % waitclass.name, "unit": "1/s", "color": indexed_color(index + 1, len(oracle_waitclasses)), } # iofiles color_index = 0 for iofile_name, iofile_id in oracle_iofiles: for size_code, size_text in oracle_io_sizes: color_index += 1 for io_code, io_text, unit in oracle_io_types: metric_info["oracle_ios_f_%s_%s_%s" % (iofile_id, size_code, io_code)] = { "title": _("ORACLE %s %s %s") % (iofile_name, size_text, io_text), "unit": unit, "color": indexed_color(color_index, len(oracle_iofiles) * len(oracle_io_sizes)), } # iofiles totals metric_info["oracle_ios_f_total_s_rb"] = { "title": _("ORACLE Total Small Read Bytes"), "unit": "bytes/s", "color": "#50d090", } metric_info["oracle_ios_f_total_s_wb"] = { "title": _("ORACLE Total Small Write Bytes"), "unit": "bytes/s", "color": "#5090d0", } metric_info["oracle_ios_f_total_l_rb"] = { "title": _("ORACLE Total Large Read Bytes"), "unit": "bytes/s", "color": "#30b070", } metric_info["oracle_ios_f_total_l_wb"] = { "title": _("ORACLE Total Large Write Bytes"), "unit": "bytes/s", "color": "#3070b0", } metric_info["oracle_ios_f_total_s_r"] = { "title": _("ORACLE Total Small Reads"), "unit": "1/s", "color": "#50d090", } metric_info["oracle_ios_f_total_s_w"] = { "title": _("ORACLE Total Small Writes"), "unit": "1/s", "color": "#5090d0", } metric_info["oracle_ios_f_total_l_r"] = { "title": _("ORACLE Total Large Reads"), "unit": "1/s", "color": "#30b070", } metric_info["oracle_ios_f_total_l_w"] = { "title": _("ORACLE Total Large Writes"), "unit": "1/s", "color": "#3070b0", } # SGAs for index, sga in enumerate(oracle_sga_fields): metric_info[sga.metric] = { "title": _("ORACLE %s") % sga.name, "unit": "bytes", "color": indexed_color(index + 1, len(oracle_sga_fields)), } # PGAs metric_info["oracle_pga_total_pga_allocated"] = { "title": ("ORACLE total PGA allocated"), "unit": "bytes", "color": "#e0e0e0", } metric_info["oracle_pga_total_pga_inuse"] = { "title": ("ORACLE total PGA inuse"), "unit": "bytes", "color": "#71ad9f", } metric_info["oracle_pga_total_freeable_pga_memory"] = { "title": ("ORACLE total freeable PGA memory"), "unit": "bytes", "color": "#7192ad", } # other metrics for what, descr, unit, color in [ ("db_cpu", "DB CPU time", "1/s", "#60f020"), ("db_time", "DB time", "1/s", "#004080"), ("db_wait_time", "DB Non-Idle Wait", "1/s", "00b0c0"), ("buffer_hit_ratio", "buffer hit ratio", "%", "21/a"), ("physical_reads", "physical reads", "1/s", "43/b"), ("physical_writes", "physical writes", "1/s", "26/a"), ("db_block_gets", "block gets", "1/s", "13/a"), ("db_block_change", "block change", "1/s", "15/a"), ("consistent_gets", "consistent gets", "1/s", "21/a"), ("free_buffer_wait", "free buffer wait", "1/s", "25/a"), ("buffer_busy_wait", "buffer busy wait", "1/s", "41/a"), ("library_cache_hit_ratio", "library cache hit ratio", "%", "21/b"), ("pins_sum", "pins sum", "1/s", "41/a"), ("pin_hits_sum", "pin hits sum", "1/s", "46/a"), ]: metric_info["oracle_%s" % what] = { "title": _("ORACLE %s") % descr, "unit": unit, "color": color, }
metric_info["cpu_entitlement_util"] = { "title": _("Physical CPU consumption"), "unit": "", "color": "#FF0000", } for i in range(MAX_CORES): # generate different colors for each core. # unfortunately there are only 24 colors on our # color wheel, times two for two shades each, we # can only draw 48 differently colored graphs metric_info["cpu_core_util_%d" % i] = { "title": _("Utilization Core %d") % (i + 1), "unit": "%", "color": indexed_color(i, MAX_CORES), } metric_info["cpu_core_util_average_%d" % i] = { "title": _("Average utilization core %d") % (i + 1), "unit": "%", "color": indexed_color(i, MAX_CORES), } metric_info["cpu_time_percent"] = { "title": _("CPU time"), "unit": "%", "color": "#94b65a", } metric_info["system_time"] = { "title": _("CPU time in system space"),
'title': _('Spot Fleet Requests Total Target Capacity'), 'unit': 'count', 'color': '23/a', } metric_info['aws_ec2_running_ondemand_instances_total'] = { 'title': _('Total running On-Demand Instances'), 'unit': 'count', 'color': '#000000', } for i, inst_type in enumerate(AWSEC2InstTypes): metric_info['aws_ec2_running_ondemand_instances_%s' % inst_type] = { 'title': _('Total running On-Demand %s Instances') % inst_type, 'unit': 'count', 'color': indexed_color(i, len(AWSEC2InstTypes)), } for inst_fam in AWSEC2InstFamilies: metric_info['aws_ec2_running_ondemand_instances_%s_vcpu' % inst_fam[0]] = { 'title': _('Total %s vCPUs') % AWSEC2InstFamilies[inst_fam], 'unit': 'count', 'color': '25/a', } metric_info['aws_consumed_lcus'] = { 'title': _('Consumed Load Balancer Capacity Units'), 'unit': '', 'color': '11/a', }
for i in range(10): metric_info["rx_light_%d" % i] = { "title": _("RX Signal Power Lane %d") % (i + 1), "unit": "dbm", "color": "35/b", } metric_info["tx_light_%d" % i] = { "title": _("TX Signal Power Lane %d") % (i + 1), "unit": "dbm", "color": "15/b", } metric_info["port_temp_%d" % i] = { "title": _("Temperature Lane %d") % (i + 1), "unit": "dbm", "color": indexed_color(i * 3 + 2, 30), } metric_info["fan"] = { "title": _("Fan speed"), "unit": "rpm", "color": "16/b", } metric_info["fan_perc"] = { "title": _("Fan speed"), "unit": "%", "color": "16/b", } #.