cmd

package
v0.0.0-...-3fe897a Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

Variables

View Source
var (
	Debug           bool
	Interval        int
	Slave           bool
	Mysql_username  string
	Mysql_password  string
	Mysql_host      string
	Mysql_port      int
	Zabbix_host     string
	Zabbix_port     int
	Zabbix_hostname string
)
View Source
var ConfigFile string
View Source
var Db *sql.DB
View Source
var SlaveStatusToSend = []string{
	"Exec_Master_Log_Pos",
	"Read_Master_Log_Pos",
	"Relay_Log_Pos",
	"Seconds_Behind_Master",
	"Slave_IO_Running",
	"Slave_SQL_Running",
}
View Source
var VersionCmd = &cobra.Command{
	Use:   "version",
	Short: "Version",
	Long: `Version. For example:

mymon version`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println(VERSION)
	},
}

VersionCmd represents the ping command

Functions

func Dbcon

func Dbcon() (db *sql.DB, err error)

func Execute

func Execute()

func GlobalStatus

func GlobalStatus(db *sql.DB, host string) ([]*Metric, error)

func GlobalVariables

func GlobalVariables(db *sql.DB, host string) ([]*Metric, error)

func SlaveStatus

func SlaveStatus(db *sql.DB, host string) ([]*Metric, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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