diff --git a/pkg/collector/collector.go b/pkg/collector/collector.go index af54356..7e5c1a4 100644 --- a/pkg/collector/collector.go +++ b/pkg/collector/collector.go @@ -34,7 +34,8 @@ var ( channelStuckPacketsMetricName, "Returns stuck packets for a channel.", []string{ - "channel_id", + "src_channel_id", + "dst_channel_id", "src_chain_id", "dst_chain_id", "status", @@ -45,7 +46,8 @@ var ( channelSrcStuckPacketsMetricName, "Returns source stuck packets for a channel.", []string{ - "channel_id", + "src_channel_id", + "dst_channel_id", "src_chain_id", "dst_chain_id", "status", @@ -56,7 +58,8 @@ var ( channelDstStuckPacketsMetricName, "Returns destination stuck packets for a channel.", []string{ - "channel_id", + "src_channel_id", + "dst_channel_id", "src_chain_id", "dst_chain_id", "status", @@ -129,6 +132,7 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) { if err != nil { status = errorStatus + fmt.Println("FOOOOBAAAAR") log.Error(err.Error()) } @@ -138,7 +142,8 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) { prometheus.GaugeValue, float64(sp.StuckPackets.Total), []string{ - sp.Name, + sp.Source, + sp.Destination, (*cc.RPCs)[path.Chain1.ChainName].ChainID, (*cc.RPCs)[path.Chain2.ChainName].ChainID, status, @@ -150,7 +155,8 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) { prometheus.GaugeValue, float64(sp.StuckPackets.Source), []string{ - sp.Name, + sp.Source, + sp.Destination, (*cc.RPCs)[path.Chain1.ChainName].ChainID, (*cc.RPCs)[path.Chain2.ChainName].ChainID, status, @@ -162,7 +168,8 @@ func (cc IBCCollector) Collect(ch chan<- prometheus.Metric) { prometheus.GaugeValue, float64(sp.StuckPackets.Destination), []string{ - sp.Name, + sp.Source, + sp.Destination, (*cc.RPCs)[path.Chain1.ChainName].ChainID, (*cc.RPCs)[path.Chain2.ChainName].ChainID, status, diff --git a/pkg/ibc/ibc.go b/pkg/ibc/ibc.go index a9ea576..33e43fd 100644 --- a/pkg/ibc/ibc.go +++ b/pkg/ibc/ibc.go @@ -28,7 +28,8 @@ type ChannelsInfo struct { } type Channel struct { - Name string + Source string + Destination string StuckPackets struct { Source int Destination int @@ -133,7 +134,8 @@ func GetChannelsInfo(ibc *relayer.IBCdata, rpcs *map[string]config.RPC) (Channel var channel Channel - channel.Name = c.Chain1.ChannelID + channel.Source = c.Chain1.ChannelID + channel.Destination = c.Chain2.ChannelID switch c.Ordering { case "none":