Skip to content

Commit e942bae

Browse files
authored
chore: fix some typos (#3316)
Signed-off-by: Nabil <nabilcharaf37@gmail.com>
1 parent 467d1f3 commit e942bae

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎collector/cpu_vulnerabilities_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import (
2222
)
2323

2424
const (
25-
cpuVulerabilitiesCollector = "cpu_vulnerabilities"
25+
cpuVulnerabilitiesCollectorSubsystem = "cpu_vulnerabilities"
2626
)
2727

2828
var (
2929
vulnerabilityDesc = prometheus.NewDesc(
30-
prometheus.BuildFQName(namespace, cpuVulerabilitiesCollector, "info"),
30+
prometheus.BuildFQName(namespace, cpuVulnerabilitiesCollectorSubsystem, "info"),
3131
"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",
3232
[]string{"codename", "state", "mitigation"},
3333
nil,
@@ -37,7 +37,7 @@ var (
3737
type cpuVulnerabilitiesCollector struct{}
3838

3939
func init() {
40-
registerCollector(cpuVulerabilitiesCollector, defaultDisabled, NewVulnerabilitySysfsCollector)
40+
registerCollector(cpuVulnerabilitiesCollectorSubsystem, defaultDisabled, NewVulnerabilitySysfsCollector)
4141
}
4242

4343
func NewVulnerabilitySysfsCollector(logger *slog.Logger) (Collector, error) {

‎collector/processes_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (c *processCollector) Update(ch chan<- prometheus.Metric) error {
106106

107107
pidM, err := readUintFromFile(procFilePath("sys/kernel/pid_max"))
108108
if err != nil {
109-
return fmt.Errorf("unable to retrieve limit number of maximum pids alloved: %w", err)
109+
return fmt.Errorf("unable to retrieve limit number of maximum pids allowed: %w", err)
110110
}
111111
ch <- prometheus.MustNewConstMetric(c.pidUsed, prometheus.GaugeValue, float64(pids))
112112
ch <- prometheus.MustNewConstMetric(c.pidMax, prometheus.GaugeValue, float64(pidM))

‎collector/processes_linux_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestReadProcessStatus(t *testing.T) {
4848
}
4949
maxPid, err := readUintFromFile(procFilePath("sys/kernel/pid_max"))
5050
if err != nil {
51-
t.Fatalf("Unable to retrieve limit number of maximum pids alloved %v\n", err)
51+
t.Fatalf("Unable to retrieve limit number of maximum pids allowed %v\n", err)
5252
}
5353
if uint64(pids) > maxPid || pids == 0 {
5454
t.Fatalf("Total running pids cannot be greater than %d or equals to 0", maxPid)

0 commit comments

Comments
 (0)