diff --git a/examples/dev.json b/examples/dev.json index da7cd90..275b175 100644 --- a/examples/dev.json +++ b/examples/dev.json @@ -55,13 +55,13 @@ "class": "etc/dummy", "periods": ["fast"], "threshold": 1, - "args": { "sleep": 1, "fail": 1 } + "args": { "sleep": 1, "fail": true } }, { "class": "etc/dummy", "periods": ["fast"], "threshold": 1, - "args": { "sleep": 10, "fail": 0 } + "args": { "sleep": 10, "fail": false } } ] }, @@ -73,13 +73,13 @@ "class": "etc/dummy", "periods": ["fast"], "threshold": 1, - "args": { "sleep": 1, "fail": 1 } + "args": { "sleep": 1, "fail": true } }, { "class": "etc/dummy", "periods": ["fast"], "threshold": 1, - "args": { "sleep": 10, "fail": 0 } + "args": { "sleep": 10, "fail": false } } ] } @@ -91,7 +91,7 @@ }, "gooo":{ "hostgroups": [ "b" ], - "enabled": true + "enabled": false } }, "core":{ diff --git a/examples/minimal.json b/examples/minimal.json index 5ef2c4a..8026ed7 100644 --- a/examples/minimal.json +++ b/examples/minimal.json @@ -26,7 +26,7 @@ "members": ["root"], "hosts": [ "a"], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 1 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 1 } ] } }, diff --git a/examples/stress.json b/examples/stress.json index 01a8523..03feee0 100644 --- a/examples/stress.json +++ b/examples/stress.json @@ -28,16 +28,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "b":{ @@ -46,16 +46,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "c":{ @@ -64,16 +64,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "d":{ @@ -82,16 +82,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "e":{ @@ -100,16 +100,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "f":{ @@ -118,16 +118,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "g":{ @@ -136,16 +136,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "h":{ @@ -154,16 +154,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "i":{ @@ -172,16 +172,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "j":{ @@ -190,16 +190,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "k":{ @@ -208,16 +208,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "l":{ @@ -226,16 +226,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "m":{ @@ -244,16 +244,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "n":{ @@ -262,16 +262,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] }, "o":{ @@ -280,16 +280,16 @@ "x", "y", "z", "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh", "ii", "jj", "kk", "ll", "mm", "nn", "oo", "pp", "qq", "vv", "ww", "xx", "yy", "zz" ], "services":[ - { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "etc/dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 2, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 3, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 4, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 5, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 6, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 7, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 8, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 9, "fail": true }, "periods": ["fast"], "threshold": 3 }, + { "class": "etc/dummy", "args": { "sleep": 10, "fail": true }, "periods": ["fast"], "threshold": 3 } ] } }, diff --git a/linspector/services/etc/dummy.py b/linspector/services/etc/dummy.py index d733b5b..20e4e61 100644 --- a/linspector/services/etc/dummy.py +++ b/linspector/services/etc/dummy.py @@ -59,7 +59,7 @@ class DummyService(Service): if "sleep" in args: self.sleep = args["sleep"] - self.fail = 0 + self.fail = False if "fail" in args: self.fail = args["fail"] @@ -70,7 +70,7 @@ class DummyService(Service): time.sleep(self.sleep) - if self.fail > 0: + if self.fail: job.set_errorcode(1) job.set_message("[dummy: " + job.jobHex + "] Failed on host: " + job.get_host() + " Sleep: " + str(self.sleep) + " Fail: " + str(self.fail))