@@ -56,7 +56,7 @@ func getRoles(node NodeStatsNodeResponse) map[string]bool {
56
56
}
57
57
}
58
58
}
59
- if len ( node .HTTP ) == 0 {
59
+ if node .HTTP == nil {
60
60
roles ["client" ] = false
61
61
}
62
62
return roles
@@ -1462,6 +1462,30 @@ func NewNodes(logger log.Logger, client *http.Client, url *url.URL, all bool, no
1462
1462
return defaultNodeLabelValues (cluster , node )
1463
1463
},
1464
1464
},
1465
+ {
1466
+ Type : prometheus .GaugeValue ,
1467
+ Desc : prometheus .NewDesc (
1468
+ prometheus .BuildFQName (namespace , "transport" , "tcp_connections_open_current" ),
1469
+ "Current number of connections open for cluster communication" ,
1470
+ defaultNodeLabels , nil ,
1471
+ ),
1472
+ Value : func (node NodeStatsNodeResponse ) float64 {
1473
+ return float64 (node .Transport .ServerOpen )
1474
+ },
1475
+ Labels : defaultNodeLabelValues ,
1476
+ },
1477
+ {
1478
+ Type : prometheus .CounterValue ,
1479
+ Desc : prometheus .NewDesc (
1480
+ prometheus .BuildFQName (namespace , "transport" , "outbound_connections_total" ),
1481
+ "Count of outbound transport connections" ,
1482
+ defaultNodeLabels , nil ,
1483
+ ),
1484
+ Value : func (node NodeStatsNodeResponse ) float64 {
1485
+ return float64 (node .Transport .OutboundConn )
1486
+ },
1487
+ Labels : defaultNodeLabelValues ,
1488
+ },
1465
1489
{
1466
1490
Type : prometheus .CounterValue ,
1467
1491
Desc : prometheus .NewDesc (
@@ -1510,6 +1534,30 @@ func NewNodes(logger log.Logger, client *http.Client, url *url.URL, all bool, no
1510
1534
},
1511
1535
Labels : defaultNodeLabelValues ,
1512
1536
},
1537
+ {
1538
+ Type : prometheus .GaugeValue ,
1539
+ Desc : prometheus .NewDesc (
1540
+ prometheus .BuildFQName (namespace , "http" , "connections_opened_current" ),
1541
+ "Current number of open HTTP connections" ,
1542
+ defaultNodeLabels , nil ,
1543
+ ),
1544
+ Value : func (node NodeStatsNodeResponse ) float64 {
1545
+ return float64 (node .HTTP .CurrentOpen )
1546
+ },
1547
+ Labels : defaultNodeLabelValues ,
1548
+ },
1549
+ {
1550
+ Type : prometheus .CounterValue ,
1551
+ Desc : prometheus .NewDesc (
1552
+ prometheus .BuildFQName (namespace , "http" , "connections_opened_total" ),
1553
+ "Total number of HTTP connections opened " ,
1554
+ defaultNodeLabels , nil ,
1555
+ ),
1556
+ Value : func (node NodeStatsNodeResponse ) float64 {
1557
+ return float64 (node .HTTP .TotalOpen )
1558
+ },
1559
+ Labels : defaultNodeLabelValues ,
1560
+ },
1513
1561
},
1514
1562
gcCollectionMetrics : []* gcCollectionMetric {
1515
1563
{
0 commit comments