Server IP : 184.107.3.203 / Your IP : 216.73.216.51 Web Server : Apache System : Linux dedicated2.avenfashion.com.ph 4.18.0-553.40.1.el8_10.x86_64 #1 SMP Mon Feb 10 12:11:18 EST 2025 x86_64 User : adminteladeoro ( 1015) PHP Version : 8.2.28 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
3 ~ �g7 � @ s� d dl Z d dlZd dlmZmZ dZdZed ed ed ed ed ed ed ed d �Zed � d�ZdZ dZ dZG dd� dee�ZdS )� N)�Plugin�UbuntuPluginz#/var/snap/charmed-postgresql/commonz$/var/snap/charmed-postgresql/currentz/var/lib/postgresqlz/var/log/postgresqlz/etc/patroniz/var/log/patroniz/etc/pgbackrestz/var/log/pgbackrestz/etc/pgbouncerz/var/log/pgbouncer)�POSTGRESQL_CONF�POSTGRESQL_LOGS�PATRONI_CONF�PATRONI_LOGS�PGBACKREST_CONF�PGBACKREST_LOGS�PGBOUNCER_CONF�PGBOUNCER_LOGSr z /patroni.yamlZsnap_daemonzcharmed-postgresql.psqlzcharmed-postgresql.patronictlc @ sL e Zd ZdZdZdZeed�dd��Zeed�dd��Z d d � Z dd� Zd S )�CharmedPostgreSQLzCharmed PostgreSQLZcharmed_postgresql�charmed-postgresql)�returnc C s dt � �S )Nz--config-file )�PATRONI_CONFIG_FILE)�self� r �(/usr/lib/python3.6/charmed_postgresql.py�patronictl_args) s z!CharmedPostgreSQL.patronictl_argsc C s d| j � d| j� d| j� d�S )Nz-U z -h z -p z -d postgres -P pager=off)�postgresql_username�postgresql_host�postgresql_port)r r r r � psql_args- s zCharmedPostgreSQL.psql_argsc C s | j td � d�td � d�g� | jtd � d�td � td � d�td � td � td � td � td � g� | jd� | jd dd� yvttdd��}tj|�}W d Q R X |d | _ |d }|d j d�}|\| _| _|d }|d }|d | _ |d | _W nF ttjttttfk �rH } z| jdt� d|� �� d S d }~X nX | jt� d| j� d| j � �dtd� | jt� d| j� d | j � �d!td� | jt� d| j� d"| j � �d#td� | jtjd$<