Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.6/site-packages/agent360/plugins/__pycache__/redis_stat.cpython-36.pyc

3

�uGh��@sZddlZddlZdddddddd	d
ddd
ddd�ZGdd�dej�ZedkrVe�j�dS)�NZuptimezconnected clientszused memoryzused memory peak human�	maxmemoryzmaxmemory policyztotal commands processedztotal net input bytesztotal net output byteszexpired keyszevicted keysz
keyspace hitszkeyspace misseszcluster enabled)Zuptime_in_secondsZconnected_clientsZused_memoryZused_memory_peak_humanrZmaxmemory_policyZtotal_commands_processedZtotal_net_input_bytesZtotal_net_output_bytesZexpired_keysZevicted_keysZ
keyspace_hitsZkeyspace_missesZcluster_enabledc@seZdZdZdd�ZdS)�PluginZ
redis_statc+Csi}d}y|jtd�}Wnd}YnXy|jtd�}Wnd}YnXy|jtd�}Wnd}YnXy|jtd�}Wnd}YnXytj||||d	�}|j�}Wn:tk
r�}	zd
|d<d|d
<|s�|SWYdd}	~	XnXx,|j�D] \}
}|
tj�kr�||t|
<q�W|S)N�hostz	127.0.0.1�portZ6379�db�0�password�)rrrrr�statuszConnection Error�msg)	�get�__name__�redisZStrictRedis�info�	Exception�items�METRICS�keys)�self�config�data�statsZ
redis_hostZ
redis_portZredis_dbZredis_passwordZredis_connection�e�name�value�r�D/root/tmp/pip-build-gzoz1_uw/agent360/agent360/plugins/redis_stat.py�runus<



z
Plugin.runN)r
�
__module__�__qualname__rrrrrrrsr�__main__)ZpluginsrrZ
BasePluginrr
�executerrrr�<module>s$%

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists