From fb9cfd97690ead03fb50815dcc6e4708b26b05f8 Mon Sep 17 00:00:00 2001 From: Johannes Findeisen Date: Tue, 5 Nov 2013 03:00:42 +0100 Subject: [PATCH] new service directory structure --- examples/minimal.json | 2 +- examples/stress.json | 300 +++++++++--------- linspector/services/{ => etc}/dummy.py | 0 linspector/services/{etc => http}/http.py | 0 linspector/services/net/__init__.py | 0 linspector/services/{etc => net}/ping.py | 0 .../services/{etc => net}/tcpconnect.py | 0 .../services/{etc => net}/udpconnect.py | 0 linspector/services/snmp/__init__.py | 1 + linspector/services/{etc => snmp}/snmpget.py | 0 linspector/services/ssh/__init__.py | 1 + linspector/services/{etc => ssh}/ssh.py | 0 12 files changed, 153 insertions(+), 151 deletions(-) rename linspector/services/{ => etc}/dummy.py (100%) rename linspector/services/{etc => http}/http.py (100%) create mode 100644 linspector/services/net/__init__.py rename linspector/services/{etc => net}/ping.py (100%) rename linspector/services/{etc => net}/tcpconnect.py (100%) rename linspector/services/{etc => net}/udpconnect.py (100%) create mode 100644 linspector/services/snmp/__init__.py rename linspector/services/{etc => snmp}/snmpget.py (100%) create mode 100644 linspector/services/ssh/__init__.py rename linspector/services/{etc => ssh}/ssh.py (100%) diff --git a/examples/minimal.json b/examples/minimal.json index 29ff85a..a060b90 100644 --- a/examples/minimal.json +++ b/examples/minimal.json @@ -26,7 +26,7 @@ "members": ["root"], "hosts": [ "a"], "services":[ - { "class": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 1 } + { "class": "etc/dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 1 } ] } }, diff --git a/examples/stress.json b/examples/stress.json index b1d596c..9285a67 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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] }, "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": "dummy", "args": { "sleep": 1, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 2, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 3, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 4, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 5, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 6, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 7, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 8, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 9, "fail": 1 }, "periods": ["fast"], "threshold": 3 }, - { "class": "dummy", "args": { "sleep": 10, "fail": 1 }, "periods": ["fast"], "threshold": 3 } + { "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 } ] } }, diff --git a/linspector/services/dummy.py b/linspector/services/etc/dummy.py similarity index 100% rename from linspector/services/dummy.py rename to linspector/services/etc/dummy.py diff --git a/linspector/services/etc/http.py b/linspector/services/http/http.py similarity index 100% rename from linspector/services/etc/http.py rename to linspector/services/http/http.py diff --git a/linspector/services/net/__init__.py b/linspector/services/net/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/linspector/services/etc/ping.py b/linspector/services/net/ping.py similarity index 100% rename from linspector/services/etc/ping.py rename to linspector/services/net/ping.py diff --git a/linspector/services/etc/tcpconnect.py b/linspector/services/net/tcpconnect.py similarity index 100% rename from linspector/services/etc/tcpconnect.py rename to linspector/services/net/tcpconnect.py diff --git a/linspector/services/etc/udpconnect.py b/linspector/services/net/udpconnect.py similarity index 100% rename from linspector/services/etc/udpconnect.py rename to linspector/services/net/udpconnect.py diff --git a/linspector/services/snmp/__init__.py b/linspector/services/snmp/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/linspector/services/snmp/__init__.py @@ -0,0 +1 @@ + diff --git a/linspector/services/etc/snmpget.py b/linspector/services/snmp/snmpget.py similarity index 100% rename from linspector/services/etc/snmpget.py rename to linspector/services/snmp/snmpget.py diff --git a/linspector/services/ssh/__init__.py b/linspector/services/ssh/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/linspector/services/ssh/__init__.py @@ -0,0 +1 @@ + diff --git a/linspector/services/etc/ssh.py b/linspector/services/ssh/ssh.py similarity index 100% rename from linspector/services/etc/ssh.py rename to linspector/services/ssh/ssh.py