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

Support gateway mode for linux installer #187

Merged
merged 1 commit into from
Apr 1, 2021
Merged

Conversation

jchengsfx
Copy link
Contributor

@jchengsfx jchengsfx commented Mar 19, 2021

  • Updated installer script for the --mode <agent|gateway> option (defaults to agent)
  • Sets the SPLUNK_CONFIG env var for the collector service to agent_config.yaml if running the installer script with --mode agent, or gateway_config.yaml if --mode gateway
  • Updated the installer test for the --mode and --without-fluentd options

@codecov
Copy link

codecov bot commented Mar 19, 2021

Codecov Report

Merging #187 (6af918e) into main (b9a34b7) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #187   +/-   ##
=======================================
  Coverage   89.10%   89.10%           
=======================================
  Files          18       18           
  Lines        1010     1010           
=======================================
  Hits          900      900           
  Misses         77       77           
  Partials       33       33           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9a34b7...6af918e. Read the comment docs.

@jrcamp
Copy link
Contributor

jrcamp commented Mar 19, 2021

Can we make agent vs gateway explicit instead of inferring based on fluentd option? ie, have an option --mode (agent|gateway) that defaults to agent. This would also allow people to install the agent without fluentd (which some may want if they're not using log observer).

@jrcamp
Copy link
Contributor

jrcamp commented Mar 19, 2021

Actually.. we would probably need to do something similar to how helm chart works as you may want both agent and gateway at the same time. So it'd probably need to be something like --{enable,disable} {agent,gateway,fluentd} where agent and fluentd is on by default. @flands thoughts?

@jchengsfx
Copy link
Contributor Author

Actually.. we would probably need to do something similar to how helm chart works as you may want both agent and gateway at the same time. So it'd probably need to be something like --{enable,disable} {agent,gateway,fluentd} where agent and fluentd is on by default. @flands thoughts?

@jrcamp Which config file should the collector service be configured for if we allow enabling "both agent and gateway at the same time"? Also, other than setting the SPLUNK_CONFIG env var for either the agent or gateway config, is there anything else that the installer script should do when enabling agent vs gateway?

@jchengsfx jchengsfx marked this pull request as draft March 23, 2021 22:36
@jchengsfx jchengsfx force-pushed the deb-rpm-configs branch 5 times, most recently from 86f358d to 0dd4ca8 Compare March 31, 2021 15:12
@jchengsfx jchengsfx changed the title Include agent and gateway configs in deb/rpm Support gateway mode for linux installer Mar 31, 2021
Copy link
Contributor

@flands flands left a comment

Choose a reason for hiding this comment

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

LGTM -- should support one mode or the other and should default to agent. Besides configuration, everything else should be the same.

@jrcamp
Copy link
Contributor

jrcamp commented Apr 1, 2021

LGTM -- should support one mode or the other and should default to agent. Besides configuration, everything else should be the same.

Though what do you do if you want to monitor the host your gateway is running on if you can't install the agent? 😛 I don't think that's covered today is it? It means there's 3 states (which is what the helm chart covers). agent, gateway, agent + gateway.

@jchengsfx
Copy link
Contributor Author

LGTM -- should support one mode or the other and should default to agent. Besides configuration, everything else should be the same.

Though what do you do if you want to monitor the host your gateway is running on if you can't install the agent? 😛 I don't think that's covered today is it? It means there's 3 states (which is what the helm chart covers). agent, gateway, agent + gateway.

@jrcamp Sorry, I'm still not understanding how we run the collector in both modes at the same time on the same host. Are you suggesting that we run 2 separate collector services (one for agent mode and one for gateway), or is there a way to run a single collector service with both agent and gateway configs?

@mstumpfx
Copy link

mstumpfx commented Apr 1, 2021

@jchengsfx I think he means a tertiary config, where the behavior is like the gateway, but also has receivers enabled like the host metrics receiver, so that the host the gateway is running on is also monitored. I could also see us just enabling this behavior by default in the gateway config. If not, maybe we should at least doc it.

@jrcamp
Copy link
Contributor

jrcamp commented Apr 1, 2021

@jchengsfx I think he means a tertiary config, where the behavior is like the gateway, but also has receivers enabled like the host metrics receiver, so that the host the gateway is running on is also monitored. I could also see us just enabling this behavior by default in the gateway config. If not, maybe we should at least doc it.

Correct. I believe there are APM-only customers (though those might actually come with host metrics for free, I can't remember).

@jchengsfx
Copy link
Contributor Author

@jchengsfx I think he means a tertiary config, where the behavior is like the gateway, but also has receivers enabled like the host metrics receiver, so that the host the gateway is running on is also monitored. I could also see us just enabling this behavior by default in the gateway config. If not, maybe we should at least doc it.

Correct. I believe there are APM-only customers (though those might actually come with host metrics for free, I can't remember).

Ok, thanks. We can add a third mode in a separate PR, maybe something like --mode <agent|gateway|both>, once we have the tertiary config available to include in the packages.

@jchengsfx jchengsfx marked this pull request as ready for review April 1, 2021 17:26
@jchengsfx jchengsfx merged commit a4dd11d into main Apr 1, 2021
@delete-merged-branch delete-merged-branch bot deleted the deb-rpm-configs branch April 1, 2021 17:26
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.

4 participants