Documentation ¶
Index ¶
- Constants
- Variables
- func GetFidAndAVCFromDB(id int, stype string) (int64, string, error)
- func GetHostGroup(hostname string) (string, error)
- func GetHostIP(hostname string) (string, error)
- func GetMetricType(hostname, counter string) (string, error)
- func InitLog(level string) (err error)
- func InitRedisConnPool()
- func Link(event *cmodel.Event) string
- func ParseConfig(cfg string)
- func PingRedis(c redis.Conn, t time.Time) error
- func UpdateFidToDB(id int, fid int64, stype string) error
- type ApiConfig
- type CMDHostInfoResponse
- type CombinerConfig
- type FalconPortalConfig
- type GlobalConfig
- type HostObject
- type HousekeeperConfig
- type HttpConfig
- type PigeonConfig
- type RedisConfig
- type WorkerConfig
Constants ¶
View Source
const ( VERSION = "1.0.2" CMDB_APP = "VipFalcon" CMDB_KEY = "329a55d8ddff6359c63eccb52c611140" )
Variables ¶
View Source
var (
ConfigFile string
)
View Source
var RedisConnPool *redis.Pool
View Source
var RedisConnPoolCDMBCache *redis.Pool
Functions ¶
func GetHostGroup ¶
func GetMetricType ¶
func InitRedisConnPool ¶
func InitRedisConnPool()
func ParseConfig ¶
func ParseConfig(cfg string)
Types ¶
type CMDHostInfoResponse ¶
type CMDHostInfoResponse struct { Code int `json:"code"` Message string `json:"message"` Hosts []*HostObject `json:"object"` Success bool `json:"success"` }
type CombinerConfig ¶
add by vincent.zhang for pigeon
type FalconPortalConfig ¶
type GlobalConfig ¶
type GlobalConfig struct { LogLevel string `json:"log_level"` FalconPortal *FalconPortalConfig `json:"falcon_portal"` Http *HttpConfig `json:"http"` Redis *RedisConfig `json:"redis"` SendOK bool `json:"send_ok"` //add by vincent.zhang for ok event ChangeIgnore bool `json:"change_ignore"` //add by vincent.zhang for ignore status, 已被ignore的告警再来problem event是否改变为unresolved,并发送 SendMoreMax bool `json:"send_more_max"` //add by vincent.zhang for ignore status, 已达到最大告警次数的告警再来problem event是否发送 Pigeon *PigeonConfig `json:"pigeon"` //add by vincent.zhang for pigeon Api *ApiConfig `json:"api"` Worker *WorkerConfig `json:"worker"` Housekeeper *HousekeeperConfig `json:"Housekeeper"` }
func Config ¶
func Config() *GlobalConfig
type HostObject ¶
type HostObject struct { Hostname string `json:"server_name"` IP string `json:"ip"` Domain string `json:"domain_name"` Buss_name string `json:"buss_name` }
func GetHostInfoFromCMDB ¶
func GetHostInfoFromCMDB(hostname string) (*HostObject, error)
type HousekeeperConfig ¶
type HttpConfig ¶
type PigeonConfig ¶
type PigeonConfig struct { AlarmAddr string `json:"alarm_addr"` OKAddr string `json:"ok_addr"` FidAddr string `json:"fid_addr"` HighCombiner *CombinerConfig `json:"high_combiner"` LowCombiner *CombinerConfig `json:"low_combiner"` }
type RedisConfig ¶
type RedisConfig struct { Addr string `json:"addr"` AddrCMDBCache string `json:"addrCMDBCache"` MaxIdle int `json:"maxIdle"` HighQueues []string `json:"highQueues"` LowQueues []string `json:"lowQueues"` UserIMQueue string `json:"userIMQueue"` UserSmsQueue string `json:"userSmsQueue"` UserMailQueue string `json:"userMailQueue"` PigeonHighQueue string `json:"pigeonHighQueue"` //add by vincent.zhang for combining high level alarms PigeonLowQueue string `json:"pigeonLowQueue"` //add by vincent.zhang for combining high low alarms }
Click to show internal directories.
Click to hide internal directories.