Documentation ¶
Index ¶
- Constants
- Variables
- func IsModifiedOnlyDatasource(datasource string) bool
- func MakeCreateTableLocal(t *ckdb.Table, db, dstTable, aggrSummable, aggrUnsummable string) string
- func MakeGlobalTableCreateSQL(t *ckdb.Table, db, dstTable string) string
- func MakeMVTableCreateSQL(t *ckdb.Table, db, dstTable, aggrSummable, aggrUnsummable string, ...) string
- type ActionEnum
- type AddBody
- type AggrEnum
- type DatasourceInfo
- type DatasourceManager
- type DatasourceModifiedOnly
- type DelBody
- type IntervalEnum
- type JsonResp
- type ModBody
- type TableType
Constants ¶
View Source
const ( DATASOURCE_PORT = 20106 MAX_DATASOURCE_COUNT = 64 )
View Source
const ( ORIGIN_TABLE_1M = "1m" ORIGIN_TABLE_1S = "1s" NETWORK = "network" APPLICATION = "application" TRAFFIC_POLICY = "traffic_policy" FLOW_TAG_DB = "flow_tag" ERR_IS_MODIFYING = "Modifying the retention time (%s), please try again later" )
View Source
const ( DEEPFLOW_SYSTEM DatasourceModifiedOnly = "deepflow_system" L4_FLOW_LOG = "flow_log.l4_flow_log" L7_FLOW_LOG = "flow_log.l7_flow_log" L4_PACKET = "flow_log.l4_packet" L7_PACKET = "flow_log.l7_packet" EXT_METRICS = "ext_metrics" PROMETHEUS = "prometheus" EVENT_EVENT = "event.event" EVENT_PERF_EVENT = "event.perf_event" EVENT_ALERT_EVENT = "event.alert_event" PROFILE = "profile.in_process" APPLOG = "application_log.log" DEEPFLOW_TENANT = "deepflow_tenant" DEEPFLOW_ADMIN = "deepflow_admin" )
Variables ¶
View Source
var DatasourceModifiedOnlyIDMap = map[DatasourceModifiedOnly]DatasourceInfo{ DEEPFLOW_SYSTEM: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 1, "deepflow_system", []string{"deepflow_system"}, []string{}}, L4_FLOW_LOG: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 2, "flow_log", []string{"l4_flow_log"}, []string{}}, L7_FLOW_LOG: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 3, "flow_log", []string{"l7_flow_log"}, []string{}}, L4_PACKET: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 4, "flow_log", []string{"l4_packet"}, []string{}}, L7_PACKET: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 5, "flow_log", []string{"l7_packet"}, []string{}}, EXT_METRICS: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 6, "ext_metrics", []string{"metrics"}, []string{}}, PROMETHEUS: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 7, "prometheus", []string{"samples"}, []string{"prometheus_custom_field", "prometheus_custom_field_value"}}, EVENT_EVENT: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 8, "event", []string{"event"}, []string{}}, EVENT_PERF_EVENT: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 9, "event", []string{"perf_event"}, []string{}}, EVENT_ALERT_EVENT: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 10, "event", []string{"alert_event"}, []string{}}, PROFILE: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 11, "profile", []string{"in_process"}, []string{}}, APPLOG: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 12, "application_log", []string{"log"}, []string{}}, DEEPFLOW_TENANT: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 13, "deepflow_tenant", []string{"deepflow_collector"}, []string{}}, DEEPFLOW_ADMIN: {int(flow_metrics.METRICS_TABLE_ID_MAX) + 14, "deepflow_admin", []string{"deepflow_server"}, []string{}}, }
to modify the datasource TTL, you need to also modify the 'flow_tag' database tables. FIXME: only the 'prometheus' database is supported now, and the remaining databases will be completed in the future.
Functions ¶
func MakeCreateTableLocal ¶
func MakeMVTableCreateSQL ¶
Types ¶
type ActionEnum ¶
type ActionEnum uint8
const ( ADD ActionEnum = iota DEL MOD )
func ActionToEnum ¶
func ActionToEnum(action string) (ActionEnum, error)
type DatasourceInfo ¶
type DatasourceManager ¶
type DatasourceManager struct {
// contains filtered or unexported fields
}
func NewDatasourceManager ¶
func NewDatasourceManager(cfg *config.Config, readTimeout int) *DatasourceManager
func (*DatasourceManager) Close ¶
func (m *DatasourceManager) Close() error
func (*DatasourceManager) Handle ¶
func (m *DatasourceManager) Handle(orgID int, action ActionEnum, dbGroup, baseTable, dstTable, aggrSummable, aggrUnsummable string, interval, duration int) error
func (*DatasourceManager) RegisterHandlers ¶
func (m *DatasourceManager) RegisterHandlers()
func (*DatasourceManager) Start ¶
func (m *DatasourceManager) Start()
type DatasourceModifiedOnly ¶
type DatasourceModifiedOnly string
func (DatasourceModifiedOnly) DatasourceInfo ¶
func (ds DatasourceModifiedOnly) DatasourceInfo() DatasourceInfo
Click to show internal directories.
Click to hide internal directories.