inventory

package
v2.0.0-beta4+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: AGPL-3.0 Imports: 6 Imported by: 0

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 AgentFilters

type AgentFilters struct {
	// Return only Agents started by this pmm-agent.
	PMMAgentID string
	// Return only Agents that provide insights for that Node.
	NodeID string
	// Return only Agents that provide insights for that Service.
	ServiceID string
}

AgentFilters represents filters for agents list.

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) *AgentsService

NewAgentsService creates new AgentsService

func (*AgentsService) AddMongoDBExporter

AddMongoDBExporter inserts mongodb_exporter Agent with given parameters.

func (*AgentsService) AddMySQLdExporter

AddMySQLdExporter inserts mysqld_exporter Agent with given parameters.

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) AddQANPostgreSQLPgStatementsAgent

AddQANPostgreSQLPgStatementsAgent adds PostgreSQL Pg stat statements QAN Agent.

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) ChangeQANPostgreSQLPgStatementsAgent

ChangeQANPostgreSQLPgStatementsAgent updates PostgreSQL Pg stat statements QAN 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 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
}

func NewNodesService

func NewNodesService(db *reform.DB) *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) AddRemoteAmazonRDSNode

AddRemoteAmazonRDSNode adds Amazon (AWS) RDS remote Node.

func (*NodesService) AddRemoteNode

AddRemoteNode adds Remote Node.

func (*NodesService) Get

Get returns a single Node by ID.

func (*NodesService) List

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.

type ServiceFilters

type ServiceFilters struct {
	// Return only Services runs on that Node.
	NodeID string
}

ServiceFilters represents filters for services list.

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) *ServicesService

NewServicesService creates new ServicesService

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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