alarm

package
v0.0.0-...-1489327 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountAlertHistory

func CountAlertHistory(condArr map[string]string) int64

统计数量

func CountAlerts

func CountAlerts(condArr map[string]string) int64

统计数量

Types

type Alert

type Alert struct {
	Id                  int    `orm:"pk;column(Id);"`
	Asset_Id            int    `orm:"column(asset_id);"`
	Asset_Desc          string `orm:"column(asset_desc);"`
	Name                string `orm:"column(name);"`
	Severity            string `orm:"column(severity);"`
	Templateid          int    `orm:"column(templateid);"`
	Subject             string `orm:"column(subject);"`
	Message             string `orm:"column(message);"`
	Status              int    `orm:"column(status);"`
	Send_Mail           int    `orm:"column(send_mail);"`
	Send_Mail_List      string `orm:"column(send_mail_list);"`
	Send_Mail_Status    int    `orm:"column(send_mail_status);"`
	Send_Mail_Retries   int    `orm:"column(send_mail_retries);"`
	Send_Mail_Error     string `orm:"column(send_mail_error);"`
	Send_WeChat         int    `orm:"column(send_wechat);"`
	Send_WeChat_Status  int    `orm:"column(send_wechat_status);"`
	Send_WeChat_Retries int    `orm:"column(send_wechat_retries);"`
	Send_WeChat_Error   string `orm:"column(send_wechat_error);"`
	Send_SMS            int    `orm:"column(send_sms);"`
	Send_SMS_List       string `orm:"column(send_sms_list);"`
	Send_SMS_Status     int    `orm:"column(send_sms_status);"`
	Send_SMS_Retries    int    `orm:"column(send_sms_retries);"`
	Send_SMS_Error      string `orm:"column(send_sms_error);"`
	Created             int64  `orm:"column(created);"`
}

func ListAlertHistory

func ListAlertHistory(condArr map[string]string, page int, offset int) (num int64, err error, alerts []Alert)

获取告警列表

func ListAlerts

func ListAlerts(condArr map[string]string, page int, offset int) (num int64, err error, alerts []Alert)

获取告警列表

func ListAllAlerts

func ListAllAlerts() (num int64, err error, alerts []Alert)

获取近7天所有告警

func (*Alert) TableName

func (this *Alert) TableName() string

type AlertGroup

type AlertGroup struct {
	Date  string `orm:"column(date);"`
	Count int    `orm:"column(alertcount);"`
	Rate  int    `orm:"column(rate);"`
}

func ListAlertGroup

func ListAlertGroup() (num int64, err error, alertgroup []AlertGroup)

type Alert_History

type Alert_History struct {
	Id                  int    `orm:"pk;column(Id);"`
	Asset_Id            int    `orm:"column(asset_id);"`
	Asset_Desc          string `orm:"column(asset_desc);"`
	Name                string `orm:"column(name);"`
	Severity            string `orm:"column(severity);"`
	Templateid          int    `orm:"column(templateid);"`
	Subject             string `orm:"column(subject);"`
	Message             string `orm:"column(message);"`
	Status              int    `orm:"column(status);"`
	Send_Mail           int    `orm:"column(send_mail);"`
	Send_Mail_List      string `orm:"column(send_mail_list);"`
	Send_Mail_Status    int    `orm:"column(send_mail_status);"`
	Send_Mail_Retries   int    `orm:"column(send_mail_retries);"`
	Send_Mail_Error     string `orm:"column(send_mail_error);"`
	Send_WeChat         int    `orm:"column(send_wechat);"`
	Send_WeChat_Status  int    `orm:"column(send_wechat_status);"`
	Send_WeChat_Retries int    `orm:"column(send_wechat_retries);"`
	Send_WeChat_Error   string `orm:"column(send_wechat_error);"`
	Send_SMS            int    `orm:"column(send_sms);"`
	Send_SMS_List       string `orm:"column(send_sms_list);"`
	Send_SMS_Status     int    `orm:"column(send_sms_status);"`
	Send_SMS_Retries    int    `orm:"column(send_sms_retries);"`
	Send_SMS_Error      string `orm:"column(send_sms_error);"`
	Created             int64  `orm:"column(created);"`
}

func (*Alert_History) TableName

func (this *Alert_History) TableName() string

Jump to

Keyboard shortcuts

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