Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // InfluxDB Configurations Address string `json:"influxdb_address"` Timeout time.Duration `json:"influxdb_timeout"` Database string `json:"influxdb_database"` Org string `json:"influxdb_org"` Bucket string `json:"influxdb_bucket"` Token string `json:"influxdb_token"` Precision string `json:"influxdb_precision"` // Enable syslog format for chronograf logviewer usage Syslog bool `json:"syslog_enabled"` Facility string `json:"syslog_facility"` FacilityCode int `json:"syslog_facility_code"` AppName string `json:"syslog_app_name"` Version string `json:"syslog_app_version"` // Minimum level for push MinLevel string `json:"syslog_min_level"` // Logrus tags Tags []string `json:"logrus_tags"` // Defaults Measurement string `json:"measurement"` // Batching BatchInterval uint `json:"batch_interval"` // Defaults to 5s. BatchCount uint `json:"batch_count"` // Defaults to 200. MaxBufferLog int `json:"max_buffer_log"` }
Config handles InfluxDB configuration, Logrus tags and batching inserts to InfluxDB
type InfluxDBHook ¶
type InfluxDBHook struct { sync.Mutex // TODO: we should clean up all of these locks // contains filtered or unexported fields }
InfluxDBHook delivers logs to an InfluxDB cluster.
func NewInfluxDBHook ¶
func NewInfluxDBHook(config *Config, batching ...bool) (hook *InfluxDBHook, err error)
func (*InfluxDBHook) Levels ¶
func (hook *InfluxDBHook) Levels() []logrus.Level
Levels are the available logging levels.
Click to show internal directories.
Click to hide internal directories.