def __init__(self, argv=(), env=None, debug=False):
MuninPlugin.__init__(self, argv, env, debug)<EOL>self.envRegisterFilter('<STR_LIT>', '<STR_LIT>')<EOL>self._host = self.envGet('<STR_LIT:host>')<EOL>self._port = self.envGet('<STR_LIT:port>', None, int)<EOL>self._database = self.envGet('<STR_LIT>')<EOL>self._user = self.envGet('<STR_LIT:user>')<EOL>self._password = self.envGet('<STR_LIT:password>')<EOL>self._detailGraphs = self.envCheckFlag('<STR_LIT>', False)<EOL>self._replGraphs = self.envCheckFlag('<STR_LIT>', False)<EOL>self._category_sys = '<STR_LIT>'<EOL>self._category_db = '<STR_LIT>'<EOL>self._dbconn = PgInfo(self._host, self._port, self._database, <EOL>self._user, self._password)<EOL>dblist = [db for db in self._dbconn.getDatabases()<EOL>if self.dbIncluded(db)]<EOL>dblist.sort()<EOL>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', type='<STR_LIT>',<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>colour='<STR_LIT>',<EOL>info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>colour='<STR_LIT>',<EOL>info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', type='<STR_LIT>',<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>colour='<STR_LIT>', info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self._dbconn.checkVersion('<STR_LIT>'):<EOL><INDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>', period='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>', period='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>"<EOL>"<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', self._category_sys,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>for lock_state, desc in (('<STR_LIT:all>', <EOL>'<STR_LIT>'),<EOL>('<STR_LIT>',<EOL>'<STR_LIT>'),):<EOL><INDENT>graph_name = "<STR_LIT>" % lock_state<EOL>if self.graphEnabled(graph_name):<EOL><INDENT>mode_iter = iter(PgInfo.lockModes)<EOL>graph = MuninGraph("<STR_LIT>" % lock_state, <EOL>self._category_sys,<EOL>info=desc,<EOL>args='<STR_LIT>')<EOL>for mode in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',):<EOL><INDENT>graph.addField(mode, mode, draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, <EOL>info="<STR_LIT>" % mode_iter.next())<EOL><DEDENT>self.appendGraph(graph_name, graph)<EOL><DEDENT><DEDENT>if self._detailGraphs:        <EOL><INDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>',<EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>self._category_db,<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>for lock_state, desc in (('<STR_LIT:all>', <EOL>'<STR_LIT>'),<EOL>('<STR_LIT>',<EOL>'<STR_LIT>'),):<EOL><INDENT>graph_name = "<STR_LIT>" % lock_state<EOL>if self.graphEnabled(graph_name):<EOL><INDENT>graph = MuninGraph("<STR_LIT>" % lock_state, <EOL>self._category_sys,<EOL>info=desc,<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, <EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph(graph_name, graph)<EOL><DEDENT><DEDENT><DEDENT>if self._replGraphs and self._dbconn.checkVersion('<STR_LIT>'):        <EOL><INDENT>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>',<EOL>'<STR_LIT>',<EOL>info='<STR_LIT>'<EOL>'<STR_LIT>',<EOL>args='<STR_LIT>')<EOL>for field, desc in (<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>'),):<EOL><INDENT>graph.addField(field, field, draw='<STR_LIT>', type='<STR_LIT>', <EOL>min=<NUM_LIT:0>, info=desc)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT>if self._detailGraphs and self.graphEnabled('<STR_LIT>'):<EOL><INDENT>graph = MuninGraph('<STR_LIT>', <EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>info='<STR_LIT>',<EOL>args='<STR_LIT>',<EOL>autoFixNames = True)<EOL>for db in dblist:<EOL><INDENT>graph.addField(db, db, draw='<STR_LIT>', <EOL>type='<STR_LIT>', min=<NUM_LIT:0>,<EOL>info="<STR_LIT>"<EOL>"<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph('<STR_LIT>', graph)<EOL><DEDENT><DEDENT>
Populate Munin Plugin with MuninGraph instances.

        @param argv:  List of command line arguments.
        @param env:   Dictionary of environment variables.
        @param debug: Print debugging messages if True. (Default: False)