Skip to content

Commit

Permalink
fix logging, fresh release
Browse files Browse the repository at this point in the history
  • Loading branch information
erulabs committed Jul 14, 2022
1 parent 38ebf72 commit b096347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
17
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func diskStats(w http.ResponseWriter, req *http.Request) {
rootProbe.Stderr = &rootProbeStderr
rootProbeErr := rootProbe.Run()
if rootProbeErr != nil {
fmt.Fprintf(os.Stderr, "Failed to run du command: %v\n", rootProbeStderr.String())
fmt.Fprintf(os.Stderr, "Failed to run df command: %v\n", rootProbeStderr.String())
} else {
responseData.RootUsage = strings.Split(strings.Replace(strings.Trim(strings.Trim(rootProbeStdout.String(), "\n"), " "), "\t", " ", -1), "\n")
}
Expand All @@ -137,7 +137,7 @@ func diskStats(w http.ResponseWriter, req *http.Request) {
k3sProbe.Stderr = &k3sProbeStderr
k3sProbeErr := k3sProbe.Run()
if k3sProbeErr != nil {
fmt.Fprintf(os.Stderr, "Failed to run du command: %v\n", k3sProbeStderr.String())
fmt.Fprintf(os.Stderr, "Failed to run df command: %v\n", k3sProbeStderr.String())
} else {
responseData.K3sUsage = strings.Split(strings.Replace(strings.Trim(strings.Trim(k3sProbeStdout.String(), "\n"), " "), "\t", " ", -1), "\n")
}
Expand All @@ -149,7 +149,7 @@ func diskStats(w http.ResponseWriter, req *http.Request) {
k3sStorageProbe.Stderr = &k3sStorageProbeStderr
err := k3sStorageProbe.Run()
if err != nil {
fmt.Fprintf(os.Stderr, "Failed to run du command: %v\n", k3sStorageProbeStderr.String())
fmt.Fprintf(os.Stderr, "Failed to run df command: %v\n", k3sStorageProbeStderr.String())
} else {
responseData.K3sStorageUsage = strings.Split(strings.Replace(strings.Trim(strings.Trim(k3sStorageProbeStdout.String(), "\n"), " "), "\t", " ", -1), "\n")
}
Expand Down

0 comments on commit b096347

Please sign in to comment.