Skip to content

Conversation

@simonjbeaumont
Copy link
Contributor

Before this patch, emails would come in unformatted like the following:

From: noreply@dt04
To: simon.beaumont@citrix.com
Date: Tue, 1 Mar 2016 17:34:00 +0000
Subject: [dt04] XenServer Message: VM 88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
ALARM

Field           Value
-----           -----
Name:           ALARM
Priority:       3
Class:          VM
Object UUID:    88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
Timestamp:      20160301T17:33:53Z
Message UUID:   4116332a-995e-57d1-a318-c9c06a08c918
Pool name:      dt04
Body:
Parameter=log_fs_usage
Value=0.040000
Alarm trigger value=0.0
Alarm trigger period=0

Now they come in formatted like this:

From: noreply@dt04
To: simon.beaumont@citrix.com
Date: Tue, 1 Mar 2016 17:39:56 +0000
Subject: [dt04] XenServer Alarm: Log partition nearly full on "Control domain
on host: dt04"

The log partition usage on "Control domain on host: dt04" is at 4.0%.
This alarm is set to be triggered when log partition usage is more than 0.0%.

Signed-off-by: Si Beaumont simon.beaumont@citrix.com

@simonjbeaumont
Copy link
Contributor Author

This is blocked on the fix for CA-201311 since that solves the Python 0 = false problem in all the formatters. Once @jonludlam pushes his fix for that, I'll rebase this patch so that I don't fix it in a completely different way/style for this one formatter.

@simonjbeaumont
Copy link
Contributor Author

Needs rebasing on #2603

Before this patch, emails would come in unformatted like the following:

    From: noreply@dt04
    To: simon.beaumont@citrix.com
    Date: Tue, 1 Mar 2016 17:34:00 +0000
    Subject: [dt04] XenServer Message: VM 88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
    ALARM

    Field           Value
    -----           -----
    Name:           ALARM
    Priority:       3
    Class:          VM
    Object UUID:    88eea7dc-6b81-4a1e-a43d-86b3eb097fd5
    Timestamp:      20160301T17:33:53Z
    Message UUID:   4116332a-995e-57d1-a318-c9c06a08c918
    Pool name:      dt04
    Body:
    Parameter=log_fs_usage
    Value=0.040000
    Alarm trigger value=0.0
    Alarm trigger period=0

Now they come in formatted like this:

    From: noreply@dt04
    To: simon.beaumont@citrix.com
    Date: Tue, 1 Mar 2016 17:39:56 +0000
    Subject: [dt04] XenServer Alarm: Log partition nearly full on "Control domain
    on host: dt04"

    The log partition usage on "Control domain on host: dt04" is at 4.0%.
    This alarm is set to be triggered when log partition usage is more than 0.0%.

Signed-off-by: Si Beaumont <simon.beaumont@citrix.com>
@johnelse
Copy link
Contributor

johnelse commented Mar 3, 2016

Looks good! It's going in.

johnelse added a commit that referenced this pull request Mar 3, 2016
CA-201093: mail-alarm: Add formatter for log partition usage alerts
@johnelse johnelse merged commit 171f933 into xapi-project:master Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants