MCPcopy Create free account
hub / github.com/apache/cloudstack / getServicesConfig

Function getServicesConfig

systemvm/debian/root/monitorServices.py:59–77  ·  view source on GitHub ↗

Reads the process configuration from the config file. Config file contains the processes to be monitored.

( config_file_path = "/etc/monitor.conf" )

Source from the content-addressed store, hash-verified

57 FAILING_CHECKS_FILE = 'failing_health_checks'
58
59def getServicesConfig( config_file_path = "/etc/monitor.conf" ):
60 """
61 Reads the process configuration from the config file.
62 Config file contains the processes to be monitored.
63
64 """
65 process_dict = {}
66 parser = ConfigParser()
67 parser.read( config_file_path )
68
69
70 for section in parser.sections():
71 process_dict[section] = {}
72
73 for name, value in parser.items(section):
74 process_dict[section][name] = value
75 printd (" %s = %r" % (name, value))
76
77 return process_dict
78
79def printd (msg):
80 """

Callers 1

mainFunction · 0.85

Calls 2

printdFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected