db

package
v0.0.0-...-bb0d4a4 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ArchiveEnable bool
)
View Source
var (
	CronJobList []*m.CornJobObj
)

Functions

func AddBusinessTable

func AddBusinessTable(param m.BusinessUpdateDto) error

func AddCustomMetric

func AddCustomMetric(param m.TransGatewayMetricDto) error

func AddDbMonitor

func AddDbMonitor(param m.DbMonitorUpdateDto) error

func AddKubernetesCluster

func AddKubernetesCluster(param m.KubernetesClusterParam) error

func AddKubernetesPod

func AddKubernetesPod(cluster *m.KubernetesClusterTable, podGuid, podName, namespace string) (err error, id int64, endpointGuid string)

func AddTpl

func AddTpl(grpId, endpointId int, operateUser string) (error, m.TplTable)

func AddUser

func AddUser(user m.UserTable) error

func AutoUpdateLogMonitor

func AutoUpdateLogMonitor(obj *m.UpdateLogMonitor) error

func ChartCreate

func ChartCreate(param []*models.ChartTable) error

func ChartDelete

func ChartDelete(ids []string) error

func ChartList

func ChartList(id, groupId int) (result []*models.ChartTable, err error)

func ChartUpdate

func ChartUpdate(param []*models.ChartTable) error

func CheckAggregate

func CheckAggregate(start int64, end int64, endpoint string, step, num int) int

func CheckDbMonitor

func CheckDbMonitor(param m.DbMonitorUpdateDto) error

func CheckEndpointActiveAlert

func CheckEndpointActiveAlert(endpoint string) bool

func CheckEndpointBusiness

func CheckEndpointBusiness(endpoint string) bool

func CheckEndpointInAgentManager

func CheckEndpointInAgentManager(guid string) bool

func CheckHostLogFileExist

func CheckHostLogFileExist(hostIp, logPath string) error

func CheckMetricIsServiceMetric

func CheckMetricIsServiceMetric(metric, serviceGroup string) bool

func CheckNodeExporterProcessConfig

func CheckNodeExporterProcessConfig(endpointId int, processList []m.ProcessMonitorTable) (err error, illegal bool, msg string)

func CheckRegExpMatch

func CheckRegExpMatch(param models.CheckRegExpParam) (message string)

func CheckRegExpMatchPCRE

func CheckRegExpMatchPCRE(param models.CheckRegExpParam) (message string)

func CheckRoleIllegal

func CheckRoleIllegal(roleList []string, roleMap map[string]string) (err error)

func CheckRoleList

func CheckRoleList(param string) string

func CloseAlarm

func CloseAlarm(param m.AlarmCloseParam) (err error)

func CloseOpenAlarm

func CloseOpenAlarm(param m.AlarmCloseParam) error

func CompareSubData

func CompareSubData(data [][]float64, sub float64) [][]float64

func CreateAlarmStrategy

func CreateAlarmStrategy(param *models.GroupStrategyObj) error

func CreateDbMetric

func CreateDbMetric(param *models.DbMetricMonitorObj) error

func CreateEndpointGroup

func CreateEndpointGroup(param *models.EndpointGroupTable) error

func CreateLogKeyword

func CreateLogKeyword(param *models.LogKeywordConfigTable) (err error)

func CreateLogKeywordMonitor

func CreateLogKeywordMonitor(param *models.LogKeywordMonitorCreateObj) (err error)

func CreateLogMetricConfig

func CreateLogMetricConfig(param *models.LogMetricConfigObj) error

func CreateLogMetricJson

func CreateLogMetricJson(param *models.LogMetricJsonObj) error

func CreateLogMetricMonitor

func CreateLogMetricMonitor(param *models.LogMetricMonitorCreateDto) error

func CreateServiceGroup

func CreateServiceGroup(param *models.ServiceGroupTable)

func DeleteAlarmStrategy

func DeleteAlarmStrategy(strategyGuid string) (endpointGroup string, err error)

func DeleteCustomDashboard

func DeleteCustomDashboard(query *m.CustomDashboardTable) error

func DeleteDbMetric

func DeleteDbMetric(dbMetricGuid string) error

func DeleteDbMonitor

func DeleteDbMonitor(id int) error

func DeleteEndpoint

func DeleteEndpoint(guid string) error

func DeleteEndpointFromGroup

func DeleteEndpointFromGroup(endpointId int) (tplList []int, err error)

func DeleteEndpointGroup

func DeleteEndpointGroup(endpointGroupGuid string) (err error)

func DeleteKubernetesCluster

func DeleteKubernetesCluster(id int, clusterName string) error

func DeleteKubernetesPod

func DeleteKubernetesPod(podGuid, endpointGuid string) (err error, id int64)

func DeleteLogKeyword

func DeleteLogKeyword(logKeywordConfigGuid string) (err error)

func DeleteLogKeywordMonitor

func DeleteLogKeywordMonitor(logKeywordMonitorGuid string) (err error)

func DeleteLogMetricConfig

func DeleteLogMetricConfig(logMetricConfigGuid string) (logMetricMonitorGuid string, err error)

func DeleteLogMetricJson

func DeleteLogMetricJson(logMetricJsonGuid string) (logMetricMonitorGuid string, err error)

func DeleteLogMetricMonitor

func DeleteLogMetricMonitor(logMetricMonitorGuid string) (err error)

func DeletePromMetric

func DeletePromMetric(metric string) (tplIds []int, err error)

func DeleteRecursivePanel

func DeleteRecursivePanel(guid string) (err error)

func DeleteServiceConfig

func DeleteServiceConfig(serviceGroup string)

func DeleteServiceGroup

func DeleteServiceGroup(serviceGroupGuid string)

func DeleteServiceWithChildConfig

func DeleteServiceWithChildConfig(serviceGroup string)

func DeleteStrategyByGrp

func DeleteStrategyByGrp(grpId int, tplId int) error

func DeleteTpl

func DeleteTpl(tplId int) error

func DoCheckProgress

func DoCheckProgress() error

func GetAgentManager

func GetAgentManager(guid string) (result []*m.AgentManagerTable, err error)

func GetAlarmEvent

func GetAlarmEvent(alarmType, inputGuid string, id int, alarmStatus string) (result m.AlarmEntityObj, err error)

func GetAlarmEventEntityData

func GetAlarmEventEntityData(alarmId int) (result *m.AlarmEventEntityObj, err error)

func GetAlarmObj

func GetAlarmObj(query *models.AlarmTable) (result models.AlarmTable, err error)

func GetAlarmRealEndpoint

func GetAlarmRealEndpoint(endpointId, strategyId int, endpointType, expr string) (isReal bool, endpoint models.EndpointTable)

func GetAlarmStrategy

func GetAlarmStrategy(strategyGuid string) (result models.AlarmStrategyMetricObj, err error)

func GetAlarms

func GetAlarms(query m.AlarmTable, limit int, extLogMonitor, extOpenAlarm bool) (error, m.AlarmProblemList)

func GetAlertWindowList

func GetAlertWindowList(endpoint string) (result []*m.AlertWindowObj, err error)

func GetAliveCheckQueue

func GetAliveCheckQueue(param string) (err error, result []*m.AliveCheckQueueTable)

func GetArchiveData

func GetArchiveData(query *m.QueryMonitorData, agg string) (err error, step int, result []*m.SerialModel)

func GetAutoDisplay

func GetAutoDisplay(businessMonitorMap map[int][]string, tagKey string, charts []*m.ChartTable) (result []*m.ChartModel, fetch bool)

func GetBusinessList

func GetBusinessList(endpointId int, ownerEndpoint string) (err error, pathList []*m.BusinessMonitorTable)

func GetBusinessListNew

func GetBusinessListNew(endpointId int, ownerEndpoint string) (err error, result m.BusinessUpdateDto)

func GetBusinessPanelChart

func GetBusinessPanelChart() (charts []*m.ChartTable, panels []*m.PanelTable)

func GetBusinessPromMetric

func GetBusinessPromMetric(keys []string) (err error, result []*m.PromMetricTable)

func GetBusinessRealEndpoint

func GetBusinessRealEndpoint(endpoint string) string

func GetButton

func GetButton(bGroup int) (error, []*m.ButtonModel)

func GetChartTitle

func GetChartTitle(metric string, id int) string

func GetCharts

func GetCharts(cGroup int, chartId int, panelId int) (error, []*m.ChartTable)

func GetCheckProgressContent

func GetCheckProgressContent(param string) m.AlarmEntityObj

func GetClusterAddress

func GetClusterAddress(cluster string) string

func GetCoreEventList

func GetCoreEventList(userToken string) (result m.CoreProcessResult, err error)

func GetCustomDashboard

func GetCustomDashboard(id int) (result *m.CustomDashboardObj, err error)

func GetCustomDashboardAlarms

func GetCustomDashboardAlarms(id int) (err error, result m.AlarmProblemQueryResult)

func GetCustomDashboardRole

func GetCustomDashboardRole(id int) (err error, result []*m.CustomDashboardRoleObj)

func GetDashboard

func GetDashboard(dType string) (error, m.DashboardTable)

func GetDashboardPanelList

func GetDashboardPanelList(endpointType, searchMetric string) m.PanelResult

func GetDbMetric

func GetDbMetric(dbMetricGuid string) (result models.DbMetricMonitorObj, err error)

func GetDbMetricByEndpoint

func GetDbMetricByEndpoint(endpointGuid string) (result []*models.DbMetricMonitorObj, err error)

func GetDbMetricByServiceGroup

func GetDbMetricByServiceGroup(serviceGroup string) (result []*models.DbMetricMonitorObj, err error)

func GetDbMonitorByPanel

func GetDbMonitorByPanel(guid string) (result []*m.DbMonitorTable, err error)

func GetDbMonitorChart

func GetDbMonitorChart() (result []*m.ChartTable, err error)

func GetDbPromMetric

func GetDbPromMetric(endpoint, metric, legend string) (error, string)

func GetDeleteServiceGroupAffectList

func GetDeleteServiceGroupAffectList(serviceGroup string) (result []string, err error)

func GetEndpoint

func GetEndpoint(query *m.EndpointTable) error

func GetEndpointByType

func GetEndpointByType(endpointType, serviceGroup string) (result []*models.EndpointNewTable, err error)

func GetEndpointMetric

func GetEndpointMetric(endpointGuid, monitorType string) (err error, result []*m.OptionModel)

func GetEndpointMetricByEndpointType

func GetEndpointMetricByEndpointType(endpointType string) (err error, result []*m.OptionModel)

func GetEndpointNew

func GetEndpointNew(param *models.EndpointNewTable) (result models.EndpointNewTable, err error)

func GetEndpointTelnet

func GetEndpointTelnet(guid string) (result []*m.EndpointTelnetTable, err error)

func GetEndpointTypeList

func GetEndpointTypeList() (result []string, err error)

func GetEndpointsByGrp

func GetEndpointsByGrp(grpId int) (error, []*m.EndpointTable)

func GetEndpointsByIp

func GetEndpointsByIp(ipList []string, exportType string) (err error, endpoints []m.EndpointTable)

func GetGroupEndpointNotify

func GetGroupEndpointNotify(endpointGroupGuid string) (result []*models.NotifyObj, err error)

func GetGroupEndpointRel

func GetGroupEndpointRel(endpointGroupGuid string) (result []*models.EndpointGroupRelTable, err error)

func GetGrpRole

func GetGrpRole(grpId int) (err error, result []*m.OptionModel)

func GetGrpStrategy

func GetGrpStrategy(idList []string) (err error, result []*m.GrpStrategyExportObj)

func GetLogKeywordByEndpoint

func GetLogKeywordByEndpoint(endpointGuid string, onlySource bool) (result []*models.LogKeywordServiceGroupObj, err error)

func GetLogKeywordByServiceGroup

func GetLogKeywordByServiceGroup(serviceGroupGuid string) (result []*models.LogKeywordServiceGroupObj, err error)

func GetLogMetricByEndpoint

func GetLogMetricByEndpoint(endpoint string, onlySource bool) (result []*models.LogMetricQueryObj, err error)

func GetLogMetricByServiceGroup

func GetLogMetricByServiceGroup(serviceGroup string) (result models.LogMetricQueryObj, err error)

func GetLogMetricConfig

func GetLogMetricConfig(logMetricConfigGuid string) (result models.LogMetricConfigObj, err error)

func GetLogMetricJson

func GetLogMetricJson(logMetricJsonGuid string) (result models.LogMetricJsonObj, err error)

func GetLogMetricMonitor

func GetLogMetricMonitor(logMetricMonitorGuid string) (result models.LogMetricMonitorObj, err error)

func GetLogMonitorByEndpoint

func GetLogMonitorByEndpoint(endpointId int) (err error, result []*m.LogMonitorTable)

func GetLogMonitorByEndpointNew

func GetLogMonitorByEndpointNew(endpointId int) (err error, result []*m.LogMonitorTable)

func GetLogMonitorTable

func GetLogMonitorTable(id, strategyId, tplId int, path string) (err error, result []*m.LogMonitorTable)

func GetMailByEndpointGroup

func GetMailByEndpointGroup(guid string) []string

func GetMailByStrategy

func GetMailByStrategy(strategyId int) []string

func GetMainCustomDashboard

func GetMainCustomDashboard(roleList []string) (err error, result []*m.CustomDashboardTable)

func GetOpenAlarm

func GetOpenAlarm(param m.CustomAlarmQueryParam) []*m.AlarmProblemQuery

func GetOrgCallback

func GetOrgCallback(guid string) (result m.PanelRecursiveTable, err error)

func GetOrgConnect

func GetOrgConnect(guid string) (result m.UpdateOrgConnectParam, err error)

func GetOrgEndpoint

func GetOrgEndpoint(guid string) (result []*m.OptionModel, err error)

func GetOrgRole

func GetOrgRole(guid string) (result []*m.OptionModel, err error)

func GetOrganizationList

func GetOrganizationList(nameText, endpointText string) (result []*m.OrganizationPanel, err error)

func GetPanelRecursiveEndpoints

func GetPanelRecursiveEndpoints(guid, endpointType string) (result []*m.EndpointTable, err error)

func GetPanels

func GetPanels(pGroup int, endpoint string) (error, []*m.PanelTable)

func GetParentTpl

func GetParentTpl(tplId int) []int

func GetPingExporterSource

func GetPingExporterSource() []*m.PingExportSourceObj

func GetProcessDisplayMap

func GetProcessDisplayMap(endpoint string) map[string]string

func GetProcessList

func GetProcessList(endpointId int) (err error, processList []*m.ProcessMonitorTable)

func GetPromMetric

func GetPromMetric(endpoint []string, metric string) (error, string)

func GetPromMetricTable

func GetPromMetricTable(metricType string) (err error, result []*m.PromMetricUpdateParam)

func GetPromQLByMetric

func GetPromQLByMetric(metric, monitorType, serviceGroup string) (result string, err error)

func GetRecursiveEndpointByType

func GetRecursiveEndpointByType(guid, endpointType string) (result []*m.EndpointTable, err error)

func GetRecursiveEndpointByTypeNew

func GetRecursiveEndpointByTypeNew(guid, endpointType string) (result []*m.EndpointNewTable, err error)

func GetRecursivePanel

func GetRecursivePanel(guid string) (err error, result m.RecursivePanelObj)

func GetRoleMap

func GetRoleMap() (roleMap map[string]string)

func GetSdFileListByStep

func GetSdFileListByStep(step int, cluster string) (result m.ServiceDiscoverFileList, err error)

func GetSearch

func GetSearch(id int) (error, m.SearchModel)

func GetServiceGroupByLogMetricMonitor

func GetServiceGroupByLogMetricMonitor(logMetricMonitorGuid string) string

func GetServiceGroupEndpointList

func GetServiceGroupEndpointList(searchType string) (result []*models.ServiceGroupEndpointListObj, err error)

func GetServiceGroupEndpointRel

func GetServiceGroupEndpointRel(serviceGroup, sourceType, targetType string) (result []*models.LogMetricEndpointRelTable, err error)

func GetServiceGroupPromMetric

func GetServiceGroupPromMetric(serviceGroup, workspace, monitorType string) (err error, result []*m.OptionModel)

func GetSimpleEndpointGroup

func GetSimpleEndpointGroup(guid string) (result *models.EndpointGroupTable, err error)

func GetSingleGrp

func GetSingleGrp(id int, name string) (error, m.GrpTable)

func GetStrategyList

func GetStrategyList(id, tplId int) (result []*models.StrategyTable, err error)

func GetStrategyTable

func GetStrategyTable(id int) (error, m.StrategyTable)

func GetSysAlertMailConfig

func GetSysAlertMailConfig() (result models.SysAlertMailParameter, err error)

func GetSysMetricTemplateConfig

func GetSysMetricTemplateConfig(workspace string) (result []*models.SysMetricTemplateParameter, err error)

func GetTags

func GetTags(endpoint string, key string, metric string) (error, []*m.OptionModel)

func GetTemplateObject

func GetTemplateObject(id, grpId, endpointId int) (result *models.TplTable, err error)

func GetTpl

func GetTpl(tplId, grpId, endpointId int) (error, m.TplTable)

func GetTplStrategy

func GetTplStrategy(query *m.TplQuery, ignoreLogMonitor bool) error

func GetUser

func GetUser(username string) (err error, user m.UserQuery)

func GetUserRole

func GetUserRole(user string) (err error, result []*m.RoleTable)

func ImportAlarmStrategy

func ImportAlarmStrategy(queryType, inputGuid string, param []*models.EndpointStrategyObj) (err error)

func ImportLogKeyword

func ImportLogKeyword(param *models.LogKeywordServiceGroupObj) (err error)

func ImportLogMetric

func ImportLogMetric(param *models.LogMetricQueryObj) (err error)

func ImportLogMetricExcel

func ImportLogMetricExcel(logMonitorGuid string, param []*models.LogMetricConfigObj) (err error)

func InitDatabase

func InitDatabase() error

func InitPrometheusConfig

func InitPrometheusConfig()

func InitPrometheusConfigFile

func InitPrometheusConfigFile()

func InitServiceGroup

func InitServiceGroup()

func InitSysParameter

func InitSysParameter()

func ListAlarmEndpoints

func ListAlarmEndpoints(query *m.AlarmEndpointQuery) error

func ListCustomDashboard

func ListCustomDashboard(user string, coreToken m.CoreJwtToken) (err error, result []*m.CustomDashboardQuery)

func ListDbMonitor

func ListDbMonitor(endpointId int) (result []*m.DbMonitorListObj, err error)

func ListEndpoint

func ListEndpoint(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.EndpointNewTable, err error)

func ListEndpointGroup

func ListEndpointGroup(param *models.QueryRequestParam) (pageInfo models.PageInfo, rowData []*models.EndpointGroupTable, err error)

func ListEndpointGroupOptions

func ListEndpointGroupOptions(searchText string) (result []*models.OptionModel, err error)

func ListEndpointOptions

func ListEndpointOptions(searchText string) (result []*models.OptionModel, err error)

func ListGrp

func ListGrp(query *m.GrpQuery) error

func ListKubernetesCluster

func ListKubernetesCluster(clusterName string) (result []*m.KubernetesClusterTable, err error)

func ListLogKeyword

func ListLogKeyword(logKeywordMonitor string) (result []*models.LogKeywordConfigTable)

func ListLogKeywordEndpointRel

func ListLogKeywordEndpointRel(logKeywordMonitor string) (result []*models.LogKeywordEndpointRelTable)

func ListLogMetricConfig

func ListLogMetricConfig(logMetricJson, logMetricMonitor string) (result []*models.LogMetricConfigObj)

func ListLogMetricEndpointRel

func ListLogMetricEndpointRel(logMetricMonitor string) (result []*models.LogMetricEndpointRelTable)

func ListLogMetricEndpointRelWithServiceGroup

func ListLogMetricEndpointRelWithServiceGroup(serviceGroup, logMetricMonitor string) (result []*models.LogMetricEndpointRelTable)

func ListLogMetricJson

func ListLogMetricJson(logMetricMonitor string) (result []*models.LogMetricJsonObj)

func ListLogMetricStringMap

func ListLogMetricStringMap(logMetricConfig string) (result []*models.LogMetricStringMapTable)

func ListLogMonitor

func ListLogMonitor(query *m.TplQuery) error

func ListLogMonitorNew

func ListLogMonitorNew(query *m.TplQuery) error

func ListMainPageRole

func ListMainPageRole(user string, roleList []string) (err error, result []*m.MainPageRoleQuery)

func ListRecursiveEndpointType

func ListRecursiveEndpointType(guid string) (result []string, err error)

func ListRole

func ListRole(search string, page, size int) (err error, data m.TableData)

func ListServiceGroup

func ListServiceGroup() (result []*models.ServiceGroupTable, err error)

func ListServiceGroupEndpoint

func ListServiceGroupEndpoint(serviceGroup, monitorType string) (result []*models.ServiceGroupEndpointListObj, err error)

func ListServiceGroupOptions

func ListServiceGroupOptions(searchText string) (result []*models.OptionModel, err error)

func ListTpl

func ListTpl() []*m.TplTable

func ListUser

func ListUser(search string, role, page, size int) (err error, data m.TableData)

func ManualNotifyAlarm

func ManualNotifyAlarm(alarmId int, operator string) (err error)

func MatchServicePanel

func MatchServicePanel(endpointGuid string) (result models.PanelModel, err error)

func MetricCreate

func MetricCreate(param []*models.MetricTable) error

func MetricDelete

func MetricDelete(id string) error

func MetricImport

func MetricImport(serviceGroup string, inputMetrics []*models.MetricTable) (err error)

func MetricList

func MetricList(id string, endpointType, serviceGroup string) (result []*models.PromMetricTable, err error)

func MetricListNew

func MetricListNew(guid, monitorType, serviceGroup, onlyService string) (result []*models.MetricTable, err error)

func MetricUpdate

func MetricUpdate(param []*models.MetricTable) (err error)

func NotifyAlarm

func NotifyAlarm(alarmObj *m.AlarmHandleObj)

func NotifyCoreEvent

func NotifyCoreEvent(endpoint string, strategyId int, alarmId int, customAlarmId int) error

func NotifyServiceGroup

func NotifyServiceGroup(serviceGroup string, alarmObj *models.AlarmHandleObj)

func NotifyStrategyAlarm

func NotifyStrategyAlarm(alarmObj *models.AlarmHandleObj)

func NotifyTreevent

func NotifyTreevent(param m.EventTreeventNotifyDto)

func PanelCreate

func PanelCreate(endpointType string, param []*models.PanelTable) error

func PanelDelete

func PanelDelete(ids []string) error

func PanelList

func PanelList(id int, endpointType, serviceGroup string) (result []*models.PanelTable, err error)

func PanelUpdate

func PanelUpdate(param []*models.PanelTable) error

func PluginBusinessAction

func PluginBusinessAction(input *m.PluginBusinessValueRequestObj) (result *m.PluginBusinessOutputObj, endpointId int, err error)

func PluginCloseAlarmAction

func PluginCloseAlarmAction(input *models.PluginCloseAlarmRequestObj) (result *models.PluginCloseAlarmOutputObj, err error)

func QueryAlarmBySql

func QueryAlarmBySql(sql string, params []interface{}, customQueryParam m.CustomAlarmQueryParam, page *m.PageInfo) (err error, result m.AlarmProblemQueryResult)

func QueryAlarmStrategyByEndpoint

func QueryAlarmStrategyByEndpoint(endpoint string) (result []*models.EndpointStrategyObj, err error)

func QueryAlarmStrategyByGroup

func QueryAlarmStrategyByGroup(endpointGroup string) (result []*models.EndpointStrategyObj, err error)

func QueryAlarmStrategyByServiceGroup

func QueryAlarmStrategyByServiceGroup(serviceGroup string) (result []*models.EndpointStrategyObj, err error)

func QueryClusterConfig

func QueryClusterConfig(id string) (result []*m.ClusterTable, err error)

func QueryExporterMetric

func QueryExporterMetric(param models.QueryPrometheusMetricParam) (err error, result []string)

func QueryHistoryAlarm

func QueryHistoryAlarm(param m.QueryHistoryAlarmParam) (err error, result m.AlarmProblemQueryResult)

func RegisterEndpointMetric

func RegisterEndpointMetric(endpointId int, endpointMetrics []string) error

func RemovePrometheusRuleFile

func RemovePrometheusRuleFile(endpointGroup string, fromPeer bool)

func ReplacePromQlKeyword

func ReplacePromQlKeyword(promQl, metric string, host *m.EndpointNewTable) string

func SaveCustomDashboard

func SaveCustomDashboard(query *m.CustomDashboardObj) error

func SaveCustomeDashboardRole

func SaveCustomeDashboardRole(param m.CustomDashboardRoleDto) error

func SaveOpenAlarm

func SaveOpenAlarm(param m.OpenAlarmRequest) error

func SearchGrp

func SearchGrp(search string) (error, []*m.OptionModel)

func SearchHost

func SearchHost(endpoint string) (error, []*m.OptionModel)

func SearchPanelByName

func SearchPanelByName(name, endpoint string) []m.OptionModel

func SearchRecursivePanel

func SearchRecursivePanel(search string) []*m.OptionModel

func SearchUserRole

func SearchUserRole(search string, searchType string) (err error, options []*m.OptionModel)

func SendConfigToDbManager

func SendConfigToDbManager() error

func SendLogConfig

func SendLogConfig(endpointId, grpId, tplId int) error

func SetGrpStrategy

func SetGrpStrategy(paramObj []*m.GrpStrategyExportObj) error

func SnmpEndpointAdd

func SnmpEndpointAdd(snmpExporter, endpointGuid, target string) error

func SnmpEndpointDelete

func SnmpEndpointDelete(endpointGuid string) error

func SnmpExporterCreate

func SnmpExporterCreate(input models.SnmpExporterTable) error

func SnmpExporterDelete

func SnmpExporterDelete(id string) error

func SnmpExporterList

func SnmpExporterList() (result []*models.SnmpExporterTable, err error)

func SnmpExporterUpdate

func SnmpExporterUpdate(input models.SnmpExporterTable) error

func StartCallCronJob

func StartCallCronJob()

func StartCheckCron

func StartCheckCron()

func StartCleanAlarmTable

func StartCleanAlarmTable()

func StartCronJob

func StartCronJob()

func StartCronSyncKubernetesPod

func StartCronSyncKubernetesPod(interval int)

func StartInitAlarmUniqueTags

func StartInitAlarmUniqueTags()

func StartLogKeywordMonitorCronJob

func StartLogKeywordMonitorCronJob()

func StartNotifyPingExport

func StartNotifyPingExport()

func StartSyncCoreJob

func StartSyncCoreJob(interval int)

func SyncCoreRole

func SyncCoreRole()

func SyncCoreRoleList

func SyncCoreRoleList()

func SyncCoreSystemVariable

func SyncCoreSystemVariable()

func SyncDbMetric

func SyncDbMetric() error

func SyncKubernetesConfig

func SyncKubernetesConfig() error

func SyncLogKeywordExporterConfig

func SyncLogKeywordExporterConfig(endpoints []string) error

func SyncLogMetricExporterConfig

func SyncLogMetricExporterConfig(endpoints []string) error

func SyncNodeExporterProcessConfig

func SyncNodeExporterProcessConfig(hostIp string, newEndpoints []*m.EndpointNewTable, updateFlag bool) (err error)

func SyncPodToEndpoint

func SyncPodToEndpoint() bool

func SyncPrometheusRuleFile

func SyncPrometheusRuleFile(endpointGroup string, fromPeer bool) error

func SyncRemoteRuleConfigFile

func SyncRemoteRuleConfigFile(cluster string, param m.RFClusterRequestObj) error

func SyncRemoteSdConfigFile

func SyncRemoteSdConfigFile(cluster string, params []*m.SdConfigSyncObj) error

func SyncRuleConfigFile

func SyncRuleConfigFile(tplId int, moveOutEndpoints []string, fromPeer bool) error

更新告警规则文件rule file

func SyncSdEndpointNew

func SyncSdEndpointNew(steps []int, cluster string, fromPeer bool) error

Service discover functions

func SyncSnmpPrometheusConfig

func SyncSnmpPrometheusConfig() error

func Transaction

func Transaction(actions []*Action) error

func UpdateAgentManager

func UpdateAgentManager(param *models.AgentManagerTable) error

func UpdateAgentManagerTable

func UpdateAgentManagerTable(endpoint m.EndpointTable, user, password, configFile, binPath string, isAdd bool) error

func UpdateAlarmCustomMessage

func UpdateAlarmCustomMessage(param m.UpdateAlarmCustomMessageDto) error

func UpdateAlarmStrategy

func UpdateAlarmStrategy(param *models.GroupStrategyObj) error

func UpdateAlarms

func UpdateAlarms(alarms []*m.AlarmHandleObj) []*m.AlarmHandleObj

func UpdateAlertWindowList

func UpdateAlertWindowList(endpoint, updateUser string, data []*m.AlertWindowObj) error

func UpdateAliveCheckQueue

func UpdateAliveCheckQueue(monitorIp string) error

func UpdateAppendBusiness

func UpdateAppendBusiness(param m.BusinessUpdateDto) error

func UpdateBusiness

func UpdateBusiness(param m.BusinessUpdateDto) error

func UpdateBusinessNew

func UpdateBusinessNew(param m.BusinessUpdateDto) error

func UpdateChartTitle

func UpdateChartTitle(param m.UpdateChartTitleParam) error

func UpdateDbMetric

func UpdateDbMetric(param *models.DbMetricMonitorObj) error

func UpdateDbMetricConfigByServiceGroup

func UpdateDbMetricConfigByServiceGroup(serviceGroup string, endpointTypeMap map[string][]string) (err error)

func UpdateDbMonitor

func UpdateDbMonitor(param m.DbMonitorUpdateDto) error

func UpdateDbMonitorSysName

func UpdateDbMonitorSysName(param m.DbMonitorSysNameDto) error

func UpdateEndpoint

func UpdateEndpoint(endpoint *m.EndpointTable, extendParam string) (stepList []int, err error)

func UpdateEndpointAlarmFlag

func UpdateEndpointAlarmFlag(isStop bool, exportType, instance, ip, port, pod, k8sCluster string) error

func UpdateEndpointData

func UpdateEndpointData(endpoint *models.EndpointNewTable) (err error)

func UpdateEndpointGroup

func UpdateEndpointGroup(param *models.EndpointGroupTable) error

func UpdateEndpointGrp

func UpdateEndpointGrp(param m.EndpointGrpParam) (err error, affectGroupIds []int)

func UpdateEndpointHttp

func UpdateEndpointHttp(param []*m.EndpointHttpTable) error

func UpdateEndpointTelnet

func UpdateEndpointTelnet(param m.UpdateEndpointTelnetParam) error

func UpdateGroupEndpoint

func UpdateGroupEndpoint(param *models.UpdateGroupEndpointParam, appendFlag bool) error

func UpdateGroupEndpointNotify

func UpdateGroupEndpointNotify(endpointGroupGuid string, param []*models.NotifyObj) error

func UpdateGrp

func UpdateGrp(obj *m.UpdateGrp) error

func UpdateGrpEndpoint

func UpdateGrpEndpoint(param m.GrpEndpointParamNew) (error, bool)

func UpdateGrpRole

func UpdateGrpRole(param m.RoleGrpDto) error

func UpdateKubernetesCluster

func UpdateKubernetesCluster(param m.KubernetesClusterParam) error

func UpdateKubernetesPodGroup

func UpdateKubernetesPodGroup(endpointId int64, group, operation string) (err error, tplId int)

func UpdateLogKeyword

func UpdateLogKeyword(param *models.LogKeywordConfigTable) (err error)

func UpdateLogKeywordConfigAction

func UpdateLogKeywordConfigAction(logKeyword *models.LogKeywordMonitorTable, endpointTypeMap map[string][]string, hostEndpoint []string, hostEndpointIpMap map[string]string)

func UpdateLogKeywordConfigByServiceGroup

func UpdateLogKeywordConfigByServiceGroup(serviceGroup string, endpointTypeMap map[string][]string) (err error)

func UpdateLogKeywordMonitor

func UpdateLogKeywordMonitor(param *models.LogKeywordMonitorObj) (err error)

func UpdateLogMetricConfig

func UpdateLogMetricConfig(param *models.LogMetricConfigObj) error

func UpdateLogMetricConfigAction

func UpdateLogMetricConfigAction(logMonitor *models.LogMetricMonitorTable, endpointTypeMap map[string][]string, hostEndpoint []string, hostEndpointIpMap map[string]string)

func UpdateLogMetricConfigByServiceGroup

func UpdateLogMetricConfigByServiceGroup(serviceGroup string, endpointTypeMap map[string][]string) (err error)

func UpdateLogMetricJson

func UpdateLogMetricJson(param *models.LogMetricJsonObj) error

func UpdateLogMetricMonitor

func UpdateLogMetricMonitor(param *models.LogMetricMonitorObj) error

func UpdateLogMonitor

func UpdateLogMonitor(obj *m.UpdateLogMonitor) error

func UpdateMainPageRole

func UpdateMainPageRole(param []m.MainPageRoleQuery) error

func UpdateNodeExporterProcessConfig

func UpdateNodeExporterProcessConfig(endpointId int) error

func UpdateOrgCallback

func UpdateOrgCallback(param m.UpdateOrgPanelEventParam) (err error)

func UpdateOrgConnect

func UpdateOrgConnect(param m.UpdateOrgConnectParam) error

func UpdateOrgEndpoint

func UpdateOrgEndpoint(param m.UpdateOrgPanelEndpointParam) error

func UpdateOrgRole

func UpdateOrgRole(param m.UpdateOrgPanelRoleParam) (err error)

func UpdateOrganization

func UpdateOrganization(operation string, param m.UpdateOrgPanelParam) (err error)

func UpdatePanelChartMetric

func UpdatePanelChartMetric(data []m.PromMetricUpdateParam) error

func UpdateProcess

func UpdateProcess(param m.ProcessUpdateDtoNew, operation string) error

func UpdatePromMetric

func UpdatePromMetric(data []*m.PromMetricTable) error

func UpdateRecursiveEndpoint

func UpdateRecursiveEndpoint(guid string, endpoint []string) error

func UpdateRecursivePanel

func UpdateRecursivePanel(param m.PanelRecursiveTable) error

func UpdateRole

func UpdateRole(param m.UpdateRoleDto) error

func UpdateRoleNew

func UpdateRoleNew(param m.UpdateRoleDto) error

func UpdateRoleUser

func UpdateRoleUser(param m.UpdateRoleUserDto) error

func UpdateServiceConfigWithEndpoint

func UpdateServiceConfigWithEndpoint(serviceGroup string)

func UpdateServiceConfigWithParent

func UpdateServiceConfigWithParent(serviceGroup string)

func UpdateServiceGroup

func UpdateServiceGroup(param *models.ServiceGroupTable)

func UpdateServiceMetricTitle

func UpdateServiceMetricTitle(param m.UpdateChartTitleParam) error

func UpdateStrategy

func UpdateStrategy(obj *models.UpdateStrategy) error

func UpdateSysAlertMailConfig

func UpdateSysAlertMailConfig(param *models.SysAlertMailParameter)

func UpdateTpl

func UpdateTpl(tplId int, operateUser string) error

func UpdateTplAction

func UpdateTplAction(tplId int, user, role []int, extraMail, extraPhone []string) error

func UpdateUser

func UpdateUser(user m.UserTable) error

Types

type Action

type Action struct {
	Sql   string
	Param []interface{}
}

func Classify

func Classify(obj interface{}, operation string, table string, force bool) Action

Jump to

Keyboard shortcuts

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