Documentation
¶
Index ¶
- Variables
- func AppInit(c *cli.Context)
- func CheckConf(...) error
- func CheckDb(dbdriver, dbhost, dbuser, dbpass, dbname string, dbport string) error
- func CheckZabbix(address, user, pass string) (string, error)
- func CreateEventTpl() string
- func GetActionID(value interface{}) (string, error)
- func GetMediaTypeID(value interface{}) (string, error)
- func LoginZabbix() (string, error)
- func PreCheckConf() error
- func RandStringRunes() string
- func UpdateAction(c *cli.Context)
- func WriteConf(...) error
- type ActionResult
- type EventTpl
- type MediaResult
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Install cli Install = cli.Command{ Name: "install", Usage: "Install ms-agent tools to Zabbix Server", Description: "Install ms-agent tools to Zabbix Server", Action: installAagent, } API = &zabbix.API{} )
View Source
var ( // Init cli Init = cli.Command{ Name: "init", Usage: "Init config file", Description: "A tools to send alarm message to ZbxTable", Action: AppInit, } )
View Source
var ( // Install cli Ua = cli.Command{ Name: "ua", Usage: "Update action", Description: "Update action", Action: UpdateAction, } )
View Source
var ( //Web 配置 Uc = cli.Command{ Name: "uc", Usage: "Update config file", Description: "Update config file", Action: updateconfig, } )
View Source
var ( //Web 配置 Web = cli.Command{ Name: "web", Usage: "Start web server", Description: "ZbxTable web server", Action: runWeb, } )
Functions ¶
func CheckConf ¶ added in v1.1.0
func CheckConf(zabbix_web, zabbix_user, zabbix_pass, dbtype, dbhost, dbuser, dbpass, dbname, dbport string) error
check conf
func CheckZabbix ¶ added in v1.1.0
CheckZabbix
func CreateEventTpl ¶ added in v1.1.0
func CreateEventTpl() string
func GetActionID ¶ added in v1.1.0
func GetMediaTypeID ¶ added in v1.1.0
func LoginZabbix ¶ added in v1.1.0
func UpdateAction ¶ added in v1.1.0
Types ¶
type ActionResult ¶ added in v1.1.0
type ActionResult struct {
ActionID string `json:"actionid"`
}
type EventTpl ¶ added in v1.1.0
type EventTpl struct { HostsID string `json:"host_id"` HostHost string `json:"host_host"` Hostname string `json:"hostname"` HostsIP string `json:"host_ip"` HostGroup string `json:"host_group"` EventTime string `json:"event_time"` Severity string `json:"severity"` TriggerID string `json:"trigger_id"` TriggerName string `json:"trigger_name"` TriggerKey string `json:"trigger_key"` TriggerValue string `json:"trigger_value"` ItemID string `json:"item_id"` ItemName string `json:"item_name"` ItemValue string `json:"item_value"` EventID string `json:"event_id"` }
type MediaResult ¶ added in v1.1.0
type MediaResult struct {
MediaTypeID string `json:"mediatypeid"`
}
Click to show internal directories.
Click to hide internal directories.