Closed afsanchez83 closed 5 months ago
Hi Team,
I'm checking patroni metrics but I the metric for "patroni_failsafe_mode_is_active" is 0 including when I enable failsafe_mode to true.
Patroni version: patroni 3.1.0 OS: CentOS 7.9 DCS: etcdv2 Postgres version: 15.4
Patroni.yml file `scope: postgresql-testcluster namespace: /db/ name: postgresql-testcluster-1
restapi: listen: 10.168.55.19:8008 connect_address: postgresql-testcluster-1.domain.internal:8008 certfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt keyfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key cafile: /etc/ssl/certs/ca-bundle.crt verify_client: optional
ctl: insecure: false certfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt keyfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key cacert: /etc/ssl/certs/ca-bundle.crt
etcd: host: 127.0.0.1:2379
bootstrap: dcs: ttl: 30 loop_wait: 10 retry_timeout: 10 maximum_lag_on_failover: 1048576 postgresql: use_pg_rewind: false synchronous_mode: true synchronous_mode_strict: true
initdb: - encoding: UTF8 - data-checksums pg_hba: - hostssl replication replicator 10.168.55.19/32 md5 - hostssl replication replicator 10.168.55.83/32 md5 - hostssl replication replicator 10.168.55.25/32 md5 - host all all 0.0.0.0/0 md5 users: admin: password: admin options: - createrole - createdb
postgresql: use_unix_socket: true listen: 10.168.55.19:5433 connect_address: 10.168.55.19:5433 bin_dir: /usr/pgsql-15/bin data_dir: /postgresql/pgdata pgpass: /tmp/pgpass authentication: replication: username: replicator password: superuser: username: postgres password: parameters: password_encryption: 'md5' unix_socket_directories: '/var/run/postgresql/' archive_mode: on archive_command: pgbackrest --stanza=postgresql-testcluster archive-push %p log_directory: /postgresql/logs log_filename: postgresql-%Y%m%d.log max_connections: 100 shared_buffers: 1GB log_min_duration_statement: 1000 shared_preload_libraries: pg_partman_bgw,pg_stat_statements pg_partman_bgw.role: matchpay_liquibase pg_partman_bgw.dbname: matchpay log_error_verbosity: terse ssl: true ssl_cert_file: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt ssl_key_file: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key ssl_ca_file: /etc/ssl/certs/ca-bundle.crt recovery_conf: recovery_target_timeline: latest restore_command: pgbackrest --stanza=postgresql-testcluster archive-get %f %p create_replica_methods:
Current cluster configuration:
From API:
Patroni metrics for failsafe_mode:
patroni_failsafe_mode_is_active{scope="postgresql-matchpay"} 0`
As you can see the metric is 0 but it should be 1, right?, or I'm missing something?. Thanks.
sorry wrong repo
Hi Team,
I'm checking patroni metrics but I the metric for "patroni_failsafe_mode_is_active" is 0 including when I enable failsafe_mode to true.
Patroni version: patroni 3.1.0 OS: CentOS 7.9 DCS: etcdv2 Postgres version: 15.4
Patroni.yml file `scope: postgresql-testcluster namespace: /db/ name: postgresql-testcluster-1
restapi: listen: 10.168.55.19:8008 connect_address: postgresql-testcluster-1.domain.internal:8008 certfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt keyfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key cafile: /etc/ssl/certs/ca-bundle.crt verify_client: optional
ctl: insecure: false certfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt keyfile: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key cacert: /etc/ssl/certs/ca-bundle.crt
etcd: host: 127.0.0.1:2379
bootstrap: dcs: ttl: 30 loop_wait: 10 retry_timeout: 10 maximum_lag_on_failover: 1048576 postgresql: use_pg_rewind: false synchronous_mode: true synchronous_mode_strict: true
postgresql: use_unix_socket: true listen: 10.168.55.19:5433 connect_address: 10.168.55.19:5433 bin_dir: /usr/pgsql-15/bin data_dir: /postgresql/pgdata pgpass: /tmp/pgpass authentication: replication: username: replicator password: superuser: username: postgres password: parameters: password_encryption: 'md5' unix_socket_directories: '/var/run/postgresql/' archive_mode: on archive_command: pgbackrest --stanza=postgresql-testcluster archive-push %p log_directory: /postgresql/logs log_filename: postgresql-%Y%m%d.log max_connections: 100 shared_buffers: 1GB log_min_duration_statement: 1000 shared_preload_libraries: pg_partman_bgw,pg_stat_statements pg_partman_bgw.role: matchpay_liquibase pg_partman_bgw.dbname: matchpay log_error_verbosity: terse ssl: true ssl_cert_file: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.crt ssl_key_file: /etc/ssl/certs/postgresql-testcluster-1.domain.internal.key ssl_ca_file: /etc/ssl/certs/ca-bundle.crt recovery_conf: recovery_target_timeline: latest restore_command: pgbackrest --stanza=postgresql-testcluster archive-get %f %p create_replica_methods:
Current cluster configuration:
patronictl -c /etc/patroni.yml show-config failsafe_mode: true loop_wait: 10 maximum_lag_on_failover: 1048576 postgresql: use_pg_rewind: false retry_timeout: 10 synchronous_mode: true synchronous_mode_strict: true ttl: 30From API:
{ "loop_wait": 10, "maximum_lag_on_failover": 1048576, "postgresql": { "use_pg_rewind": false }, "retry_timeout": 10, "synchronous_mode": true, "synchronous_mode_strict": true, "ttl": 30, "failsafe_mode": true }Patroni metrics for failsafe_mode:
curl -s https://`hostname`:8008/metrics | grep failsafe_modeHELP patroni_failsafe_mode_is_active Value is 1 if failsafe mode is active, 0 if inactive.
TYPE patroni_failsafe_mode_is_active gauge
patroni_failsafe_mode_is_active{scope="postgresql-matchpay"} 0`
As you can see the metric is 0 but it should be 1, right?, or I'm missing something?. Thanks.