just some coding style fixes and very small changes
This commit is contained in:
parent
b17283b305
commit
0f82647c1a
5 changed files with 3310 additions and 4 deletions
|
|
@ -31,6 +31,7 @@ class Config:
|
||||||
self.hosts,
|
self.hosts,
|
||||||
self.members,
|
self.members,
|
||||||
self.periods,
|
self.periods,
|
||||||
self.services, log)
|
self.services,
|
||||||
|
log)
|
||||||
|
|
||||||
#self.layouts = LayoutList(self.dict['layouts'], self.hostgroups)
|
#self.layouts = LayoutList(self.dict['layouts'], self.hostgroups)
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,8 @@ def parseHostList(hosts, services, log):
|
||||||
found = False
|
found = False
|
||||||
#to a real iteration. just pick the right service
|
#to a real iteration. just pick the right service
|
||||||
for service in services:
|
for service in services:
|
||||||
if service.name != servicename: continue
|
if service.name != servicename:
|
||||||
|
continue
|
||||||
#indicate we found a service
|
#indicate we found a service
|
||||||
found = True
|
found = True
|
||||||
#check to see if we already regexed our service command
|
#check to see if we already regexed our service command
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,8 @@ def parseMemberList(members, filters, log):
|
||||||
for filtername, replacement in member.filters.items():
|
for filtername, replacement in member.filters.items():
|
||||||
found = False
|
found = False
|
||||||
for filt in filters:
|
for filt in filters:
|
||||||
if filt.name != filtername: continue
|
if filt.name != filtername:
|
||||||
|
continue
|
||||||
found = True
|
found = True
|
||||||
memberFilter = filt.clone()
|
memberFilter = filt.clone()
|
||||||
memberFilter.command = re.sub('@member', replacement, filt.command)
|
memberFilter.command = re.sub('@member', replacement, filt.command)
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ def main():
|
||||||
log.i("parsed arguments")
|
log.i("parsed arguments")
|
||||||
|
|
||||||
if args.action == "start":
|
if args.action == "start":
|
||||||
log.i("starting linspector: reading config...")
|
log.i("starting linspector: reading config... (" + args.config + ")")
|
||||||
config = Config(args.config, log)
|
config = Config(args.config, log)
|
||||||
log.d("parsed config: " + str(config))
|
log.d("parsed config: " + str(config))
|
||||||
for hg in config.hostgroups:
|
for hg in config.hostgroups:
|
||||||
|
|
|
||||||
3303
log/linspector.log
3303
log/linspector.log
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue