Documentation
¶
Index ¶
- Constants
- Variables
- func ConfigLogger() error
- func LoadRuntimeConfFromFileOnce() error
- func Mkdir_p_logdir(logfile string)
- func UpdateRuntimeConf(conf *RuntimeConfig)
- func WatchConfig() <-chan *RespConfig
- func WatchRuntimeConfFromEtcd(stop chan bool) <-chan *RespConfig
- type Conf_cmd
- type Conf_ping
- type Conf_win_pdh
- type Conf_win_pdh_query
- type Conf_win_wmi
- type Conf_win_wmi_query
- type Conf_win_wmi_query_metric
- type CoreConfig
- type RespConfig
- type RuntimeConfig
- type Transport_file
- type Transport_influxdb
- type Transport_stdout
Constants ¶
View Source
const (
// LOG_FORMAT = "%Date(2006-01-02T15:04:05.00 MST) [%Level] %RelFile:%Line(%FuncShort) %Msg%n"
LOG_FORMAT = "%Date(2006-01-02T15:04:05.00 MST) [%Level] %File:%Line(%FuncShort) %Msg%n"
)
View Source
const (
VERSION = "v0.0.1"
)
Variables ¶
View Source
var ( LOG_DIR = "" SHARED_DIR = "" CONF_FILEPATH = "" CORE_CONF_FILEPATH = "" LOG_FILE = "hickwall.log" LOG_FILEPATH = "" CoreConf CoreConfig // only file RuntimeConfChan = make(chan *RuntimeConfig, 1) )
View Source
var (
Logger log.LoggerInterface
)
Functions ¶
func ConfigLogger ¶
func ConfigLogger() error
func LoadRuntimeConfFromFileOnce ¶ added in v0.1.1
func LoadRuntimeConfFromFileOnce() error
func Mkdir_p_logdir ¶
func Mkdir_p_logdir(logfile string)
func UpdateRuntimeConf ¶ added in v0.1.1
func UpdateRuntimeConf(conf *RuntimeConfig)
func WatchConfig ¶ added in v0.1.1
func WatchConfig() <-chan *RespConfig
func WatchRuntimeConfFromEtcd ¶ added in v0.1.1
func WatchRuntimeConfFromEtcd(stop chan bool) <-chan *RespConfig
Types ¶
type Conf_win_pdh ¶
type Conf_win_pdh struct { Tags map[string]string `json:"tags"` Interval string `json:"interval"` Queries []Conf_win_pdh_query `json:"queries"` }
type Conf_win_pdh_query ¶
type Conf_win_wmi ¶
type Conf_win_wmi struct { Tags map[string]string `json:"tags"` Interval string `json:"interval"` Queries []Conf_win_wmi_query `json:"queries"` }
type Conf_win_wmi_query ¶
type Conf_win_wmi_query struct { Query string `json:"query"` Tags map[string]string `json:"tags"` Metrics []Conf_win_wmi_query_metric `json:"metrics"` }
type CoreConfig ¶ added in v0.1.1
type CoreConfig struct { // Log_console_level string // always 'info' Log_level string `json:"log_level"` Log_file_maxsize int `json:"log_file_maxsize"` Log_file_maxrolls int `json:"log_file_maxrolls"` Etcd_enabled bool `json:"etcd_enabled"` Etcd_url string `json:"etcd_url"` Etcd_path string `json:"etcd_path"` Heart_beat_interval string `json:"heart_beat_interval"` }
type RespConfig ¶ added in v0.1.1
type RespConfig struct { Config *RuntimeConfig Err error }
type RuntimeConfig ¶ added in v0.1.1
type RuntimeConfig struct { Hostname string Heartbeat_interval string Tags map[string]string `json:"tags"` Client_metric_enabled bool `json:"client_metric_enabled"` Client_metric_interval string `json:"client_metric_interval"` Transport_stdout Transport_stdout `json:"transport_stdout"` Transport_file Transport_file `json:"transport_file"` Transport_graphite_hosts []string `json:"transport_graphite_hosts"` Transport_influxdb []Transport_influxdb `json:"transport_influxdb"` Collector_win_pdh []Conf_win_pdh `json:"collector_win_pdh"` Collector_win_wmi []Conf_win_wmi `json:"collector_win_wmi"` Collector_mysql_query []c_mysql_query `json:"collector_mysql_query"` Collector_ping []Conf_ping `json:"collector_ping"` Collector_cmd []Conf_cmd `json:"collector_cmd"` }
func GetRuntimeConf ¶ added in v0.1.1
func GetRuntimeConf() *RuntimeConfig
type Transport_file ¶ added in v0.1.1
type Transport_influxdb ¶
type Transport_influxdb struct { Version string `json:"version"` Enabled bool `json:"enabled"` Interval string `json:"interval"` Max_batch_size int `json:"max_match_size"` Max_queue_size int64 `json:"max_queue_size"` // Client Config // for v0.8.8 Host string `json:"host"` // for v0.9.0 URL string `json:"url"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` // Write Config RetentionPolicy string `json:"retentionpolicy"` FlatTemplate string `json:"flattemplate"` Backfill_enabled bool `json:"backfill_enabled"` Backfill_interval string `json:"backfill_interval"` Backfill_handsoff bool `json:"backfill_handsoff"` Backfill_latency_threshold_ms int `json:"backfill_latency_threshold_ms"` Backfill_cool_down string `json:"backfill_cool_down"` // try best to merge small group of points to no more than max_batch_size Merge_Requests bool `json:"merge_requests"` }
type Transport_stdout ¶ added in v0.1.1
type Transport_stdout struct {
Enabled bool `json:"enabled"`
}
Click to show internal directories.
Click to hide internal directories.