Project

General

Profile

Feature #30174

Angular UI for new alerts system

Added by Vladimir Vinogradenko over 2 years ago. Updated over 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Lola Yang
Category:
GUI (new)
Estimated time:
(Total: 0.00 h)
Severity:
Med High
Reason for Closing:
Reason for Blocked:
Needs QA:
Yes
Needs Doc:
Yes
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:

Description

Alert

alert.list returns a list of current alerts. Interesting fields are id, level, formatted, dismissed.

alert.dismiss and alert.restore take id as an argument.

There are also two helper methods that are used further:

alert.list_policies returns a list of alert sending policies. Current are ["IMMEDIATELY", "HOURLY", "DAILY", "NEVER"]

alert.list_sources returns a list of alert sending sources.

[{"name": "VMWareSnapshotFailed", "title": "VMWare snapshot failed"}, {"name": "VolumeVersion", "title": "ZFS version is out of date"}]

Alert Default Settings

alertdefaultsettings is a ConfigService. Schema is

{
    "settings": {
        "VMWareSnapshotFailed": "HOURLY",
        "VolumeVersion": "DAILY",
    },
}

So it is a mapping of alert source to it's default sending policy. Default policy is IMMEDIATELY.

Alert Services

Alert service is a way to send alerts. Example is E-Mail or Slack. List of alert services can be obtained by calling alertservice.list_types:

[{"name": "AWSSNS", "title": "AWS SNS"},
 {"name": "Mail", "title": "E-Mail"},
 {"name": "HtpChat", "title": "HipChat"}]

alertservice is regular CRUD service. Schema is:

{
    "name": "Admin E-Mail",
    "type": "Mail", // `name` field in alertservice.list_types
    "attributes": {"email": "admin@freenas.org"},
    "enabled": true,
    "settings": {"VMWareSnapshotFailed": "HOURLY"}, // As in alertdefaultsettings
}

Attributes schemas for different alert services are:

    {
        'AWSSNS': ['region', 'topic_arn', 'aws_access_key_id', 'aws_secret_access_key'],
        'HipChat': ['hfrom', 'cluster_name', 'base_url', 'room_id', 'auth_token'],
        'InfluxDB': ['host', 'username', 'password', 'database', 'series_name'],
        'Mattermost': ['cluster_name', 'url', 'username', 'password', 'team', 'channel'],
        'Mail': ['email'],
        'OpsGenie': ['cluster_name', 'api_key'],
        'PagerDuty': ['service_key', 'client_name'],
        'Slack': ['cluster_name', 'url', 'channel', 'username', 'icon_url', 'detailed'],
        'SNMPTrap': [],
        'VictorOps': ['api_key', 'routing_key'],
    }

There is also a test method with same arguments which sends test alert.


Subtasks

Feature #32436: Add email alert service with test alertDoneLola Yang
Bug #32871: Using WS call `alert.list` and `alert.dismiss` to show/dismiss system alertDoneLola Yang
Feature #32922: Enable to config settings in alert services formDoneLola Yang
Feature #32994: add missing system/alert ui DoneLola Yang

Related issues

Related to FreeNAS - Feature #26679: Add System -> Alerts for configuring alert frequencyDone

History

#1 Updated by Dru Lavigne over 2 years ago

  • Category set to GUI (new)
  • Target version set to 11.2-RC2

#2 Updated by Eric Loewenthal over 2 years ago

Question: For ease of localization, might it not be better for the Title property of alert_source to be handled entirely in the GUI? As in, GUI has a table that keeps track of the pretty titles in every language, with the key being the alert_source's name property.

#3 Updated by Vladimir Vinogradenko over 2 years ago

Question: For ease of localization, might it not be better for the Title property of alert_source to be handled entirely in the GUI?

No, because we also have alert texts (which may or may not be related to title) and they are in the very same file as alert title and may change from time to time regardless of UI state.

#4 Updated by Erin Clark over 2 years ago

  • Assignee changed from Erin Clark to Peter Southwell

#5 Updated by Dru Lavigne over 2 years ago

  • Related to Feature #26679: Add System -> Alerts for configuring alert frequency added

#6 Updated by Peter Southwell over 2 years ago

  • Assignee changed from Peter Southwell to Erin Clark

Think perhaps Damian might be the best call on this one.. But if he's too busy let me know and Ill revisit this.

#7 Updated by Lola Yang over 2 years ago

  • Assignee changed from Erin Clark to Lola Yang

#8 Updated by Lola Yang over 2 years ago

  • Status changed from Not Started to In Progress

New alert services UI: https://github.com/freenas/webui/pull/664

Erin could you create sub tickets for setting part (for each alert services ), and default alert settings (system -> alert setting)? Thanks.

#9 Updated by Dru Lavigne over 2 years ago

  • Status changed from In Progress to Done
  • Target version changed from 11.2-RC2 to Master - FreeNAS Nightlies
  • Needs Merging changed from Yes to No

#10 Updated by Lola Yang over 2 years ago

  • Status changed from Done to In Progress

This ticket not done yet.

#11 Updated by Lola Yang over 2 years ago

  • Target version changed from Master - FreeNAS Nightlies to 11.2-RC2

#12 Updated by Lola Yang over 2 years ago

  • Severity set to Med High

#13 Updated by Lola Yang over 2 years ago

  • Status changed from In Progress to Done

#14 Updated by Dru Lavigne over 2 years ago

  • Target version changed from 11.2-RC2 to Master - FreeNAS Nightlies

Also available in: Atom PDF