shukriadams/arewedown

Custom tests

lfoppiano opened this issue · 2 comments

Hi, I'm trying to use custom tests to check whether a service is running.

I tried by probing the ports but it was not working (probably they are not using tcp), so I tried this:

    mongo:
        cmd: pgrep mongod | grep -c -e '[0-9]\+' | grep "1"

    mysql:
        cmd: pgrep mysqld_safe | grep -q -e '[0-9]\+'

but for both of them I get error 1. Any clue?

Sorry for the long delay on replying to this, didn't see the ticket.

What does your script return when you run them in an ordinary shell? Also, are you running AWD directly from NodeJS, from Docker, or as a binary?

I'm running AWD as Docker (the old version, with the patch in the PR #24), so if you have modified something I could try the new release.

On the ordinary shell, bash, they return 1 or 0.

If I'm not wrong, it return a string by grepping "1" else an int, but the result does not change:

(base) [Luca@falcon ~]$ pgrep mongod | grep -c -e '[0-9]\+' | grep "1"
1

In fact the second script was incorrect it should be -c:

(base) [Luca@falcon ~]$ pgrep mysqld_safe | grep -c -e '[0-9]\+' | grep "1"
1