@@ -6,20 +6,20 @@ func RegisterForProxy() {
66}
77
88var collectProxyMetrics map [string ]MetricConfig = map [string ]MetricConfig {
9- "ops_total " : {
9+ "total_ops " : {
1010 Parser : & normalParser {},
1111 MetricMeta : & MetaData {
12- Name : "ops_total " ,
12+ Name : "total_ops " ,
1313 Help : "proxy total ops" ,
1414 Type : metricTypeCounter ,
1515 Labels : []string {LabelNameAddr , LabelID , LabelProductName },
1616 ValueName : "ops_total" ,
1717 },
1818 },
19- "ops_fails " : {
19+ "total_ops_fails " : {
2020 Parser : & normalParser {},
2121 MetricMeta : & MetaData {
22- Name : "ops_fails " ,
22+ Name : "total_ops_fails " ,
2323 Help : "proxy fails counter" ,
2424 Type : metricTypeCounter ,
2525 Labels : []string {LabelNameAddr , LabelID , LabelProductName },
@@ -66,23 +66,23 @@ var collectProxyMetrics map[string]MetricConfig = map[string]MetricConfig{
6666 ValueName : "online" ,
6767 },
6868 },
69- "timeout_cmd_number " : {
69+ "total_slow_cmd " : {
7070 Parser : & normalParser {},
7171 MetricMeta : & MetaData {
72- Name : "timeout_cmd_number " ,
73- Help : "The number of commands recorded in the slow log within the last second " ,
74- Type : metricTypeGauge ,
72+ Name : "total_slow_cmd " ,
73+ Help : "The number of commands recorded in the slow log" ,
74+ Type : metricTypeCounter ,
7575 Labels : []string {LabelNameAddr , LabelID , LabelProductName },
76- ValueName : "timeout_cmd_number " ,
76+ ValueName : "slow_cmd_count " ,
7777 },
7878 },
7979}
8080
8181var collectPorxyCmdMetrics map [string ]MetricConfig = map [string ]MetricConfig {
82- "calls " : {
82+ "total_calls " : {
8383 Parser : & proxyParser {},
8484 MetricMeta : & MetaData {
85- Name : "calls " ,
85+ Name : "total_calls " ,
8686 Help : "the number of cmd calls" ,
8787 Type : metricTypeCounter ,
8888 Labels : []string {LabelNameAddr , LabelID , LabelProductName , LabelOpstr },
@@ -99,14 +99,24 @@ var collectPorxyCmdMetrics map[string]MetricConfig = map[string]MetricConfig{
9999 ValueName : "usecs_percall" ,
100100 },
101101 },
102- "fails " : {
102+ "total_fails " : {
103103 Parser : & proxyParser {},
104104 MetricMeta : & MetaData {
105- Name : "fails " ,
105+ Name : "total_fails " ,
106106 Help : "the number of cmd fail" ,
107107 Type : metricTypeCounter ,
108108 Labels : []string {LabelNameAddr , LabelID , LabelProductName , LabelOpstr },
109109 ValueName : "fails" ,
110110 },
111111 },
112+ "max_delay" : {
113+ Parser : & proxyParser {},
114+ MetricMeta : & MetaData {
115+ Name : "max_delay" ,
116+ Help : "The maximum time consumed by this command since the last collection." ,
117+ Type : metricTypeGauge ,
118+ Labels : []string {LabelNameAddr , LabelID , LabelProductName , LabelOpstr },
119+ ValueName : "max_delay" ,
120+ },
121+ },
112122}
0 commit comments