explainer

package
v4.1.12 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIssueDetectionFeedback

func AddIssueDetectionFeedback(dbClient *sqlx.DB, issueID int64, userID int64, rating int, groups []int64) error

AddIssueDetectionFeedback add a new feedback in the detection_feedback table (or update it if the user already posted a feedback) Moreover, it updates the issue average rating for convenience

func CloseIssueWithFeedback

func CloseIssueWithFeedback(dbClient *sqlx.DB, issueID int64, recommendation models.FrontRecommendation, groups []int64, user groups.UserWithGroups) error

CloseIssueWithFeedback generate and persist an issue feedback for the rootcause/action stats and ML models

func CloseIssueWithoutFeedback

func CloseIssueWithoutFeedback(dbClient *sqlx.DB, issueID int64, reason string, groups []int64, user groups.UserWithGroups) error

CloseIssueWithoutFeedback close an issue without standard feedback on rootcause / action

func CreateIssue

func CreateIssue(situationID int64, ts time.Time, templateInstanceID int64, rule models.RuleData, name string, level models.IssueLevel, timeout time.Duration, key string) (int64, error)

CreateIssue function used to create an issue

func ExtractSelectedFromTree

func ExtractSelectedFromTree(recommendation models.FrontRecommendation) (*models.FrontRootCause, []*models.FrontAction, error)

ExtractSelectedFromTree extracts and returns selected rootcause and actions from a recommendation

func GetActionStats

func GetActionStats(situationID int64) (map[int64]ActionStats, error)

GetActionStats returns all actions usage statistics on a single situation

func GetFactsHistory

func GetFactsHistory(issueID int64, groups []int64) ([]models.FrontFactHistory, bool, error)

GetFactsHistory get the history of facts for an issue

func GetRecommendationTree

func GetRecommendationTree(issueID int64) (*models.FrontRecommendation, error)

GetRecommendationTree build a recommendation tree based on issue resolution stats table

func GetRootCauseStats

func GetRootCauseStats(situationID int64) (map[int64]RootCauseStats, error)

GetRootCauseStats returns all rootcauses usage statistics on a single situation

func SaveIssueDraft

func SaveIssueDraft(tx *sqlx.Tx, issueID int64, issueDraft models.FrontDraft, groupList []int64, user groups.UserWithGroups) error

SaveIssueDraft generate and persist an issue draft

Types

type ActionStats

type ActionStats struct {
	RootCauseID int64
	ActionID    int64
	Occurrences int64
	IssueCount  int64
}

ActionStats is a single action usage stats

func NewActionStats

func NewActionStats(rootCauseID int64, actionID int64, occurrences int64, issueCount int64) ActionStats

NewActionStats returns a new ActionStats

func (*ActionStats) GetRelativeFrequency

func (as *ActionStats) GetRelativeFrequency() float64

GetRelativeFrequency calculate the relative usage frequency of an action

type RootCauseStats

type RootCauseStats struct {
	RootCauseID int64
	Occurrences int64
	IssueCount  int64
}

RootCauseStats is a single rootcause usage stats

func NewRootCauseStats

func NewRootCauseStats(rootCauseID int64, occurrences int64, issueCount int64) RootCauseStats

NewRootCauseStats returns a new RootCauseStats

func (*RootCauseStats) GetRelativeFrequency

func (as *RootCauseStats) GetRelativeFrequency() float64

GetRelativeFrequency calculate the relative usage frequency of a rootcause

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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