Skip to content
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

Validate command on something else than return code #26

Open
wilfriedroset opened this issue Oct 6, 2015 · 1 comment
Open

Validate command on something else than return code #26

wilfriedroset opened this issue Oct 6, 2015 · 1 comment

Comments

@wilfriedroset
Copy link

Currently Milkcheck validate a service using the return code of the command. It would be simplier to be able to validate a command by its output:

  • match strings, regex (match or doesn't match)
  • float or int (greater, lesser, equal than)

The current workaround would be to use test in the command.

linpack:
    target: "@compute"
    actions:
        bench: 
            cmd: /some/path/linpack
            validate: float
            value: >= %LINPACK_MIN_VALUE
check_bios:
    target: "@compute"
    actions:
        status:
            cmd: dmidecode -t bios | awk '/Version/{print $NF}'
            validate: string
            value: %BIOS_VER
@degremont
Copy link
Collaborator

It is easy to workaround this using bash constructs for now. Low priority ticket.

@degremont degremont changed the title Milkcheck should be able to valide command on something else than return code Validate command on something else than return code Oct 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants