aboutsummaryrefslogtreecommitdiff
path: root/collector/tcpstat_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'collector/tcpstat_linux.go')
-rw-r--r--collector/tcpstat_linux.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/collector/tcpstat_linux.go b/collector/tcpstat_linux.go
index db9c655..af5ae98 100644
--- a/collector/tcpstat_linux.go
+++ b/collector/tcpstat_linux.go
@@ -82,7 +82,7 @@ func NewTCPStatCollector(logger log.Logger) (Collector, error) {
82func (c *tcpStatCollector) Update(ch chan<- prometheus.Metric) error { 82func (c *tcpStatCollector) Update(ch chan<- prometheus.Metric) error {
83 tcpStats, err := getTCPStats(procFilePath("net/tcp")) 83 tcpStats, err := getTCPStats(procFilePath("net/tcp"))
84 if err != nil { 84 if err != nil {
85 return fmt.Errorf("couldn't get tcpstats: %s", err) 85 return fmt.Errorf("couldn't get tcpstats: %w", err)
86 } 86 }
87 87
88 // if enabled ipv6 system 88 // if enabled ipv6 system
@@ -90,7 +90,7 @@ func (c *tcpStatCollector) Update(ch chan<- prometheus.Metric) error {
90 if _, hasIPv6 := os.Stat(tcp6File); hasIPv6 == nil { 90 if _, hasIPv6 := os.Stat(tcp6File); hasIPv6 == nil {
91 tcp6Stats, err := getTCPStats(tcp6File) 91 tcp6Stats, err := getTCPStats(tcp6File)
92 if err != nil { 92 if err != nil {
93 return fmt.Errorf("couldn't get tcp6stats: %s", err) 93 return fmt.Errorf("couldn't get tcp6stats: %w", err)
94 } 94 }
95 95
96 for st, value := range tcp6Stats { 96 for st, value := range tcp6Stats {