Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alert history #3191

Merged
merged 17 commits into from
Apr 7, 2021
Merged

Alert history #3191

merged 17 commits into from
Apr 7, 2021

Conversation

alexandre-allard
Copy link
Contributor

Component: images, build, salt

Context:

Summary:

Acceptance criteria:


Closes: #3180

@bert-e
Copy link
Contributor

bert-e commented Mar 10, 2021

Hello alexandre-allard-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Mar 10, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@alexandre-allard alexandre-allard force-pushed the feature/alert-history branch 2 times, most recently from 80bd91d to 3873910 Compare March 12, 2021 13:15
@bert-e
Copy link
Contributor

bert-e commented Mar 12, 2021

Branches have diverged

This pull request's source branch feature/alert-history has diverged from
development/2.9 by more than 50 commits.

To avoid any integration risks, please re-synchronize them using one of the
following solutions:

  • Merge origin/development/2.9 into feature/alert-history
  • Rebase feature/alert-history onto origin/development/2.9

Note: If you choose to rebase, you may have to ask me to rebuild
integration branches using the reset command.

@bert-e

This comment has been minimized.

@bert-e

This comment has been minimized.

@alexandre-allard alexandre-allard changed the base branch from development/2.9 to development/2.8 March 12, 2021 13:18
@bert-e
Copy link
Contributor

bert-e commented Mar 12, 2021

Integration data created

I have created the integration data for the additional destination branches.

  • this pull request will merge feature/alert-history into
    development/2.8
  • w/2.9/feature/alert-history will be merged into development/2.9

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7

You can set option create_pull_requests if you need me to create
integration pull requests in addition to integration branches, with:

@bert-e create_pull_requests

@bert-e
Copy link
Contributor

bert-e commented Mar 12, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2021

History mismatch

Merge commit #f6cf8807ddc2744994944db8283b45725c082587 on the integration branch
w/2.9/feature/alert-history is merging a branch which is neither the current
branch feature/alert-history nor the development branch
development/2.9.

It is likely due to a rebase of the branch feature/alert-history and the
merge is not possible until all related w/* branches are deleted or updated.

Please use the reset command to have me reinitialize these branches.

@alexandre-allard alexandre-allard changed the base branch from development/2.8 to development/2.9 March 17, 2021 10:59
@bert-e
Copy link
Contributor

bert-e commented Mar 17, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@alexandre-allard alexandre-allard marked this pull request as ready for review March 19, 2021 08:32
@alexandre-allard alexandre-allard requested a review from a team as a code owner March 19, 2021 08:32
@bert-e
Copy link
Contributor

bert-e commented Mar 19, 2021

Branches have diverged

This pull request's source branch feature/alert-history has diverged from
development/2.9 by more than 50 commits.

To avoid any integration risks, please re-synchronize them using one of the
following solutions:

  • Merge origin/development/2.9 into feature/alert-history
  • Rebase feature/alert-history onto origin/development/2.9

Note: If you choose to rebase, you may have to ask me to rebuild
integration branches using the reset command.

@bert-e
Copy link
Contributor

bert-e commented Mar 19, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@alexandre-allard alexandre-allard force-pushed the feature/alert-history branch 4 times, most recently from c6320f9 to d196d3c Compare March 19, 2021 16:59
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly peripheral comments, some things should change in this PR though:

  • add the logger Go code to the linter
  • adjust the K8s manifests to use standard labels
  • adjust the test to check alert format (using the Watchdog "example")

docs/developer/architecture/alert-history.rst Show resolved Hide resolved
Comment on lines +161 to +162
As for now, there is no retention based on labels, streams, tenant or
whatever (on-going discussion `GH Loki #162`_).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to follow this closely, and maybe contribute. Having tenant-based retention could be really nice for separating different kinds of log streams (not only alerts, but also e.g. Salt events, audit logs, ...).

docs/developer/architecture/alert-history.rst Show resolved Hide resolved
docs/developer/architecture/alert-history.rst Outdated Show resolved Hide resolved
images/metalk8s-alert-logger/main.go Outdated Show resolved Hide resolved
salt/metalk8s/addons/alert-logger/deployed/deployment.sls Outdated Show resolved Hide resolved
Comment on lines +116 to +118
Name container
Format regex
Regex ^(?<time>[^ ]+) (?<stream>stdout|stderr) (?<logtag>[^ ]+) (?<message>.+)$
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this parser should always be used for containerd-formatted logs, no? And as such, likely this commit should be backported to the first version where Loki was introduced (2.6, I guess?)

Copy link
Contributor Author

@alexandre-allard alexandre-allard Mar 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I agree, we should probably backport it.
Will do it once this PR is merged.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR opened here #3276

tests/post/steps/test_logging.py Outdated Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Mar 25, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

@alexandre-allard alexandre-allard force-pushed the feature/alert-history branch 2 times, most recently from 54a973f to 4af620b Compare March 26, 2021 12:55
@bert-e
Copy link
Contributor

bert-e commented Apr 1, 2021

Branches have diverged

This pull request's source branch feature/alert-history has diverged from
development/2.9 by more than 50 commits.

To avoid any integration risks, please re-synchronize them using one of the
following solutions:

  • Merge origin/development/2.9 into feature/alert-history
  • Rebase feature/alert-history onto origin/development/2.9

Note: If you choose to rebase, you may have to ask me to rebuild
integration branches using the reset command.

Move all `.uml` to a `diagrams` directory, so the
directory only contains architecture document
which is cleaner.
@bert-e
Copy link
Contributor

bert-e commented Apr 6, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

1 similar comment
@bert-e
Copy link
Contributor

bert-e commented Apr 6, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following reviewers are expecting changes from the author, or must review again:

gdemonet
gdemonet previously approved these changes Apr 6, 2021
Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some relatively minor comments, feel free to put them in a debt ticket.

images/metalk8s-alert-logger/main.go Outdated Show resolved Hide resolved
images/metalk8s-alert-logger/Dockerfile Outdated Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Apr 6, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

gdemonet
gdemonet previously approved these changes Apr 6, 2021
This is a simple HTTP server, listening
on a port (default to 19094), waiting for
HTTP post request from alertmanager.
It then logs the content of these requests
to stdout.

Refs: #3180
This container image is used for alert history.

Refs: #3180
Remove the date from the logs once parsed by
fluent-bit as we do not need it anymore and
it allows to improve the logs readability.
Plus, it is also need by the alert history
feature, this way we only end up with a JSON
formatted alert in logs which makes it easier
to parse/use by other components.

Refs: #3180
We now send all the alerts to the alert-logger
receiver.

Refs: #3180
We also need to enable CORS to allow Cross Origin
requests coming from the web UI.

Refs: #3180
This scenario checks that we can retrieve the
cluster alerts from the Loki API.

Refs: #3180
We were passing a CmdAction object to target
actions, so doit was not doing anything.
We now pass the execute method of the object.
We need a more recent version of plantuml
to be able to build alert-history diagram
and this version is not shipped in ubuntu:18.04
There is an issue with mktexpk not being able
to create a directory, so wo create these fonts
prior to launch the build.
Also fix an issue by always changing ownership
of doc build artifacts to avoid having root
owned files when doc build fails.
@alexandre-allard
Copy link
Contributor Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Apr 6, 2021

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

The following options are set: approve

Copy link
Contributor

@gdemonet gdemonet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bert-e
Copy link
Contributor

bert-e commented Apr 7, 2021

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/2.9

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: approve

@bert-e
Copy link
Contributor

bert-e commented Apr 7, 2021

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/2.9

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8

Please check the status of the associated issue None.

Goodbye alexandre-allard-scality.

@bert-e bert-e merged commit b92fb8c into development/2.9 Apr 7, 2021
@bert-e bert-e deleted the feature/alert-history branch April 7, 2021 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alert history
3 participants