mirror of
https://github.com/prometheus/node_exporter.git
synced 2025-08-20 18:33:52 -07:00
chore: fix some typos (#3316)
Signed-off-by: Nabil <nabilcharaf37@gmail.com>
This commit is contained in:
parent
467d1f3d7d
commit
e942bae99f
|
@ -22,12 +22,12 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
cpuVulerabilitiesCollector = "cpu_vulnerabilities"
|
||||
cpuVulnerabilitiesCollectorSubsystem = "cpu_vulnerabilities"
|
||||
)
|
||||
|
||||
var (
|
||||
vulnerabilityDesc = prometheus.NewDesc(
|
||||
prometheus.BuildFQName(namespace, cpuVulerabilitiesCollector, "info"),
|
||||
prometheus.BuildFQName(namespace, cpuVulnerabilitiesCollectorSubsystem, "info"),
|
||||
"Details of each CPU vulnerability reported by sysfs. The value of the series is an int encoded state of the vulnerability. The same state is stored as a string in the label",
|
||||
[]string{"codename", "state", "mitigation"},
|
||||
nil,
|
||||
|
@ -37,7 +37,7 @@ var (
|
|||
type cpuVulnerabilitiesCollector struct{}
|
||||
|
||||
func init() {
|
||||
registerCollector(cpuVulerabilitiesCollector, defaultDisabled, NewVulnerabilitySysfsCollector)
|
||||
registerCollector(cpuVulnerabilitiesCollectorSubsystem, defaultDisabled, NewVulnerabilitySysfsCollector)
|
||||
}
|
||||
|
||||
func NewVulnerabilitySysfsCollector(logger *slog.Logger) (Collector, error) {
|
||||
|
|
|
@ -106,7 +106,7 @@ func (c *processCollector) Update(ch chan<- prometheus.Metric) error {
|
|||
|
||||
pidM, err := readUintFromFile(procFilePath("sys/kernel/pid_max"))
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to retrieve limit number of maximum pids alloved: %w", err)
|
||||
return fmt.Errorf("unable to retrieve limit number of maximum pids allowed: %w", err)
|
||||
}
|
||||
ch <- prometheus.MustNewConstMetric(c.pidUsed, prometheus.GaugeValue, float64(pids))
|
||||
ch <- prometheus.MustNewConstMetric(c.pidMax, prometheus.GaugeValue, float64(pidM))
|
||||
|
|
|
@ -48,7 +48,7 @@ func TestReadProcessStatus(t *testing.T) {
|
|||
}
|
||||
maxPid, err := readUintFromFile(procFilePath("sys/kernel/pid_max"))
|
||||
if err != nil {
|
||||
t.Fatalf("Unable to retrieve limit number of maximum pids alloved %v\n", err)
|
||||
t.Fatalf("Unable to retrieve limit number of maximum pids allowed %v\n", err)
|
||||
}
|
||||
if uint64(pids) > maxPid || pids == 0 {
|
||||
t.Fatalf("Total running pids cannot be greater than %d or equals to 0", maxPid)
|
||||
|
|
Loading…
Reference in a new issue