-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[receiver/tcpcheck] New receiver #34458
base: main
Are you sure you want to change the base?
Conversation
98645b4
to
e6bb4f8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thanks for your contribution!
You will need a sponsor in order for us to accept this contribution. Please take a look at the instructions on adding new components. Thanks!
d53f92f
to
5d5cdf3
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
b4b440f
to
f6c3df2
Compare
Hello @yanfeng1992, thanks for opening this PR! I'm going to close for now as this component will require a sponsor before it's able to move forward. Once a sponsor is found you're welcome to reopen 👍 |
@crobert-1 Would you be willing to be my sponsor for this contribution? I saw that other people also need this receiver And Fluent Bit also has a tcp health check plug-in |
f0c9284
to
4a8d8a2
Compare
4a8d8a2
to
1f6be7f
Compare
Can you review the code again? Thanks @atoulme |
acf0690
to
875ec5d
Compare
receiver/tcpcheckreceiver/scraper.go
Outdated
if err == nil { | ||
success = 1 | ||
} | ||
s.mb.RecordTcpcheckDurationDataPoint(now, time.Since(start).Nanoseconds(), s.Config.TCPClientSettings.Endpoint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we record duration in ms instead of nanoseconds?
enabled: true | ||
gauge: | ||
value_type: int | ||
unit: ns |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use ms instead of ns?
|
||
```yaml | ||
receivers: | ||
sshcheck: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is incorrect, also can you make this support multiple endpoints instead of just one as specified currently?
receiver/tcpcheckreceiver/scraper.go
Outdated
} | ||
|
||
if err = s.scrapeTCP(now); err != nil { | ||
s.mb.RecordTcpcheckErrorDataPoint(now, int64(1), s.Endpoint, err.Error()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this implementation is not complete. I don't see where s.Endpoint
comes from, I would expect the scrape to loop over s.Config.Targets
or something.
Instead of using |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
3a79a86
to
229051c
Compare
229051c
to
09c94c3
Compare
09c94c3
to
832d88e
Compare
Introduce a new receiver, TCP Check Receiver.This receiver creates stats by connecting to an TCP server. Related to open-telemetry#34414 N/A metadata.yaml, README. Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
832d88e
to
f154a27
Compare
Hi @yanfeng1992, |
Signed-off-by: huangyanfeng huangyanfeng1992@gmail.com
Description:
To monitor the availability and performance of TCP endpoints.
Use case: TCP network detection plug-in, usually used to monitor whether a TCP port on the local machine is listening, or whether a remote port can be connected
Link to tracking Issue:
#34414
Testing:
(1) PR Includes coverage ~85% in the package with the scraper.
(2) Also includes coverage ~80% in the internal/tcpconfig package
Documentation:
The new receiver includes documentation in receiver/tcpcheckreceiver/README.md and receiver/tcpcheckreceiver/documentation.md.
The metric output looks like the following ...