-
Notifications
You must be signed in to change notification settings - Fork 70
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
Allow the troubleshooting commands to use the IPC endpoint #171
Conversation
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 make sure nothing breaks on agent5?
@@ -136,6 +136,11 @@ public static void main(String[] args) { | |||
|
|||
App app = new App(config); | |||
|
|||
// Get config from the ipc endpoint for "list_*" actions | |||
if (!config.getAction().equals(AppConfig.ACTION_COLLECT)) { |
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.
Wondering if this might break stuff on agent5? Can you verify? Maybe we should add a flag to enable this behavior?
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.
It should not since the A5 does not give the IPC config parameters.
if (this.client == null) { |
jmxfetch/src/main/java/org/datadog/jmxfetch/App.java
Lines 73 to 75 in 1e163cf
if (appConfig.remoteEnabled()) { | |
client = new HttpClient(appConfig.getIPCHost(), appConfig.getIPCPort(), false); | |
} |
jmxfetch/src/main/java/org/datadog/jmxfetch/AppConfig.java
Lines 132 to 134 in 1e163cf
public boolean remoteEnabled() { | |
return (ipcHost != null && ipcPort > 0); | |
} |
^
getJSONConfigs
is a no-op in A5
@@ -107,7 +107,7 @@ public HttpResponse request(String method, String body, String path) { | |||
con.setRequestMethod(method.toUpperCase()); | |||
con.setRequestProperty("Authorization", "Bearer "+ this.token); | |||
con.setRequestProperty("User-Agent", USER_AGENT); | |||
if (method.toUpperCase() == "GET") { | |||
if (method.toUpperCase().equals("GET")) { |
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.
🍪
1e163cf
to
2c61140
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.
Go for it!
This PR makes it possible to give configs to
list_*
commands using the HTTPS IPC endpoint.