-
Notifications
You must be signed in to change notification settings - Fork 20
Add -local_only flag to get local node metrics per node #170
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
f66a901
7b8e5f0
8ca0752
b04276a
4f5f8bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ type argumentList struct { | |
| IndicesRegex string `default:"" help:"A regex pattern that matches the index names to collect. Collects all if unspecified"` | ||
| ShowVersion bool `default:"false" help:"Print build information and exit"` | ||
| MasterOnly bool `default:"false" help:"Collect cluster metrics on the elected master only"` | ||
| LocalOnly bool `default:"false" help:"Collect node metrics on the local node only"` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we add an integration test?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need help with this |
||
| TLSInsecureSkipVerify bool `default:"false" help:"Enabled TLS insecure skip verify"` | ||
| } | ||
|
|
||
|
|
@@ -61,6 +62,9 @@ func main() { | |
| buildDate) | ||
| os.Exit(0) | ||
| } | ||
| if args.MasterOnly && args.LocalOnly { | ||
| logErrorAndExit(fmt.Errorf("Select argument -master_only or -local_only, not both")) | ||
| } | ||
|
|
||
| // Create a client for metrics | ||
| metricsClient, err := NewClient(args.Hostname) | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need help updating mock
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated integration tests so that it passes now |
Uh oh!
There was an error while loading. Please reload this page.