Documentation ¶
Index ¶
- func AddIssueDetectionFeedback(dbClient *sqlx.DB, issueID int64, userID int64, rating int, groups []int64) error
- func CloseIssueWithFeedback(dbClient *sqlx.DB, issueID int64, recommendation models.FrontRecommendation, ...) error
- func CloseIssueWithoutFeedback(dbClient *sqlx.DB, issueID int64, reason string, groups []int64, ...) error
- func CreateIssue(situationID int64, ts time.Time, templateInstanceID int64, ...) (int64, error)
- func ExtractSelectedFromTree(recommendation models.FrontRecommendation) (*models.FrontRootCause, []*models.FrontAction, error)
- func GetActionStats(situationID int64) (map[int64]ActionStats, error)
- func GetFactsHistory(issueID int64, groups []int64) ([]models.FrontFactHistory, bool, error)
- func GetRecommendationTree(issueID int64) (*models.FrontRecommendation, error)
- func GetRootCauseStats(situationID int64) (map[int64]RootCauseStats, error)
- func SaveIssueDraft(tx *sqlx.Tx, issueID int64, issueDraft models.FrontDraft, groupList []int64, ...) error
- type ActionStats
- type RootCauseStats
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 ¶
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 ¶
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 ¶
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