def __init__(self, argv=(), env=None, debug=False):
MuninPlugin.__init__(self, argv, env, debug)<EOL>self._host = self.envGet('<STR_LIT:host>')<EOL>self._port = self.envGet('<STR_LIT:port>')<EOL>self._db = self.envGet('<STR_LIT>')<EOL>self._password = self.envGet('<STR_LIT:password>')<EOL>self._socket_timeout = self.envGet('<STR_LIT>', None, float)<EOL>self._unix_socket_path = self.envGet('<STR_LIT>')<EOL>self._category = '<STR_LIT>'<EOL>self._serverInfo = RedisInfo(self._host, self._port, self._db, <EOL>self._password, self._socket_timeout,<EOL>self._unix_socket_path)<EOL>self._stats = self._serverInfo.getStats()<EOL>self._stats['<STR_LIT>'] = self._serverInfo.ping()<EOL>cmd_list = []<EOL>db_list = []<EOL>for k in self._stats.keys():<EOL><INDENT>if k.startswith('<STR_LIT>'):<EOL><INDENT>cmd_list.append(k[len('<STR_LIT>'):])<EOL><DEDENT>elif k.startswith('<STR_LIT>'):<EOL><INDENT>db_list.append(k)<EOL><DEDENT><DEDENT>db_list.sort()<EOL>cmd_list.sort()<EOL>graphs = [<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),<EOL>('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>]<EOL>if self._stats.get('<STR_LIT>', <NUM_LIT:0>) > <NUM_LIT:0>:<EOL><INDENT>graphs.extend((<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT:size>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),<EOL>('<STR_LIT>', '<STR_LIT>', <EOL>'<STR_LIT>',<EOL>(('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'),)<EOL>),             <EOL>))<EOL><DEDENT>for graph_name, graph_title, graph_info, graph_fields in graphs:<EOL><INDENT>if self.graphEnabled(graph_name):<EOL><INDENT>graph = MuninGraph("<STR_LIT>" % graph_title, self._category, <EOL>info=graph_info, <EOL>args='<STR_LIT>')<EOL>for fname, flabel, fdraw, ftype, finfo in graph_fields:<EOL><INDENT>if self._stats.has_key(fname):<EOL><INDENT>graph.addField(fname, flabel, draw=fdraw, type=ftype, <EOL>min=<NUM_LIT:0>, info=finfo)<EOL><DEDENT><DEDENT>if graph.getFieldCount() > <NUM_LIT:0>:<EOL><INDENT>self.appendGraph(graph_name, graph)<EOL><DEDENT><DEDENT><DEDENT>self._stats['<STR_LIT>'] = <NUM_LIT:0><EOL>self._stats['<STR_LIT>'] = <NUM_LIT:0><EOL>if self.graphEnabled('<STR_LIT>'):<EOL><INDENT>for db in db_list:<EOL><INDENT>fname_keys = "<STR_LIT>" % db<EOL>fname_expires = "<STR_LIT>" % db<EOL>num_keys = self._stats[db].get('<STR_LIT>', <NUM_LIT:0>)<EOL>num_expires = self._stats[db].get('<STR_LIT>', <NUM_LIT:0>)<EOL>self._stats[fname_keys] = num_keys<EOL>self._stats[fname_expires] = num_expires<EOL>self._stats['<STR_LIT>'] += num_keys<EOL>self._stats['<STR_LIT>'] += num_expires<EOL><DEDENT>self._stats['<STR_LIT>'] = (self._stats['<STR_LIT>']<EOL>- self._stats['<STR_LIT>'])<EOL><DEDENT>graph_name = '<STR_LIT>'<EOL>if self.graphEnabled(graph_name) and len(db_list) > <NUM_LIT:0>:<EOL><INDENT>graph = MuninGraph("<STR_LIT>", self._category,<EOL>info="<STR_LIT>",<EOL>args='<STR_LIT>')<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>")<EOL>graph.addField('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', <EOL>min=<NUM_LIT:0>, info="<STR_LIT>", colour='<STR_LIT>')<EOL>self.appendGraph(graph_name, graph)<EOL><DEDENT>graph_name = '<STR_LIT>'<EOL>if self.graphEnabled(graph_name) and len(db_list) > <NUM_LIT:0>:<EOL><INDENT>graph = MuninGraph("<STR_LIT>", self._category,<EOL>info="<STR_LIT>",<EOL>args='<STR_LIT>')<EOL>for db in db_list:<EOL><INDENT>fname = "<STR_LIT>" % db<EOL>graph.addField(fname, db, '<STR_LIT>', '<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph(graph_name, graph)<EOL><DEDENT>graph_name = '<STR_LIT>'<EOL>if self.graphEnabled(graph_name) and len(db_list) > <NUM_LIT:0>:<EOL><INDENT>graph = MuninGraph("<STR_LIT>", <EOL>self._category,<EOL>info="<STR_LIT>",<EOL>args='<STR_LIT>')<EOL>for db in db_list:<EOL><INDENT>fname = "<STR_LIT>" % db<EOL>graph.addField(fname, db, '<STR_LIT>', '<STR_LIT>', min=<NUM_LIT:0>, <EOL>info="<STR_LIT>" % db)<EOL><DEDENT>self.appendGraph(graph_name, graph)<EOL><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)