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

Add stan package #532

Merged
merged 15 commits into from
Jan 18, 2021
Merged

Add stan package #532

merged 15 commits into from
Jan 18, 2021

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Jan 14, 2021

What does this PR do?

This PR adds stan metricset.

Still need to add a dashboard for log datastream.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all datasets collect metrics or logs.

How to test this PR locally

Test the service manually using elastic-package:

  1. follow the instructions at https://github.com/elastic/elastic-package/blob/master/docs/howto/connect_service_with_elastic_stack.md#howto-connect-the-service-with-the-elastic-stack start a sample stan service.
  2. Install the stan integration from kibana. Use /tmp/service_logs/stan.log* for logs and elastic-package-service_stan_1:8222 for metrics.
  3. Verify that data are flowing for all datastreams and dashboards are working properly.

Related issues

Screenshots

Screenshot 2021-01-15 at 12 29 04 PM
Screenshot 2021-01-15 at 12 29 33 PM
Screenshot 2021-01-18 at 3 32 46 PM
Screenshot 2021-01-15 at 3 02 40 PM
Screenshot 2021-01-15 at 1 38 35 PM
Screenshot 2021-01-18 at 3 28 19 PM

Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark self-assigned this Jan 14, 2021
@ChrsMark ChrsMark added enhancement New feature or request Integration:stan STAN labels Jan 14, 2021
@elasticmachine
Copy link

elasticmachine commented Jan 14, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: Pull request #532 updated

    • Start Time: 2021-01-18T15:19:14.386+0000
  • Duration: 11 min 40 sec

  • Commit: f200279

Test stats 🧪

Test Results
Failed 0
Passed 23
Skipped 0
Total 23

Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark marked this pull request as ready for review January 18, 2021 14:22
Signed-off-by: ChrsMark <[email protected]>
@mtojek mtojek self-requested a review January 18, 2021 14:25
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Could you please rebase it against the master branch? I pushed a new test runner for checking presence of package assets. It will verify if the package can be installed.

@mtojek mtojek self-requested a review January 18, 2021 14:53
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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


## Compatibility

The STAN package is tested with Stan 0.15.1
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: missing dot at the end

FROM golang:1.13-alpine3.11 AS build-env
RUN apk --no-cache add build-base git mercurial gcc
RUN cd src && go get -d github.com/nats-io/stan.go/
RUN cd src/github.com/nats-io/stan.go/examples/stan-bench && git checkout tags/v0.5.2 && go build .
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I wonder if there isn't a prebuilt image for this, but let's leave it if there isn't

Copy link
Member Author

Choose a reason for hiding this comment

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

Didn't find anything with a quick search maintained by NATS project and I would avoid using a random third party custom image (if any) so better to handle it on our own. In the future these images will be cached, no?

Copy link
Contributor

Choose a reason for hiding this comment

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

SGTM! We'll cache image when it becomes the problem. So far image building doesn't take much time.

#while true; do /stan-bench -np 10 -ns 10 -n 1000000000 -ms 1024 bar; done &

# Make sure the container keeps running
tail -f /dev/null
Copy link
Contributor

Choose a reason for hiding this comment

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

is this line necessary considering the while true above?

}
]
},
"title": " Bytes Timeline [Logs STAN]",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: unnecessary space

}
}
},
"title": " Bytes Timeline [Logs STAN]",
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: actually this pattern is repeated in few places:

"title": "<space> 

kibana.version: ">=7.11.0"
screenshots:
- src: /img/metricbeat-stan-overview.png
title: Metricbeat STAN Dashboard
Copy link
Contributor

Choose a reason for hiding this comment

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

Metrics

size: 1829x447
type: image/png
- src: /img/filebeat-stan-overview.png
title: Filebeat STAN Dashboard
Copy link
Contributor

Choose a reason for hiding this comment

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

Logs, not filebeat

Signed-off-by: ChrsMark <[email protected]>
Copy link
Contributor

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

Please wait for green. If it passes, fee free to merge this PR. LGTM!

@@ -17,11 +17,11 @@ conditions:
kibana.version: ">=7.11.0"
screenshots:
- src: /img/metricbeat-stan-overview.png
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I think you can fix filenames too.

Signed-off-by: ChrsMark <[email protected]>
@ChrsMark ChrsMark merged commit 23434d0 into elastic:master Jan 18, 2021
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
@andrewkroh andrewkroh added the New Integration Issue or pull request for creating a new integration package. label Aug 13, 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:stan STAN New Integration Issue or pull request for creating a new integration package.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create stan package
4 participants