@@ -26,11 +26,11 @@ def quit_handler(_signo=None, _stack_frame=None):
26
26
if platform .LINUX :
27
27
signal .signal (signal .SIGQUIT , quit_handler )
28
28
# temporal list to keep names of all refactored classes
29
- refactored_classes = ["Oldest" , "PgBufferCache" , "ArchiveCommand" , "BgWriter" , "Checkpoint" , "Connections" ,
30
- "Databases" , "PgHealth" , "Instance" , "PgLocks" , "Xlog" ,
31
- "PgStatProgressVacuum" , "PgStatStatement" , "PgWaitSampling" , "La" , "OpenFiles" ,
32
- "SystemUptime" , "ProcStat" , "Net" , "Memory" , "DiskStats" , "DiskSizes" , "DefConfTest" ,
33
- "Health" ]
29
+ # refactored_classes = ["Oldest", "PgBufferCache", "ArchiveCommand", "BgWriter", "Checkpoint", "Connections",
30
+ # "Databases", "PgHealth", "Instance", "PgLocks", "Xlog",
31
+ # "PgStatProgressVacuum", "PgStatStatement", "PgWaitSampling", "La", "OpenFiles",
32
+ # "SystemUptime", "ProcStat", "Net", "Memory", "DiskStats", "DiskSizes", "DefConfTest",
33
+ # "Health"]
34
34
commands = sys .argv [1 :]
35
35
if len (commands ) > 0 :
36
36
tool = commands [0 ]
@@ -91,8 +91,8 @@ def quit_handler(_signo=None, _stack_frame=None):
91
91
if args .plugin_type == 'pg' or args .plugin_type == 'sys' or args .plugin_type == 'all' :
92
92
# check if conf file has a path
93
93
len_path = commands [2 ].rfind ("/" )
94
- #print(len_path)
95
- #print(len(commands[2]))
94
+ # print(len_path)
95
+ # print(len(commands[2]))
96
96
# get path for conf file and scripts
97
97
if len_path != - 1 :
98
98
path = commands [2 ][:len_path ] + "/scripts"
@@ -138,13 +138,12 @@ def quit_handler(_signo=None, _stack_frame=None):
138
138
Plugin .Type = 'agent' # change plugin type for template generator
139
139
plugins = []
140
140
for klass in Plugin .only_child_subclasses ():
141
- if klass .__name__ in refactored_classes :
142
- if klass .__name__ == "PgWaitSampling" : # check if plugin is for EE
143
- if Plugin .VersionPG ['type' ] == 'PGEE' :
144
- plugins .append (klass (cfg ))
145
- else :
146
- if klass .__name__ != "Cfs" :
147
- plugins .append (klass (cfg ))
141
+ if klass .__name__ == "PgWaitSampling" : # check if plugin is for EE
142
+ if Plugin .VersionPG ['type' ] == 'PGEE' :
143
+ plugins .append (klass (cfg ))
144
+ else :
145
+ if klass .__name__ != "Cfs" :
146
+ plugins .append (klass (cfg ))
148
147
template = ZbxTemplate (args .template , args .application )
149
148
with codecs .open (commands [2 ], 'w' , 'utf-8' ) as f :
150
149
f .write (template .xml (plugins ))
0 commit comments