# Functions
AddNewService adds new service to storage.
AssignDefaultRole assigns a default role to a user.
AssignRoles assigns a set of roles to a user.
AzureOptionsFromRequest creates AzureOptions object from request.
ChangeActionResult updates an action result in action results storage.
ChangeAgent changes common parameters for given Agent.
ChangeBackupLocation updates existing location by specified locationID and params.
ChangeCheckSettings updates the interval of a check setting if already present.
ChangeDefaultRole changes default role in the settings.
ChangeRestoreHistoryItem updates existing restore history item.
ChangeScheduledTask updates existing scheduled task.
ChangeStandardLabels changes standard labels for a service.
ChangeTemplate updates existing rule template.
CheckUniqueNodeInstanceRegion checks for uniqueness of instance address and region.
CleanupOldActionResults deletes action results older than a specified date.
CleanupOldJobs deletes jobs results older than a specified date.
ConvertParamsDefinitions converts parameters definitions to the model.
ConvertTemplate converts an alert template to the internal representation.
CreateActionResult stores an action result in action results storage.
CreateAgent creates Agent with given type.
CreateArtifact creates artifact entry in DB.
CreateBackupLocation creates backup location.
CreateCheckSettings persists CheckSettings.
CreateDump creates a dump using the specified parameters.
CreateDumpLog inserts new chunk log.
CreateExternalExporter creates ExternalExporter.
CreateJob stores a job result in the storage.
CreateJobLog inserts new chunk log.
CreateNode creates a Node.
CreateNodeExporter creates NodeExporter.
CreatePMMAgent creates PMMAgent.
CreateRestoreHistoryItem creates a restore history item entry in DB.
CreateRole creates a new role.
CreateScheduledTask creates scheduled task.
CreateServiceSoftwareVersions creates service software versions entry in DB.
CreateTemplate creates rule template.
CreateUser create a new user with given parameters.
DecryptAgent decrypt agent.
DecryptAWSOptionsHandler returns decrypted AWS Options.
DecryptAzureOptionsHandler returns decrypted Azure Options.
DecryptDB decrypts a set of columns in a specific database and table.
DecryptMongoDBOptionsHandler returns decrypted MongoDB Options.
DecryptMySQLOptionsHandler returns decrypted MySQL Options.
DecryptPostgreSQLOptionsHandler returns decrypted PostgreSQL Options.
DeleteArtifact removes artifact by ID.
DeleteDump removes dump by ID.
DeletePerconaSSODetails removes all stored DeletePerconaSSODetails.
DeleteRole deletes a role, if possible.
DeleteServiceSoftwareVersions removes entry from the DB by service ID.
EncryptAgent encrypt agent.
EncryptAWSOptionsHandler returns encrypted AWS Options.
EncryptAzureOptionsHandler returns encrypted Azure Options.
EncryptDB encrypts a set of columns in a specific database and table.
EncryptMongoDBOptionsHandler returns encrypted MongoDB Options.
EncryptMySQLOptionsHandler returns encrypted MySQL Options.
EncryptPostgreSQLOptionsHandler returns encrypted PostgreSQL Options.
ExtractPmmAgentID extract pmm-agent-id from Agent by type.
ExtractPmmAgentVersionFromAgent extract PMM agent version from Agent by pmm-agent-id.
FindActionResultByID finds ActionResult by ID.
FindActiveServiceTypes returns all active Service Types.
FindAgentByID finds Agent by ID.
FindAgents returns Agents by filters.
FindAgentsByIDs finds Agents by IDs.
FindAgentsForScrapeConfig returns Agents for scrape config generation by pmm_agent_id and push_metrics value.
FindAndLockRole retrieves a role by ID and locks it for update.
FindArtifactByID returns artifact by given ID if found, ErrNotFound if not.
FindArtifactByName returns artifact by given name if found, ErrNotFound if not.
FindArtifacts returns artifact list sorted by creation time in DESCENDING order.
FindArtifactsByIDs finds artifacts by IDs.
FindBackupLocationByID finds a Backup Location by its ID.
FindBackupLocations returns saved backup locations configuration.
FindBackupLocationsByIDs finds backup locations by IDs.
FindCheckSettings returns all CheckSettings stored in the table.
FindCheckSettingsByName finds CheckSettings by check name.
FindDBConfigForService find DB config from agents running on service specified by serviceID.
FindDSNByServiceIDandPMMAgentID resolves DSN and Files by service id.
FindDumpByID returns dump by given ID if found, ErrNotFound if not.
FindDumpLogs returns logs that belongs to dump.
FindDumps returns dumps list sorted by creation time in DESCENDING order.
FindDumpsByIDs finds dumps by IDs.
FindJobByID finds Job by ID.
FindJobLogs returns logs that belongs to job.
FindJobs returns logs satisfying filters.
FindNodeByID finds a Node by ID.
FindNodeByName finds a Node by name.
FindNodes returns Nodes by filters.
FindNodesByIDs finds Nodes by IDs.
FindPmmAgentIDToRunActionOrJob finds pmm-agent-id to run action.
FindPMMAgentsForService gets pmm-agents for service.
FindPMMAgentsForServicesOnNode gets pmm-agents for Services running on Node.
FindPMMAgentsForVersion selects pmm-agents with version >= minPMMAgentVersion.
FindPMMAgentsIDsWithPushMetrics returns pmm-agents-ids with agent, that use push_metrics mode.
FindPMMAgentsRunningOnNode gets pmm-agents for node where it runs.
FindRestoreHistoryItemByID finds restore history item.
FindRestoreHistoryItems returns restore history list.
FindScheduledTaskByID finds ScheduledTask by ID.
FindScheduledTasks returns all scheduled tasks satisfying filter.
FindServiceByID searches Service by ID.
FindServiceByName finds Service by Name.
FindServices returns Services by filters.
FindServicesByIDs finds Services by IDs.
FindServiceSoftwareVersionsByServiceID returns service software versions entry by given service ID if found, returns wrapped ErrNotFound if not found.
FindServicesSoftwareVersions returns all services software versions sorted by specified param in ascending order if limit is not specified, and limited number of entries otherwise.
FindTemplateByName finds template by name.
FindTemplates returns saved notification rule templates.
FindUser find user details using given user ID.
GetOrCreateUser returns user and optionally creates it, if not in database yet.
GetPerconaSSODetails returns PerconaSSODetails if there are any, error otherwise.
GetPostgreSQLVersion returns MAJOR.MINOR PostgreSQL version (e.g.
GetSettings returns current PMM Server settings.
GetUserRoles retrieves all roles assigned to a user.
InsertPerconaSSODetails inserts a new Percona SSO details.
IsAgentSupported contains logic for PMMAgentSupported.
IsArtifactFinalStatus checks if artifact status is one of the final ones.
IsPostgreSQLSSLSniSupported checks if PostgreSQL SSL SNI is supported by the PMM Agent.
IsPushMetricsSupported return if PUSH mode is supported for pmm agent version.
ListUsers lists all users and their roles.
MergeLabels merges unified labels of Node, Service, and Agent (each can be nil).
MongoDBOptionsFromRequest creates MongoDBOptionsParams object from request.
MySQLOptionsFromRequest creates MySQLOptions object from request.
NewInvalidArgumentError creates InvalidArgumentError with given formatting.
NewVictoriaMetricsParams - returns configuration params for VictoriaMetrics.
OpenDB returns configured connection pool for PostgreSQL.
ParseEndpoint parse endpoint and prepend https if no scheme is provided.
PMMAgentSupported checks if pmm agent version satisfies required min version.
PostgreSQLOptionsFromRequest creates PostgreSQLOptions object from request.
RemoveAgent removes Agent by ID.
RemoveBackupLocation removes BackupLocation by ID.
RemoveNode removes single Node.
RemoveRestoreHistoryItem removes restore history item by ID.
RemoveScheduledTask removes task from DB.
RemoveService removes single Service.
RemoveTemplate removes rule template with specified name.
SaveSettings saves PMM Server settings.
SetPMMServerID should be run on start up to generate unique PMM Server ID.
SetupDB checks minimal required PostgreSQL version and runs database migrations.
TemplateDelimsPair returns a pair of safe template delimiters that are not present in any given string.
UpdateArtifact updates existing artifact.
UpdateDumpStatus updates the status of a dump with the given ID.
UpdateServiceSoftwareVersions updates existing service software versions.
UpdateSettings updates only non-zero, non-empty values.
UpdateUser updates an existing user with given parameters.
ValidateServiceType checks argument value is in the list of supported types.
ValidateSettings validates settings changes.
# Constants
Default values for settings.
Default values for settings.
AgentStatusUnknown indicates we know nothing about agent because it is not connected.
Default values for settings.
Agent types (in the same order as in agents.proto).
Default values for settings.
Default values for settings.
BasePrometheusConfigPath - basic path with prometheus config, that user can mount to container.
Available parameter types.
Available template sources.
BackupStatus status (in the same order as in artifacts.proto).
Node types (in the same order as in nodes.proto).
DefaultPostgreSQLAddr represent default local PostgreSQL database server address.
BackupStatus status (in the same order as in artifacts.proto).
DisableSSLMode represent disable PostgreSQL ssl mode.
nolint:revive.
nolint:revive.
nolint:revive.
BackupStatus status (in the same order as in artifacts.proto).
RestoreStatus status (in the same order as in restores.proto).
Agent types (in the same order as in agents.proto).
Service types (in the same order as in services.proto).
BackupStatus status (in the same order as in artifacts.proto).
BackupLocation types.
Available parameter types.
Available check execution intervals.
Node types (in the same order as in nodes.proto).
Service types (in the same order as in services.proto).
Backup modes.
BackupStatus status (in the same order as in artifacts.proto).
RestoreStatus status (in the same order as in restores.proto).
DataModel types (in the same order as in artifacts.proto).
Supported job types.
Agent types (in the same order as in agents.proto).
Supported job types.
Service types (in the same order as in services.proto).
SoftwareName types of different software.
Supported job types.
Agent types (in the same order as in agents.proto).
SoftwareName types of different software.
Supported job types.
Service types (in the same order as in services.proto).
Agent types (in the same order as in agents.proto).
ArtifactType types.
BackupStatus status (in the same order as in artifacts.proto).
SoftwareName types of different software.
BackupStatus status (in the same order as in artifacts.proto).
Available parameter units.
DataModel types (in the same order as in artifacts.proto).
Backup modes.
Agent types (in the same order as in agents.proto).
a special ID, reserved for PMM Server.
A special ID reserved for PMM Server Node.
PMMServerPostgreSQLNodeName is a special Node Name representing PMM Server's External PostgreSQL Node.
PMMServerPostgreSQLServiceName is a special Service Name representing PMM Server's PostgreSQL Service.
Agent types (in the same order as in agents.proto).
Service types (in the same order as in services.proto).
Agent types (in the same order as in agents.proto).
Service types (in the same order as in services.proto).
Agent types (in the same order as in agents.proto).
Agent types (in the same order as in agents.proto).
Agent types (in the same order as in agents.proto).
Agent types (in the same order as in agents.proto).
Agent types (in the same order as in agents.proto).
SoftwareName types of different software.
Available check execution intervals.
Agent types (in the same order as in agents.proto).
Node types (in the same order as in nodes.proto).
Node types (in the same order as in nodes.proto).
Node types (in the same order as in nodes.proto).
RemoveCascade removes dependend objects recursively.
RemoveRestrict returns error if there dependent objects.
RequireSSLMode represent require PostgreSQL ssl mode.
BackupLocation types.
Available template sources.
ArtifactType types.
Supported scheduled task types.
Supported scheduled task types.
Available parameter units.
SetupFixtures adds initial data to the database.
SkipFixtures skips adding initial data to the database.
Backup modes.
Supported ordering of service software versions entries.
Supported ordering of service software versions entries.
Available check execution intervals.
Available parameter types.
BackupStatus status (in the same order as in artifacts.proto).
RestoreStatus status (in the same order as in restores.proto).
Default values for settings.
Default values for settings.
Available template sources.
Available template sources.
VerifyCaSSLMode represent verify-ca PostgreSQL ssl mode.
VerifyFullSSLMode represent verify-full PostgreSQL ssl mode.
Default values for settings.
Agent types (in the same order as in agents.proto).
VMBaseURL is the base URL for VictoriaMetrics.
SoftwareName types of different software.
SoftwareName types of different software.
# Variables
ActionResultTable represents action_results view or table in SQL database.
AgentTable represents agents view or table in SQL database.
ArtifactTable represents artifacts view or table in SQL database.
BackupLocationTable represents backup_locations view or table in SQL database.
CheckSettingsTable represents check_settings view or table in SQL database.
DefaultAgentEncryptionColumnsV3 since 3.0.0 contains all tables and it's columns to be encrypted in PMM Server DB.
DumpLogView represents dump_logs view or table in SQL database.
DumpTable represents dumps view or table in SQL database.
ErrAlreadyExists returned when an entity with the same value already exists and has unique constraint on the requested field.
ErrInvalidServiceType is returned when unsupported service type is provided.
ErrNotConnectedToPortal is an error indicating that PMM Server is not connected to the Portal.
ErrNotFound returned when entity is not found.
ErrRoleIsDefaultRole is returned when trying to delete a default role.
ErrRoleNotFound is returned when a role is not found.
ErrTxRequired is returned when a transaction is required.
ErrUserAlreadyExists is returned when a user already exists in db.
HashPassword func to calculate password hash.
JobLogView represents job_logs view or table in SQL database.
JobTable represents jobs view or table in SQL database.
NodeTable represents nodes view or table in SQL database.
Now returns current time with database precision.
PerconaSSODetailsTable represents percona_sso_details view or table in SQL database.
PMMAgentMinVersionForPostgreSQLSSLSni is the minimum required version of PMM Agent.
PMMAgentWithPushMetricsSupport - version of pmmAgent, that support vmagent and push metrics mode will be released with PMM Agent v2.12.
RestoreHistoryItemTable represents restore_history view or table in SQL database.
RoleTable represents roles view or table in SQL database.
ScheduledTaskTable represents scheduled_tasks view or table in SQL database.
ServiceSoftwareVersionsTable represents service_software_versions view or table in SQL database.
ServiceTable represents services view or table in SQL database.
TemplateTable represents alert_rule_templates view or table in SQL database.
UserDetailsTable represents user_flags view or table in SQL database.
UserRolesView represents user_roles view or table in SQL database.
# Structs
ActionResult describes an action result which is storing in persistent storage.
AddDBMSServiceParams contains parameters for adding DBMS (MySQL, PostgreSQL, MongoDB, External) Services.
Advisors contains settings related to the Portal Advisors.
AdvisorsRunIntervals represents intervals between Advisors checks.
Agent represents Agent as stored in database.
AgentFilters represents filters for agents list.
AgentNotSupportedError is used when the target PMM agent doesn't support the requested functionality.
AlertExprParamDefinition represents query parameter definition.
Artifact represents result of a backup.
ArtifactFilters represents filters for artifacts list.
AWSOptions represents structure for special AWS options.
AzureOptions represents structure for special Azure options.
BackupLocation represents destination for backup.
BackupLocationConfig groups all backup locations configs.
BackupLocationValidationParams contains typed params for backup location validate.
BackupToolData contains extra data for backup tools.
BoolParam represents boolean template parameter.
ChangeBackupLocationParams are params for updating existing backup location.
ChangeCommonAgentParams contains parameters that can be changed for all Agents.
ChangeMetricsResolutionsParams contains metrics resolutions for change.
ChangeRestoreHistoryItemParams are params for changing existing restore history item.
ChangeScheduledTaskParams are params for updating existing schedule task.
ChangeSettingsParams contains values to change data in settings table.
ChangeStandardLabelsParams contains parameters for changing standard labels for a service.
ChangeTemplateParams is params for changing existing rule template.
CheckSettings represents any changes to an Advisor check loaded in pmm-managed.
CommonBackupTaskData contains common data for all backup tasks.
CreateAgentParams params for add common exporter.
CreateArtifactParams are params for creating a new artifact.
CreateBackupLocationParams are params for creating new backup location.
CreateDumpLogParams are params for creating a new pmm-dump log.
CreateDumpParams represents the parameters for creating a dump.
CreateExternalExporterParams params for add external exporter.
CreateJobLogParams are params for creating a new job jog.
CreateJobParams are params for creating a new job.
CreateNodeParams contains parameters for creating Nodes.
CreateRestoreHistoryItemParams are params for creating a new restore history item.
CreateScheduledTaskParams are params for creating new scheduled task.
CreateServiceSoftwareVersionsParams are params for creating a new service software versions entry.
CreateTemplateParams are params for creating new rule template.
CreateUserParams has parameters to create a new user.
DBConfig contains values required to connect to DB.
DelimiterPair contains a pair of safe template delimiters.
DSNParams represents the parameters for configuring a Data Source Name (DSN).
Dump represents pmm dump artifact.
DumpFilters represents filters for dumps list.
DumpLog stores chunk of logs from pmm-dump.
DumpLogsFilter represents filter for dump logs.
ExporterOptions represents structure for special Exporter options.
File represents file or directory.
FilesystemLocationConfig contains require properties for accessing file system on pmm-client-node.
FindServicesSoftwareVersionsFilter represents a filter for finding service software versions.
FloatParam represents float template parameter.
HAParams defines parameters related to High Availability.
InvalidArgumentError returned when some passed argument is invalid.
Job describes a job result which is storing in persistent storage.
JobData contains data required for running a job.
JobLog stores chunk of logs from job.
JobLogsFilter represents filter for job logs.
JobResult holds result data for different job types.
JobsFilter represents filter for jobs.
Metadata contains extra artifact data like files it consists of, tool specific data, etc.
MetricsResolutions contains standard VictoriaMetrics metrics resolutions.
MongoBackupTaskData contains data for mysql backup task.
MongoDBBackupJobData stores MongoDB job specific result data.
MongoDBBackupJobResult stores MongoDB job specific result data.
MongoDBOptions represents structure for special MongoDB options.
MongoDBRestoreBackupJobData stores MongoDB restore backup job specific result data.
MongoDBRestoreBackupJobResult stores MongoDB restore backup job specific result data.
MySQLBackupJobData stores MySQL job specific result data.
MySQLBackupJobResult stores MySQL job specific result data.
MySQLBackupTaskData contains data for mysql backup task.
MySQLOptions represents structure for special MySQL options.
MySQLRestoreBackupJobData stores MySQL restore backup job specific result data.
MySQLRestoreBackupJobResult stores MySQL restore backup job specific result data.
Node represents Node as stored in database.
NodeFilters represents filters for nodes list.
Params defines parameters for supervisor.
PbmMetadata contains extra data for pbm cli tool.
PerconaSSOAccessToken represents structure for special access token options.
PerconaSSODetails stores everything what we need to issue access_token from Percona SSO API.
PerconaSSODetailsInsert stores everything what we can set.
PGParams represent postgreSQL server params.
PostgreSQLOptions represents structure for special PostgreSQL options.
PostgreSQLVersion represent major, minor numbers of PostgreSQL version separated by comma.
QANOptions represents structure for special QAN options.
RestoreHistoryItem represents a restore backup history.
RestoreHistoryItemFilters represents filters for restore history items.
Role represents Role as stored in database.
S3LocationConfig contains required properties for accessing S3 Bucket.
ScheduledTask describes a scheduled task.
ScheduledTaskData contains result data for different task types.
ScheduledTasksFilter represents filters for scheduled tasks.
Service represents Service as stored in database.
ServiceFilters represents filters for services list.
ServiceSoftwareVersions represents service software versions.
ServiceType represents Service type as stored in databases: pmm-managed's PostgreSQL, qan-api's ClickHouse, and VictoriaMetrics.
Settings contains PMM Server settings.
SetupDBParams represents SetupDB parameters.
SoftwareVersion represents version of the given software.
StringParam represents string template parameter.
Template represents Percona Alerting rule template.
UpdateArtifactParams are params for changing existing artifact.
UpdateServiceSoftwareVersionsParams represents params for updating service software versions entity.
UpdateUserParams has parameters to update existing user.
UserDetails represents user related flags
reform:user_flags.
UserRoles represents mapping of users to roles.
VictoriaMetricsParams - defines flags and settings for victoriametrics.
# Interfaces
AzureOptionsParams contains methods to create AzureOptions object.
MongoDBExtendedOptionsParams contains extended parameters for MongoDB exporter.
MongoDBOptionsParams contains methods to create MongoDBOptions object.
MySQLOptionsParams contains methods to create MySQLOptions object.
PostgreSQLExtendedOptionsParams contains extended parameters for PostgreSQL exporter.
PostgreSQLOptionsParams contains methods to create PostgreSQLOptions object.
# Type aliases
AgentType represents Agent type as stored in databases: pmm-managed's PostgreSQL, qan-api's ClickHouse, and VictoriaMetrics.
AlertExprParamsDefinitions represent AlertExprParamDefinition slice.
ArtifactType represents type how artifact was created.
BackupLocationType represents BackupLocation type as stored in database.
BackupMode represents artifact mode.
BackupStatus shows current status of backup.
DataModel represents a data model used for performing a backup.
DumpStatus represents the status of a dump process.
Interval represents check execution interval.
JobType represents job type.
MetadataList is a list of metadata associated with artifacts.
NodeType represents Node type as stored in databases: pmm-managed's PostgreSQL, qan-api's ClickHouse, and VictoriaMetrics.
ParamType represents parameter type.
ParamUnit parameter unit.
RemoveMode defines how Remove functions deal with dependent objects.
RestoreStatus shows current status of restore.
ScheduledTaskType represents scheduled task type.
ServiceType represents Service type as stored in databases: pmm-managed's PostgreSQL, qan-api's ClickHouse, and VictoriaMetrics.
SetupFixturesMode defines if SetupDB adds initial data to the database or not.
Severity represents alert severity.
SoftwareName represents software name.
SoftwareVersions represents slice of SoftwareVersion.
SoftwareVersionsOrderBy is a type used for results ordering either by next check time or service id.
Source represents template source.
Tiers represents tiers slice.