Rancid hinzugefuegt, funktioniert noch nicht
This commit is contained in:
parent
7391ced8d7
commit
059a5517dc
@ -20,6 +20,14 @@ class checks(object):
|
||||
pass
|
||||
# def __init__
|
||||
|
||||
def getShortHostname(self):
|
||||
"""docstring for getShortHostname"""
|
||||
hostname = platform.node()
|
||||
if hostname.count("."):
|
||||
hostname = hostname.split(".")[0]
|
||||
return hostname
|
||||
# def getShortHostname
|
||||
|
||||
def __classesForHost__(self):
|
||||
"""docstring for __classesForHost"""
|
||||
classes = []
|
||||
@ -28,6 +36,7 @@ class checks(object):
|
||||
continue
|
||||
# if __
|
||||
ret = getattr(self, c)()
|
||||
if len(ret) == 3:
|
||||
classes.append(ret)
|
||||
# for c
|
||||
return map(lambda k: (k[1],k[2]), sorted(classes, key=lambda k: k[0]))
|
||||
@ -54,9 +63,16 @@ class checks(object):
|
||||
|
||||
def hostname(self):
|
||||
"""docstring for hostname"""
|
||||
hostname = platform.node()
|
||||
if hostname.count("."):
|
||||
hostname = hostname.split(".")[0]
|
||||
hostname = self.getShortHostname()
|
||||
return(10, "Host", hostname)
|
||||
# def hostname
|
||||
|
||||
def app(self):
|
||||
"""docstring for app"""
|
||||
hostname = self.getShortHostname()
|
||||
if (hostname == "glitters"):
|
||||
return(500, "", "rancid_hosts")
|
||||
else:
|
||||
return ()
|
||||
# def app
|
||||
# def checks
|
Loading…
Reference in New Issue
Block a user