{"record":{"id":"291e6146b7d20af1","repo":"prometheus/node_exporter","slug":"could-not-get-softnet-statistics-w","errorCode":null,"errorMessage":"could not get softnet statistics: %w","messagePattern":"could not get softnet statistics: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"collector/softnet_linux.go","lineNumber":101,"sourceCode":"\t\t\t\"Number of times flow limit has been reached\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tsoftnetBacklogLen: prometheus.NewDesc(\n\t\t\tprometheus.BuildFQName(namespace, softnetSubsystem, \"backlog_len\"),\n\t\t\t\"Softnet backlog status\",\n\t\t\t[]string{\"cpu\"}, nil,\n\t\t),\n\t\tlogger: logger,\n\t}, nil\n}\n\n// Update gets parsed softnet statistics using procfs.\nfunc (c *softnetCollector) Update(ch chan<- prometheus.Metric) error {\n\tvar cpu string\n\n\tstats, err := c.fs.NetSoftnetStat()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not get softnet statistics: %w\", err)\n\t}\n\n\tfor _, cpuStats := range stats {\n\t\tcpu = strconv.FormatUint(uint64(cpuStats.Index), 10)\n\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.processed,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.Processed),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(\n\t\t\tc.dropped,\n\t\t\tprometheus.CounterValue,\n\t\t\tfloat64(cpuStats.Dropped),\n\t\t\tcpu,\n\t\t)\n\t\tch <- prometheus.MustNewConstMetric(","sourceCodeStart":83,"sourceCodeEnd":119,"githubUrl":"https://github.com/prometheus/node_exporter/blob/17ddd77c59ba27e1508e9f7894b1e55b44d6aed3/collector/softnet_linux.go#L83-L119","documentation":"The per-CPU softnet statistics could not be read from procfs: c.fs.NetSoftnetStat() failed while Update() was gathering metrics for the /proc/net/softnet_stat file. This fires when /proc/net/softnet_stat is missing or unreadable, which typically happens on kernels without networking procfs support or in restricted containers/LSMs (e.g. AppArmor/SELinux) that deny reads of procfs networking files; the wrapped error names the underlying cause. Update returns the error so the scrape reports a failed collection rather than partial softnet metrics.","triggerScenarios":"Thrown at collector/softnet_linux.go:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check `cat /proc/net/softnet_stat` — it should have one hex column row per CPU.","Ensure the file is readable by the exporter user (hidepid or LSM policies can block it).","Retry; transient errors during CPU hotplug clear on the next scrape."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"17ddd77c59ba27e1508e9f7894b1e55b44d6aed3","analyzedAt":"2026-09-07T17:54:06.211Z","contentChangedAt":"2026-09-07T17:54:06.211Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}