inventory

package
v2.16.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2021 License: AGPL-3.0 Imports: 10 Imported by: 2

Documentation

Overview

Package inventory contains inventory business logic: Nodes, Services, Agents.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentsService

type AgentsService struct {
	// contains filtered or unexported fields
}

AgentsService works with inventory API Agents.

func NewAgentsService

func NewAgentsService(db *reform.DB, r agentsRegistry, vmdb prometheusService) *AgentsService

NewAgentsService creates new AgentsService

func (*AgentsService) AddAzureDatabaseExporter

AddAzureDatabaseExporter inserts azure_exporter Agent with given parameters.

func (*AgentsService) AddExternalExporter

AddExternalExporter inserts external-exporter Agent with given parameters.

func (*AgentsService) AddMongoDBExporter

AddMongoDBExporter inserts mongodb_exporter Agent with given parameters.

func (*AgentsService) AddMySQLdExporter

AddMySQLdExporter inserts mysqld_exporter Agent with given parameters and returns it and an actual table count.

func (*AgentsService) AddNodeExporter

AddNodeExporter inserts node_exporter Agent with given parameters.

func (*AgentsService) AddPMMAgent

AddPMMAgent inserts pmm-agent Agent with given parameters.

func (*AgentsService) AddPostgresExporter

AddPostgresExporter inserts postgres_exporter Agent with given parameters.

func (*AgentsService) AddProxySQLExporter

AddProxySQLExporter inserts proxysql_exporter Agent with given parameters.

func (*AgentsService) AddQANMongoDBProfilerAgent

AddQANMongoDBProfilerAgent adds MongoDB Profiler QAN Agent.

func (*AgentsService) AddQANMySQLPerfSchemaAgent

AddQANMySQLPerfSchemaAgent adds MySQL PerfSchema QAN Agent.

func (*AgentsService) AddQANMySQLSlowlogAgent

AddQANMySQLSlowlogAgent adds MySQL Slowlog QAN Agent.

func (*AgentsService) AddQANPostgreSQLPgStatMonitorAgent

AddQANPostgreSQLPgStatMonitorAgent adds PostgreSQL Pg stat monitor QAN Agent.

func (*AgentsService) AddQANPostgreSQLPgStatementsAgent

AddQANPostgreSQLPgStatementsAgent adds PostgreSQL Pg stat statements QAN Agent.

func (*AgentsService) AddRDSExporter

AddRDSExporter inserts rds_exporter Agent with given parameters.

func (*AgentsService) ChangeAzureDatabaseExporter

ChangeAzureDatabaseExporter updates azure_exporter Agent with given parameters.

func (*AgentsService) ChangeExternalExporter

ChangeExternalExporter updates external-exporter Agent with given parameters.

func (*AgentsService) ChangeMongoDBExporter

ChangeMongoDBExporter updates mongo_exporter Agent with given parameters.

func (*AgentsService) ChangeMySQLdExporter

ChangeMySQLdExporter updates mysqld_exporter Agent with given parameters.

func (*AgentsService) ChangeNodeExporter

ChangeNodeExporter updates node_exporter Agent with given parameters.

func (*AgentsService) ChangePostgresExporter

ChangePostgresExporter updates postgres_exporter Agent with given parameters.

func (*AgentsService) ChangeProxySQLExporter

ChangeProxySQLExporter updates proxysql_exporter Agent with given parameters.

func (*AgentsService) ChangeQANMongoDBProfilerAgent

ChangeQANMongoDBProfilerAgent updates MongoDB Profiler QAN Agent with given parameters.

func (*AgentsService) ChangeQANMySQLPerfSchemaAgent

ChangeQANMySQLPerfSchemaAgent updates MySQL PerfSchema QAN Agent with given parameters.

func (*AgentsService) ChangeQANMySQLSlowlogAgent

ChangeQANMySQLSlowlogAgent updates MySQL Slowlog QAN Agent with given parameters.

func (*AgentsService) ChangeQANPostgreSQLPgStatMonitorAgent

ChangeQANPostgreSQLPgStatMonitorAgent updates PostgreSQL Pg stat monitor QAN Agent with given parameters.

func (*AgentsService) ChangeQANPostgreSQLPgStatementsAgent

ChangeQANPostgreSQLPgStatementsAgent updates PostgreSQL Pg stat statements QAN Agent with given parameters.

func (*AgentsService) ChangeRDSExporter

ChangeRDSExporter updates rds_exporter Agent with given parameters.

func (*AgentsService) Get

Get selects a single Agent by ID.

func (*AgentsService) List

func (as *AgentsService) List(ctx context.Context, filters models.AgentFilters) ([]inventorypb.Agent, error)

List selects all Agents in a stable order for a given service.

func (*AgentsService) Remove

func (as *AgentsService) Remove(ctx context.Context, id string, force bool) error

Remove removes Agent, and sends state update to pmm-agent, or kicks it.

type NodesService

type NodesService struct {
	// contains filtered or unexported fields
}

NodesService works with inventory API Nodes.

func NewNodesService

func NewNodesService(db *reform.DB, r agentsRegistry, vmdb prometheusService) *NodesService

NewNodesService returns Inventory API handler for managing Nodes.

func (*NodesService) AddContainerNode

AddContainerNode adds Container Node.

func (*NodesService) AddGenericNode

AddGenericNode adds Generic Node.

func (*NodesService) AddRemoteAzureDatabaseNode

AddRemoteAzureDatabaseNode adds a new Azure database node

func (*NodesService) AddRemoteNode

AddRemoteNode adds Remote Node.

func (*NodesService) AddRemoteRDSNode

AddRemoteRDSNode adds a new RDS node

func (*NodesService) Get

Get returns a single Node by ID.

func (*NodesService) List

func (s *NodesService) List(ctx context.Context, filters models.NodeFilters) ([]inventorypb.Node, error)

List returns a list of all Nodes.

func (*NodesService) Remove

func (s *NodesService) Remove(ctx context.Context, id string, force bool) error

Remove removes Node without any Agents and Services. Removes Node with the Agents and Services if force == true. Returns an error if force == false and Node has Agents or Services.

type ServicesService

type ServicesService struct {
	// contains filtered or unexported fields
}

ServicesService works with inventory API Services.

func NewServicesService

func NewServicesService(db *reform.DB, r agentsRegistry, vmdb prometheusService) *ServicesService

NewServicesService creates new ServicesService

func (*ServicesService) AddExternalService

AddExternalService inserts External Service with given parameters.

func (*ServicesService) AddHAProxyService

AddHAProxyService inserts HAProxy Service with given parameters.

func (*ServicesService) AddMongoDB

AddMongoDB inserts MongoDB Service with given parameters.

func (*ServicesService) AddMySQL

AddMySQL inserts MySQL Service with given parameters.

func (*ServicesService) AddPostgreSQL

AddPostgreSQL inserts PostgreSQL Service with given parameters.

func (*ServicesService) AddProxySQL

AddProxySQL inserts ProxySQL Service with given parameters.

func (*ServicesService) Get

Get selects a single Service by ID.

func (*ServicesService) List

List selects all Services in a stable order.

func (*ServicesService) Remove

func (ss *ServicesService) Remove(ctx context.Context, id string, force bool) error

Remove removes Service without any Agents. Removes Service with the Agents if force == true. Returns an error if force == false and Service has Agents.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL