Documentation ¶
Index ¶
- Variables
- func AddParserDefaultOptions(options *GlobalOptions)
- func HandleOtherModes(fp *flag.Parser, modes OtherModes)
- func SanityCheckOptions(options *GlobalOptions)
- func SetVersionUserAgent(backfill bool, parserName string)
- func Usage()
- type DoneMessage
- type GlobalOptions
- type OtherModes
- type RequiredOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildID string
BuildID is set by Travis CI
View Source
var ValidParsers = []string{
"arangodb",
"json",
"keyval",
"mongo",
"mysql",
"mysqlaudit",
"nginx",
"postgresql",
"regex",
}
Functions ¶
func AddParserDefaultOptions ¶
func AddParserDefaultOptions(options *GlobalOptions)
func HandleOtherModes ¶
func HandleOtherModes(fp *flag.Parser, modes OtherModes)
handleOtherModes takse care of all flags that say we should just do something and exit rather than actually parsing logs
func SanityCheckOptions ¶
func SanityCheckOptions(options *GlobalOptions)
func SetVersionUserAgent ¶
setVersion sets the internal version ID and updates libclick's user-agent
Types ¶
type DoneMessage ¶
type GlobalOptions ¶
type GlobalOptions struct { APIHost string `long:"api_host" description:"Host of the ClickHouse server" default:"http://localhost:8123/"` TailSample bool `hidden:"true" description:"When true, sample while tailing. When false, sample post-parser events"` ConfigFile string `short:"c" long:"config" description:"Config file for clicktail in INI format." no-ini:"true"` SampleRate uint `short:"r" long:"samplerate" description:"Only send 1 / N log lines" default:"1"` NumSenders uint `short:"P" long:"poolsize" description:"Number of concurrent connections to open to ClickHouse" default:"10"` BatchFrequencyMs uint `long:"send_frequency_ms" description:"How frequently to flush batches" default:"10000"` BatchSize uint `long:"send_batch_size" description:"Maximum number of messages to put in a batch" default:"1000000"` Debug bool `long:"debug" description:"Print debugging output"` StatusInterval uint `long:"status_interval" description:"How frequently, in seconds, to print out summary info" default:"60"` Backfill bool `` /* 180-byte string literal not displayed */ Localtime bool `` /* 154-byte string literal not displayed */ Timezone string `` /* 209-byte string literal not displayed */ ScrubFields []string `` /* 129-byte string literal not displayed */ DropFields []string `long:"drop_field" description:"Do not send the field to ClickHouse. May be specified multiple times"` AddFields []string `long:"add_field" description:"Add the field to every event. Field should be key=val. May be specified multiple times"` RequestShape []string `` /* 289-byte string literal not displayed */ ShapePrefix string `long:"shape_prefix" description:"Prefix to use on fields generated from request_shape to prevent field collision"` RequestPattern []string `` /* 196-byte string literal not displayed */ RequestParseQuery string `` /* 219-byte string literal not displayed */ RequestQueryKeys []string `` /* 159-byte string literal not displayed */ BackOff bool `` /* 195-byte string literal not displayed */ PrefixRegex string `` /* 233-byte string literal not displayed */ DynSample []string `` /* 251-byte string literal not displayed */ DynWindowSec int `long:"dynsample_window" description:"measurement window size for the dynsampler, in seconds" default:"30"` GoalSampleRate int `hidden:"true" description:"used to hold the desired sample rate and set tailing sample rate to 1"` MinSampleRate int `long:"dynsample_minimum" description:"if the rate of traffic falls below this, dynsampler won't sample" default:"1"` Reqs RequiredOptions `group:"Required Options"` Modes OtherModes `group:"Other Modes"` Tail tail.TailOptions `group:"Tail Options" namespace:"tail"` ArangoDB arangodb.Options `group:"ArangoDB Parser Options" namespace:"arangodb"` JSON htjson.Options `group:"JSON Parser Options" namespace:"json"` KeyVal keyval.Options `group:"KeyVal Parser Options" namespace:"keyval"` Mongo mongodb.Options `group:"MongoDB Parser Options" namespace:"mongo"` MySQL mysql.Options `group:"MySQL Parser Options" namespace:"mysql"` MySQLAudit mysqlaudit.Options `group:"MySQL Audit Parser Options" namespace:"mysqlaudit"` Nginx nginx.Options `group:"Nginx Parser Options" namespace:"nginx"` PostgreSQL postgresql.Options `group:"PostgreSQL Parser Options" namespace:"postgresql"` Regex regex.Options `group:"Regex Parser Options" namespace:"regex"` }
GlobalOptions has all the top level CLI flags that clicktail supports
type OtherModes ¶
type OtherModes struct { Help bool `short:"h" long:"help" description:"Show this help message"` ListParsers bool `short:"l" long:"list" description:"List available parsers"` Version bool `short:"V" long:"version" description:"Show version"` WriteDefaultConfig bool `long:"write_default_config" description:"Write a default config file to STDOUT" no-ini:"true"` WriteCurrentConfig bool `long:"write_current_config" description:"Write out the current config to STDOUT" no-ini:"true"` WriteManPage bool `hidden:"true" long:"write-man-page" description:"Write out a man page"` }
type RequiredOptions ¶
type RequiredOptions struct { ParserName string `short:"p" long:"parser" description:"Parser module to use. Use --list to list available options."` //WriteKey string `short:"k" long:"writekey" description:"Team write key"` LogFiles []string `` /* 164-byte string literal not displayed */ Dataset string `short:"d" long:"dataset" description:"Name of the dataset"` }
Click to show internal directories.
Click to hide internal directories.