Documentation ¶
Index ¶
Constants ¶
View Source
const (
PLUGIN_STATSD = "statsd"
)
Variables ¶
View Source
var StatsDCommand = cli.Command{ Name: "statsd", Usage: "log metrics for a service, route to a StatsD server", Flags: append(utils.CommonPluginFlags, []cli.Flag{ cli.StringFlag{Name: "host", Value: "127.0.0.1", Usage: "The IP address or host name to send data to"}, cli.IntFlag{Name: "port", Value: 8125, Usage: "The port to send data to on the upstream server"}, cli.StringFlag{Name: "prefix", Value: "kong", Usage: "String to be prefixed to each metric’s name."}, }...), Action: createStatsDPlugin, }
Functions ¶
This section is empty.
Types ¶
type StatsDConfig ¶
type StatsDConfig struct { //The IP address or host name to send data to. Host string `json:"host"` //The port to send data to on the upstream server Port int `json:"port"` //List of Metrics to be logged. Available values are described under Metrics.docs:https://docs.konghq.com/hub/kong-inc/statsd/#metrics Metrics []string `json:"metrics,omitempty"` //String to be prefixed to each metric’s name. Prefix string `json:"prefix,omitempty"` }
type Statsd ¶
type Statsd struct { ID string `json:"ID,omitempty"` //The name of the plugin to use, in this case statsd Name string `json:"name"` //Consumer_id is the id of the Consumer we want to associate with this plugin. ConsumerID string `json:"consumer_id,omitempty"` ServiceID string `json:"service_id,omitempty"` Enabled bool `json:"enabled,omitempty"` Config StatsDConfig `json:"config"` }
Click to show internal directories.
Click to hide internal directories.