-
Couldn't load subscription status.
- Fork 87
PMM-5058 Update node_exporter-like metrics. #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| }, | ||
| }, | ||
| }) | ||
| // TODO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sessions/sessions_test.go:57: Line contains TODO/BUG/FIXME: "TODO" (from godox)
| ) | ||
|
|
||
| //nolint:lll | ||
| func readJSON(t *testing.T, file string) []byte { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func readJSON is unused (from unused)
| return bytes.TrimSpace(b) | ||
| } | ||
|
|
||
| func readMetrics(t *testing.T, file string) []string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func readMetrics is unused (from unused)
|
|
||
| b, err := ioutil.ReadFile(filepath.Join("testdata", file)) //nolint:gosec | ||
| require.NoError(t, err) | ||
| return bytes.TrimSpace(b) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return statements should not be cuddled if block has more than two lines (from wsl)
|
|
||
| b, err := ioutil.ReadFile(filepath.Join("testdata", file)) //nolint:gosec | ||
| require.NoError(t, err) | ||
| return strings.Split(string(bytes.TrimSpace(b)), "\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return statements should not be cuddled if block has more than two lines (from wsl)
| } | ||
| if s.WriteKb != nil { | ||
| desc := prometheus.NewDesc("node_disk_bytes_written", "The total number of bytes written successfully.", labelKeys, constLabels) | ||
| desc := prometheus.NewDesc("node_disk_written_bytes_total", "The total number of bytes written successfully.", labelKeys, constLabels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is 142 characters (from lll)
| desc = prometheus.NewDesc("node_filesystem_free_bytes", "Filesystem free space in bytes.", labelKeys, constLabels) | ||
| res = append(res, prometheus.MustNewConstMetric(desc, prometheus.GaugeValue, float64((s.Total-s.Used)*1024), labelValues...)) | ||
| desc = prometheus.NewDesc("node_filesystem_avail", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels) | ||
| desc = prometheus.NewDesc("node_filesystem_avail_bytes", "Filesystem space available to non-root users in bytes.", labelKeys, constLabels) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line is 142 characters (from lll)
| ) | ||
|
|
||
| //nolint:lll | ||
| var golden = flag.Bool("golden", false, "update golden files") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golden is a global variable (from gochecknoglobals)
node_memory_XXX=>node_memory_XXX_bytesnode_disk_XXX=>node_disk_XXX_bytesnode_filesystem_XXX=>node_filesystem_XXX_bytes