Skip to content

Commit

Permalink
Fix barman_check_is_ok metric (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
S3RK authored and paunin committed Nov 3, 2017
1 parent 2b39702 commit 33c436b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion barman/metrics/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func FilterBackups(backups map[string]BarmanBackup, filter func(BarmanBackup) bo

var execCommand = exec.Command
func barmanCheck() int {
checkCmd := execCommand("barman", "check")
checkCmd := execCommand("barman", "check", "all")
checkErr := checkCmd.Run()

barman_check_ok := 1
Expand Down
3 changes: 3 additions & 0 deletions barman/metrics/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ func TestHelperProcess(t *testing.T){
}
fmt.Fprintf(os.Stdout, string(testfile))
case "check":
if arguments[1] != "all" {
os.Exit(2)
}
code, err := strconv.Atoi(os.Getenv("GO_FAKE_EXIT_CODE"))
if err != nil {
panic(err.Error())
Expand Down

0 comments on commit 33c436b

Please sign in to comment.