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

[Nginx] Add SLO's with Nginx Package #10269

Closed
wants to merge 12 commits into from
Closed

Conversation

muthu-mps
Copy link
Contributor

@muthu-mps muthu-mps commented Jun 26, 2024

Fixes https://github.com/elastic/observability-dev/issues/3677

  • Enhancement

Adds new SLO to be shipped with the integration package.

  • Created a simple request includes the create_slo API request input.
  • This is the basic version to test the SLO's with the integration package. Subject to change.
  • Updated the package spec version in the integration to 3.3.0 (pre-release version) as suggested by @jsoriano

Package spec changes goes here.

@@ -1,7 +1,7 @@
format_version: "3.0.2"
format_version: "3.3.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsoriano - I have updated the version to 3.3.0 to test the behaviour and I am getting this error.

Error: building package failed: invalid content found in built zip package: could not load specification for version [3.3.0]: spec version "3.3.0" not found

Can you suggest on how to test this change with the pre-release version?

Copy link
Member

Choose a reason for hiding this comment

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

No released version of package spec contains this spec version, you will need to add a replace in the meantime, something like this:

go mod edit -replace github.com/elastic/package-spec/v3=github.com/elastic/package-spec/v3@main
go mod tidy

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What is the format_version that we could use for testing the package?

Copy link
Member

Choose a reason for hiding this comment

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

What is the format_version that we could use for testing the package?

format_version: 3.3.0

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsoriano - Tried the above step and with the format_version:3.3.0 we are still getting the same error.

Copy link
Member

@jsoriano jsoriano Jun 26, 2024

Choose a reason for hiding this comment

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

Looks good, yes, this should be enough for CI.

If you want to use elastic-package locally with this dependency you can run it as go run github.com/elastic/elastic-package from the integrations repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @jsoriano!

  • We are getting few validation errors in different package, I am skipping those for now as those are not related.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, after updating go.mod all tests are executed, but you can ignore the ones not related to your package.

Copy link

Choose a reason for hiding this comment

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

No released version of package spec contains this spec version

@jsoriano When is the next release of the package spec?

Copy link
Member

Choose a reason for hiding this comment

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

@jsoriano When is the next release of the package spec?

We release more or less on demand, and we have just released 3.2.1. Maybe we can release 3.2.2 soon with a couple of bugfixes. This release would also include 3.3.0 prerelease, what will allow to use SLOs in prerelease packages.

@elasticmachine
Copy link

elasticmachine commented Jun 27, 2024

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

go.mod Outdated
@@ -208,3 +208,5 @@ require (
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace github.com/elastic/package-spec/v3 => github.com/elastic/package-spec/v3 v3.2.1-0.20240626070810-2758f3ed9689
Copy link

@mgiota mgiota Jun 27, 2024

Choose a reason for hiding this comment

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

@muthu-mps I just want to verify if this version is correct v3.2.1-0.20240626070810-2758f3ed9689

Copy link

@mgiota mgiota Jun 27, 2024

Choose a reason for hiding this comment

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

@jsoriano If I understand correctly, this addition is temporary? I mean once the next package-spec is released, do we still need this change? Maybe we should exclude this change from git and just rely on running go run github.com/elastic/elastic-package build locally to be able to test it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@muthu-mps I just want to verify if this version is correct v3.2.1-0.20240626070810-2758f3ed9689

Yes, With this version I am able to build the integrations successfully by adding SLO's. That means it is using the package-spec change to add slo's.

Copy link
Member

Choose a reason for hiding this comment

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

@jsoriano If I understand correctly, this addition is temporary? I mean once the next package-spec is released, do we still need this change? Maybe we should exclude this change from git and just rely on running go run github.com/elastic/elastic-package build locally to be able to test it?

Yes, this is temporary to allow to run in CI till 3.3.0 is available. This PR cannot be merged till then.

Copy link
Member

Choose a reason for hiding this comment

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

This replace can be removed now, we have just released a version of elastic-package that includes the technical preview of 3.3.0.

@mgiota
Copy link

mgiota commented Jun 27, 2024

Changes LGTM! I leave a comment here, regarding updating the README file of the Ngnix integration to include the SLO asset addition.

packages/nginx/changelog.yml Outdated Show resolved Hide resolved
Co-authored-by: Panagiota Mitsopoulou <giota85@gmail.com>
@mgiota
Copy link

mgiota commented Jun 27, 2024

I found similar commit, where ML modules were added to the README. I am adding it here for reference

## SLOs

SLOs are usually defined in terms of metrics such as availability, response time, and throughput, and they are used to ensure that the service meets the needs of its users.
You can use the Nginx integration to measure the availability of the Nginx service. The SLOs gets created automatically during the installation of the integration. The user can view the created SLOs in the Kibana dashboard panel.
Copy link

Choose a reason for hiding this comment

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

@muthu-mps Nice! I took your changes and I was able to see the README changes in the UI!

Screenshot 2024-06-27 at 15 21 26

I have one correction regarding this text in the Kibana dashboard panel. You should change that, since user can see the automatically generated SLOs under the Observability SLOs page.

I was checking the Kibana SLO documentation page and they reference the SLOs page page like this Observability -> SLOs.

So feel free to change to: The user can view the created SLOs in the Observability -> SLOs page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! I have updated the README file.

@andrewkroh andrewkroh added Integration:nginx Nginx Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations] labels Jul 19, 2024
@harnish-elastic harnish-elastic self-requested a review July 24, 2024 07:22
Copy link
Contributor

@harnish-elastic harnish-elastic left a comment

Choose a reason for hiding this comment

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

As per offline discussion, need to update the following things!

  • Need to use index logs-* instead of logs-nginx-*
  • Need to add data_stream.dataset query since the field that has been used is ecs and if the user having multiple packages, SLO/alerts will also be generated from that field!

@muthu-mps
Copy link
Contributor Author

As per offline discussion, need to update the following things!

  • Need to use index logs-* instead of logs-nginx-*
  • Need to add data_stream.dataset query since the field that has been used is ecs and if the user having multiple packages, SLO/alerts will also be generated from that field!

Yes Harnish, The issue here is that the default dataview is only supported here. I have already captured it here.

@elasticmachine
Copy link

💚 Build Succeeded

History

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
5.3% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@andrewkroh andrewkroh added the enhancement New feature or request label Aug 19, 2024
@botelastic
Copy link

botelastic bot commented Sep 18, 2024

Hi! We just realized that we haven't looked into this PR in a while. We're sorry! We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1. Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Sep 18, 2024
@botelastic
Copy link

botelastic bot commented Oct 18, 2024

Hi! This PR has been stale for a while and we're going to close it as part of our cleanup procedure. We appreciate your contribution and would like to apologize if we have not been able to review it, due to the current heavy load of the team. Feel free to re-open this PR if you think it should stay open and is worth rebasing. Thank you for your contribution!

@botelastic botelastic bot closed this Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:nginx Nginx Stalled Team:Obs-InfraObs Label for the Observability Infrastructure Monitoring team [elastic/obs-infraobs-integrations]
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants