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 graphyte to send metrics to graphite or carbon #95

Merged
merged 6 commits into from
Apr 11, 2024

Conversation

wdpypere
Copy link
Contributor

not that hard to do, but add some convenience so data can be string or list as well, and some basic logging.

"""
# convert list to string if needed
if isinstance(data, list):
data = "\n".join(data)
Copy link
Member

Choose a reason for hiding this comment

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

this makes no sense. i would expect either some serialiser, or that it sends element per element

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

valid point on the list, I was only thinking about my use case. I'll remove that.

graphyte is not available on our systems and I don't think maintaining and rpm to replace 2 lines of code is a good idea.

Copy link
Member

Choose a reason for hiding this comment

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

i'm quite sure the graphyte dev also thought that.
graphyte is 200 lines, and license allows us to include it in vsc-utils if you don't want to build a package for 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.

just to replace the following?

    with socket.create_connection((host, port), timeout=timeout) as sock:
        sock.sendall(data)

Copy link
Member

Choose a reason for hiding this comment

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

you are sure we will never need any of the features in graphyte? not so convinced tbh

@wdpypere
Copy link
Contributor Author

@stdweird this now includes graphyte

@wdpypere wdpypere changed the title add simple function for netcat-like send behaviour add graphyte to send metrics to graphite or carbon Apr 10, 2024
@itkovian itkovian merged commit 3abd968 into hpcugent:master Apr 11, 2024
3 checks passed
@wdpypere wdpypere deleted the nc branch August 31, 2024 23:19
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.

3 participants