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

Remove Sidecar collector configuration path #5278

Merged
merged 4 commits into from
Nov 14, 2018
Merged

Remove Sidecar collector configuration path #5278

merged 4 commits into from
Nov 14, 2018

Conversation

mpfz0r
Copy link
Contributor

@mpfz0r mpfz0r commented Nov 8, 2018

Instead of a GUI option, we let the sidecar autogenerate the path
to ".../generated/<collector_name>.conf"

Add validations for the collector name, so it can be used as a filename.

We use the collector name in the configuration path.
Avoid problems by restricting it to a characters that need no escape
handling.
and fix annotation on copy route
Instead of a GUI option, we let the sidecar autogenerate the path
to ".../generated/<collector_name>.conf"

Remove existing configuration_path values in the migration
to simplify upgrading to this change.

Fixes #5265
@mariussturm mariussturm merged commit 7127802 into master Nov 14, 2018
@mariussturm mariussturm deleted the issue-5265 branch November 14, 2018 11:07
mpfz0r added a commit to Graylog2/collector-sidecar that referenced this pull request Sep 12, 2022
thll pushed a commit to Graylog2/collector-sidecar that referenced this pull request Sep 14, 2022
* Add configuration id to backend name and configuration path

This enables us to use the same backend with multiple
configurations

* Support multiple configs per assignment

Expand each assignment and backend into a unique ID
that combines the backendID + configID

Most of the stores us a map with this Id that holds
everything together.

* Replace GetBackendById with simpler GetBackend method

* Cleanup

* Keep using old assignment struct

Multiple configs can still be assigned by using multiple assignments.
E.g.:
 [
   { "collector-1": "config-A" },
   { "collector-1": "config-B" }
 ]

* Report collector config directory to the server

This will be used to create the ${sidecar.spoolDir} config variable.

* Only report CollectorConfigurationDirectory to newer Graylog instances

Older Graylog servers will refuse unknown NodeDetails attributes

Also update go module to version 1.19

* Make collector status ID backwards compatible

If we are talking to an older Graylog instance,
report the collectors with just the collector ID.

Refactor version handling into separate type

* Fix and refactor version comparison

* Ignore sleep on the first periodical loop

Speeds up testing the sidecar

* fix benchmarks

* build with go 1.19

* fix jeninks file

* Fix null pointer deref.

The recent code changes triggered an old exisiting bug,
because we would only keep a backend list of actually assigned
backends.

* Prefer pointer receivers

* Send tags and collector config regardless of send_status

* Remove configuration_file_name support.

Refs Graylog2/graylog2-server#5278

* Add configuration_id to each collector status request

Newer Graylog servers can use it to differentiate
multiple configs on one collector.
Older servers won't see this field for backwards compatibility.

* fix runner comparision
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants