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

automatic origin element #225

Open
goatshriek opened this issue Mar 21, 2022 · 5 comments
Open

automatic origin element #225

goatshriek opened this issue Mar 21, 2022 · 5 comments
Assignees
Labels
enhancement new features or improvements

Comments

@goatshriek
Copy link
Owner

RFC 5424 specifies that a origin structured data element may be included to give some level of information about the originator of the log message. Stumpless should have the ability to generate this element automatically, as well as the capability to include it automatically when logging to given targets.

@goatshriek goatshriek added the enhancement new features or improvements label Mar 21, 2022
@az1plo
Copy link

az1plo commented Oct 10, 2024

Hello, I'd like to work on this issue. Can you please assign me?

@goatshriek
Copy link
Owner Author

Sure, you are welcome to work this one of you'd like.

@vasiliyk
Copy link
Contributor

Origin structure data element is basically 4 optional fields for Syslog Protocol:

typedef struct {
    char ip[16];           // Origin IP address
    char enterpriseId[50]; // Enterprise ID
    char software[50];     // Software name
    char swVersion[20];    // Software version
} Origin;

It is clear what to put in 2 fields:

software = Stumpless
swVersion = stumpless-version 

enterpriseId we probably need to skip.
ip is open question as PC can have multiple network interfaces + multiple IPv4 together with IPv6 addresses. Should we make it configurable??

@goatshriek
Copy link
Owner Author

Yes, all of the fields in the origin element should be configurable.

The default for the IP param(s) could be either the first network address found when querying or all of the addresses on the machine; the RFC includes both options as something application MAY do. For the sake of simplicity, perhaps we start with the first address in this change, and update it later.

As you build this out, be sure that you're using the existing functionality where possible. Perhaps a new public function to get the origin struct stumpless_element instance, which the user can modify if they want to. You won't need to define a new struct for the origin element itself.

@vasiliyk
Copy link
Contributor

vasiliyk commented Nov 9, 2024

hey @az1plo. I am sorry, just noticed the issue is assigned to you!
Are you still working? I will switch to another one if you are still working here :]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new features or improvements
Projects
None yet
Development

No branches or pull requests

3 participants