Versions in this module Expand all Collapse all v1 v1.1.5 Aug 14, 2021 v1.1.4 Jul 7, 2021 v1.1.3 Mar 10, 2021 v1.1.2 Mar 2, 2021 Changes in this version + func GetConfKey(v string) string + func LoginZabbixWeb(ZabbixWeb, ZabbixUser, ZabbixPass string) v1.1.1 Dec 24, 2020 v1.1.0 Dec 23, 2020 Changes in this version + func MsAdd(token, tenantid string, message []byte) (int64, error) type Alarm + HostID string + Hostname string + HostsIP string + ItemID int64 + ItemName string + ItemValue string + TenantID string + TriggerID int64 + type EventTpl struct + EventID int64 + EventTime string + HostGroup string + HostHost string + Hostname string + HostsID string + HostsIP string + ItemID int64 + ItemName string + ItemValue string + Severity string + TriggerID int64 + TriggerKey string + TriggerName string + TriggerValue string v1.0.9 Nov 28, 2020 v1.0.8 Nov 26, 2020 v1.0.7 Nov 4, 2020 v1.0.6 Sep 3, 2020 v1.0.5 Aug 18, 2020 v1.0.3 Jul 30, 2020 Changes in this version + const Agent + const Available + const IPMI + const Internal + const JMX + const Monitored + const NotInternal + const SNMP + const Unavailable + const Unmonitored + var API = &zabbix.API + var JAR = new(Jar) + var ZabbixServer = beego.AppConfig.String("zabbix_server") + func AddAlarm(m *Alarm) (id int64, err error) + func AddManager(m *Manager) (id int64, err error) + func Chanagepwd(Md *Chpwd) (err error) + func Compress(files []*os.File, dest string) error + func CreateAlarmXlsx(Filedata []Alarm, cnt, start, end int64) ([]byte, error) + func CreateHistoryXlsx(Filedata []History, v ListQueryAll, start, end int64) ([]byte, error) + func CreateOneXls(RRD []FileSystemDataALL, host, itemtype string, start, end int64) (filename string, err error) + func CreateTrenXlsx(Filedata []Trend, v ListQueryAll, start, end int64) ([]byte, error) + func Crt(Filedata []FileSystemDataALL, host, itemtype string, start, end int64) ([]byte, error) + func DatabaseInit() + func DeleteAlarm(id int) (err error) + func ExpInspect(groupname string, Insp []Insp) ([]byte, error) + func ExportAlarm(begin, end time.Time, hosts string) ([]byte, error) + func FileCommon(filelist []string, name string) error + func GetHistoryDataFileName(v ListQueryAll, start, end int64) ([]byte, error) + func GetPdfImageHolder(grupinfo GraphInfo, start, end string, wg *sync.WaitGroup, ...) + func GetTrenDataFileName(v ListQueryAll, start, end int64) ([]byte, error) + func Intt() + func LookImg(w http.ResponseWriter, r *http.Request) + func ModelsInit() + func RemoveRepeatedElement(arr []string) (newArr []string) + func Round(f float64, n int) float64 + func SaveImagePDF(hostids []string, start, end string) ([]byte, error) + func TableName(str string) string + func UpdateAlarmByID(m *Alarm) (err error) + type Alarm struct + Detail string + EventID string + Hgroup string + Hkey string + Host string + ID int + Level string + Message string + Occurtime time.Time + Status string + func GetAlarmByID(id int) (v *Alarm, err error) + func GetAllAlarm(begin, end time.Time, page, limit, hosts string) (cnt int64, alarm []Alarm, err error) + func (t *Alarm) TableName() string + type AlarmList struct + Code int + Data struct{ ... } + Message string + type AnalysisList struct + Code int + Data struct{ ... } + Message string + type Application struct + Applicationid string + Items []ApplicationItem + Name string + func GetApplicationByHostid(hostid string) ([]Application, int64, error) + type ApplicationItem struct + ItemID string + Name string + Units string + ValutType string + type ApplicationList struct + Code int + Data struct{ ... } + Message string + type Auth struct + Code int + Data struct{ ... } + Message string + type AvailableType int + type Chpwd struct + Name string + Oldpwd string + Pwd1 string + Pwd2 string + type EndTrigger struct + Acknowledged string + Eventid string + Hostid string + LastEventName string + Lastchange string + Name string + Objectid string + Severity string + func GetTriggers() ([]EndTrigger, int64, error) + type ExpList struct + Code int + Data struct{ ... } + Message string + type FileSystemData struct + Clock string + ItemID string + ItemKey string + ItemName string + MountPoint string + Num string + ValueAvg string + ValueMax string + ValueMin string + type FileSystemDataALL struct + FileSystemDataADD []FileSystemData + MountPoint string + func GetTrenDataTable(itd []Itm, itemkey, host, ItemType string, start, end int64) ([]FileSystemDataALL, []byte, error) + type FileSystemDataVue struct + FileSystemDataADD []FileSystemData + type FileSystemInfo struct + ItemID string + ItemKey string + ItemName string + MountPoint string + type GIDList struct + GIDList []GraphIDList + type GraphByteInfo struct + GraphByte []byte + GraphID string + Name string + type GraphExpQuery struct + Hostids []string + Period []string + type GraphIDList struct + GraphList []GraphInfo + Hosts string + type GraphInfo struct + GraphID string + Name string + func GetGraphByHostID(hostid int, start, end int64) ([]GraphInfo, int64, error) + type GraphList struct + Code int + Data struct{ ... } + Message string + type GraphListQuery struct + Hostid string + Period []string + type GroupHosts struct + HostID string + Name string + Status string + type History struct + Clock string + Itemid string + Ns string + Value string + func GetHistoryByItemID(itemid, history string, limit string) ([]History, error) + func GetHistoryByItemIDNew(item Item, time_from, time_till int64) ([]History, error) + func GetHistoryByItemIDNewP(itemid, TimeFrom, TimeTill int64) ([]History, error) + type HistoryList struct + Code int + Data struct{ ... } + Message string + type Host struct + Available string + Error string + Groups string + Host string + HostID string + Interfaces string + Name string + Status string + Template []string + type HostGet struct + ID int + Jsonrpc string + Result []struct{ ... } + type HostGroup struct + GroupID string + Internal InternalType + Name string + type HostGroupBYGroupID struct + GroupID string + Hosts []GroupHosts + Name string + func GetHostsByGroupID(GroupID string) ([]HostGroupBYGroupID, error) + func GetHostsInfoByGroupID(GroupID string) ([]HostGroupBYGroupID, error) + type HostGroupBYGroupIDList struct + Code int + Data struct{ ... } + Message string + type HostGroupID struct + GroupID string + type HostGroupIds []HostGroupID + type HostGroups struct + Flags string + GroupID string + Hosts string + Internal string + Name string + func GetAllHostGroups(page, limit, groups string) ([]HostGroups, int64, error) + type HostGroupsList struct + Code int + Data struct{ ... } + Message string + type HostGroupsPlist struct + Flags string + GroupID string + Hosts []Host + Internal string + Name string + type HostInterface struct + DNS string + IP string + Main int + Port string + Type InterfaceType + UseIP int + type HostInterfaces []HostInterface + type HostList struct + Code int + Data struct{ ... } + Message string + type HostTree struct + Chrildren []struct{ ... } + GroupID string + Name string + func GetAllHostGroupsList() ([]HostTree, int64, error) + type HostTreeList struct + Code int + Data struct{ ... } + Message string + type Hosts struct + Available string + Error string + Groups string + Host string + HostID string + Interfaces string + Name string + Status string + Template []string + func GetHostsByGroupIDList(GroupID string) ([]Hosts, error) + func HostsList(page, limit, hosts string) ([]Hosts, int64, error) + type HostsData struct + Host string + Hostid string + Items []struct{ ... } + ParentTemplates []struct{ ... } + func GetHostData(hostid string) (hostd []HostsData, err error) + type IndexInfo struct + Hosts int64 + Items int64 + Problems int64 + Triggers int64 + func GetCountHost() (info IndexInfo, err error) + type InfoRes struct + Code int + Data struct{ ... } + Message string + type Insp struct + CPULoad float64 + HostName string + MemPct float64 + type InterfaceType int + type InternalType int + type Item struct + AllowTraps string + Authtype string + Delay string + Description string + Error string + Evaltype string + Flags string + FollowRedirects string + HTTPProxy string + Headers []interface{} + History string + Hostid string + Interfaceid string + InventoryLink string + IpmiSensor string + Itemid string + JmxEndpoint string + Key string + Lastclock string + Lastlogsize string + Lastns string + Lastvalue string + Lifetime string + Logtimefmt string + MasterItemid string + Mtime string + Name string + OutputFormat string + Params string + Password string + Port string + PostType string + Posts string + Prevvalue string + Privatekey string + Publickey string + QueryFields []interface{} + RequestMethod string + RetrieveMode string + SnmpCommunity string + SnmpOid string + Snmpv3Authpassphrase string + Snmpv3Authprotocol string + Snmpv3Contextname string + Snmpv3Privpassphrase string + Snmpv3Privprotocol string + Snmpv3Securitylevel string + Snmpv3Securityname string + SslCertFile string + SslKeyFile string + SslKeyPassword string + State string + Status string + StatusCodes string + Templateid string + Timeout string + TrapperHosts string + Trends string + Type string + URL string + Units string + Username string + ValueType string + Valuemapid string + VerifyHost string + VerifyPeer string + func GetAllItemByHostID(hostid string) (item []Item, count int64, err error) + func GetItemByKey(hostid, key string) (item []Item, err error) + type ItemList struct + Code int + Data struct{ ... } + Message string + type Items struct + Itemid string + Key string + Name string + type Itm struct + ItemKey string + ItemName string + Itemids string + State string + Status string + func GetExpTrendData(hostdata []HostsData, itemtype string) ([]Itm, string, string, error) + type Jar struct + func (jar *Jar) Cookies(u *url.URL) []*http.Cookie + func (jar *Jar) SetCookies(u *url.URL, cookies []*http.Cookie) + type LastTriggers struct + Comments string + CorrelationMode string + CorrelationTag string + Description string + Details string + Error string + Expression string + Flags string + Hosts []struct{ ... } + LastEvent struct{ ... } + Lastchange string + ManualClose string + Priority string + RecoveryExpression string + RecoveryMode string + State string + Status string + Templateid string + Triggerid string + Type string + URL string + Value string + type ListAnalysisAlarm struct + Begin string + End string + type ListExportAlarm struct + Begin string + End string + Hosts string + type ListHosts []struct + type ListQuery struct + HostID string + ItemType string + Period []string + type ListQueryAlarm struct + Host string + Period []string + type ListQueryAll struct + Host Host + Item Item + Period []string + type ListQueryNew struct + HostID string + Item Item + Period []string + type MailMessage struct + Detail string + EventID string + Hgroup string + Hkey string + Host string + ID int + Level string + Mail string + Message string + Occurtime time.Time + Status string + type Manager struct + Avatar string + Created time.Time + ID int + Password string + Role string + Status int64 + Username string + func GetManagerByID(id int) (v *Manager, err error) + func GetManagerByName(username string) (v *Manager, err error) + func (t *Manager) TableName() string + type ManagerInfo struct + Code int + Data struct{ ... } + Message string + type Params map[string]interface + type Pie struct + Name string + Value int + func AnalysisAlarm(begin, end time.Time) (arrytile []string, pie []Pie, na []string, va []int, err error) + type Problems struct + Acknowledged string + Clock string + Correlationid string + Eventid string + Name string + Objectid string + Severity string + func GetProblems() ([]Problems, int64, error) + type ProblemsRes struct + Code int + Data struct{ ... } + Message string + type SendALarm struct + Detail string + EventID string + Hgroup string + Hkey string + Host string + ID int + Level string + Mail []string + Message string + Occurtime time.Time + Sms []string + Status string + Weixin []string + type SmsMessage struct + Detail string + EventID string + Hgroup string + Hkey string + Host string + ID int + Level string + Message string + Occurtime time.Time + Sms string + Status string + type StatusType int + type Template struct + Applications string + Discoveries string + Graphs string + Host string + Hosts []struct{ ... } + Items string + Name string + Screens string + Templateid string + Triggers string + func TemplateAllGet() ([]Template, int64, error) + func TemplateGet(page, limit, templates string) ([]Template, int64, error) + type TemplateList struct + Code int + Data struct{ ... } + Message string + type Token struct + Token string + type Trend struct + Clock string + Itemid string + Num string + ValueAvg string + ValueMax string + ValueMin string + func GetTrendByItemID(itemid string, limit string) ([]Trend, error) + func GetTrendData(itemid, timefrom, timetill string) ([]Trend, error) + func GetTrendDataByItemid(item Item, time_from, time_till int64) ([]Trend, error) + type TrendList struct + Code int + Data struct{ ... } + Message string + type TriggersRes struct + Code int + Data struct{ ... } + Message string + type WeixinMessage struct + Detail string + EventID string + Hgroup string + Hkey string + Host string + ID int + Level string + Message string + Occurtime time.Time + Status string + Weixin string