Skip to content

Commit

Permalink
Improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
anagrius committed Nov 23, 2018
1 parent 0eefb1a commit aeeda14
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
8 changes: 5 additions & 3 deletions command/Meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ func generalOptionsUsage() string {
The address of the Humio server.
Overrides the HUMIO_ADDR environment variable if set.
Default = http://localhost:8080/
-token=<api-token>
The API token to use to authenticate API requests with.
Overrides the HUMIO_API_TOKEN environment variable if set.
-no-color
Disables colored command output. Alternatively, HUMIO_CLI_NO_COLOR may be
set.
-token
The API token to use to authenticate API requests with.
Overrides the HUMIO_API_TOKEN environment variable if set.
`
return strings.TrimSpace(helpText)
}
Expand Down
27 changes: 25 additions & 2 deletions command/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ Usage: humio ingest [-token=<ingest-token>] [-parser=<parser>] [<repo>]
It can be handy to specify the parser to be used to ingest the
data on arrival - i.e. the type of data you are sending.
The value of -parser will take precedence over any parser that
is associated with the ingest token set by -token.
Expand All @@ -124,9 +123,33 @@ Usage: humio ingest [-token=<ingest-token>] [-parser=<parser>] [<repo>]
Alternatively, you can use the -tail=<file> argument, which
has the same effect.
General Options:
General Options:
` + generalOptionsUsage() + `
Ingest Options:
-tail=<file>
Tails a file instead of listening to stdin.
-parser=<name>
Explicitly specify which parser to use for ingestion.
The value of -parser will take precedence over any parser that
is associated with the ingest token e.g. set by -token.
-token=<token>
The ingest token to use. This defaults to HUMIO_API_TOKEN.
-label=<label>
Adds a @label=<lavel> field to each event. This can help you
find specific data send by the CLI when searching in the UI.
-no-session
No @session field will be added to each event. @session assigns
a new UUID to each executing of the Humio CLI.
-open
Opens the search view in a browser for the data you are streaming.
`
return strings.TrimSpace(helpText)
}
Expand Down
10 changes: 8 additions & 2 deletions command/ingest_tokens_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,15 @@ Usage: humio ingest-tokens add <repo> <token name>
Adds a new ingest token with name <token name> to a repository <repo>.
General Options:
General Options:
` + generalOptionsUsage() + `
Add Options:
-parser=<name>
The parser to use for ingestion when new token is used
to send data to Humio.
`
return strings.TrimSpace(helpText)
}
Expand All @@ -35,7 +41,7 @@ func (f *TokensAddCommand) Run(args []string) int {

flags := f.Meta.FlagSet(f.Name(), FlagSetClient)
flags.Usage = func() { f.Ui.Output(f.Help()) }
flags.Var(&parserName, "parser", "Assign a parser to the token.")
flags.Var(&parserName, "parser", "")

if err := flags.Parse(args); err != nil {
return 1
Expand Down

0 comments on commit aeeda14

Please sign in to comment.