mysql

package
v5.6.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mysql is Metricbeat module for MySQL server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMySQLEnvDSN

func GetMySQLEnvDSN() string

GetMySQLEnvDSN returns the MySQL server DSN to use for testing. It reads the value from the MYSQL_DSN environment variable and returns root@tcp(127.0.0.1:3306)/ if it is not set.

func NewDB

func NewDB(dsn string) (*sql.DB, error)

NewDB returns a new mysql database handle. The dsn value (data source name) must be valid, otherwise an error will be returned.

DSN Format: [username[:password]@][protocol[(address)]]/

func NewModule

func NewModule(base mb.BaseModule) (mb.Module, error)

func ParseDSN

func ParseDSN(mod mb.Module, host string) (mb.HostData, error)

ParseDSN creates a DSN (data source name) string by parsing the host. It validates the resulting DSN and returns an error if the DSN is invalid.

Format:  [username[:password]@][protocol[(address)]]/
Example: root:test@tcp(127.0.0.1:3306)/

Types

This section is empty.

Directories

Path Synopsis
Package status fetches MySQL server status metrics.
Package status fetches MySQL server status metrics.

Jump to

Keyboard shortcuts

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