Skip to content

(jsm.go#874) Let audit gather choose which profiles to collect - #1757

Draft
ploubser wants to merge 1 commit into
nats-io:mainfrom
ploubser:jsm_issue_874
Draft

ploubser wants to merge 1 commit into
nats-io:mainfrom
ploubser:jsm_issue_874

Conversation

@ploubser

Copy link
Copy Markdown
Collaborator

audit gather could only collect every profile or none. Users can now list the profiles they want, or leave some out of the default set.

Settings can also come from a YAML file, given on the command line or through an environment variable, so a site can keep a safe setup that every gather uses. Flags given on the command line override the file.

goroutine_2 is no longer collected by default.

@ploubser

Copy link
Copy Markdown
Collaborator Author

Depends on nats-io/jsm.go#877

audit gather could only collect every profile or none. Users can now
list the profiles they want, or leave some out of the default set.

Settings can also come from a YAML file, given on the command line or
through an environment variable, so a site can keep a safe setup that
every gather uses. Flags given on the command line override the file.

goroutine_2 is no longer collected by default.

Signed-off-by: Pieter Loubser <ploubser@gmail.com>

gather := app.Command("gather", "capture a variety of data from a deployment into an archive file").Alias("capture").Alias("cap").Action(c.gather)
gather.Tag("scope:system", "impact:ro")
gather.Flag("config", "YAML file to read gather settings from").Envar("NATS_AUDIT_GATHER_CONFIG").PlaceHolder("FILE").ExistingFileVar(&c.configFile)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

its hard to know what goes in this file, perhaps we should add a --write-config or something so people can make it using the flags? Then perhaps JSON would be better.

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.

2 participants