Documentation ¶
Index ¶
- Constants
- func DisableExporterInPostgreSQL(ctx context.Context, exec postgres.Executor) error
- func EnableExporterInPostgreSQL(ctx context.Context, exec postgres.Executor, monitoringSecret *corev1.Secret, ...) error
- func ExporterEnabled(cluster *v1beta1.PostgresCluster) bool
- func PostgreSQLHBAs(inCluster *v1beta1.PostgresCluster, outHBAs *postgres.HBAs)
- func PostgreSQLParameters(inCluster *v1beta1.PostgresCluster, outParameters *postgres.Parameters)
- type Executor
Constants ¶
const (
// MonitoringUser is a Postgres user created by pgMonitor configuration
MonitoringUser = "ccp_monitoring"
)
Variables ¶
This section is empty.
Functions ¶
func DisableExporterInPostgreSQL ¶
DisableExporterInPostgreSQL disables the exporter configuration in PostgreSQL. Currently the exporter is disabled by removing login permissions for the monitoring user. TODO: evaluate other uninstall/removal options
func EnableExporterInPostgreSQL ¶
func EnableExporterInPostgreSQL(ctx context.Context, exec postgres.Executor, monitoringSecret *corev1.Secret, database, setup string) error
EnableExporterInPostgreSQL runs SQL setup commands in `database` to enable the exporter to retrieve metrics. pgMonitor objects are created and expected extensions are installed. We also ensure that the monitoring user has the current password and can login.
func ExporterEnabled ¶
func ExporterEnabled(cluster *v1beta1.PostgresCluster) bool
ExporterEnabled returns true if the monitoring exporter is enabled
func PostgreSQLHBAs ¶
func PostgreSQLHBAs(inCluster *v1beta1.PostgresCluster, outHBAs *postgres.HBAs)
PostgreSQLHBAs provides the Postgres HBA rules for allowing the monitoring exporter to be accessible
func PostgreSQLParameters ¶
func PostgreSQLParameters(inCluster *v1beta1.PostgresCluster, outParameters *postgres.Parameters)
PostgreSQLParameters provides additional required configuration parameters that Postgres needs to support monitoring