LogInfo

package
v0.0.0-...-9b4c606 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ESUrl string = "http://192.168.100.224:8056"
)

Variables

View Source
var (
	QueryNoResult = gin.H{
		"return_code": 400,
		"err_info":    "query not found",
	}
	ConnElasticsearchErr = gin.H{
		"return_code": 401,
		"err_info":    "elastic search connection error",
	}
	ErrElasticsearch = gin.H{
		"return_code": 402,
		"err_info":    "elastic search error",
	}
	InvalidQuery = gin.H{
		"return_code": 403,
		"err_info":    "invalid query",
	}

	/* m3 := map[string]string{
	   "a": "aa",
	   "b": "bb",
	 }*/
	ArgEsHost = flag.String("elasticsearch_cluster_host", "http://172.16.10.169:9200", "host1:port1, host2:port2")

	EsHostArr = strings.Split(*ArgEsHost, ",")
)

Functions

func QueryAppLog

func QueryAppLog(c *gin.Context, queryInfo Common.QueryLogJson)

func QueryContainerLog

func QueryContainerLog(c *gin.Context, queryInfo Common.QueryLogJson)

func QueryCustomInfo

func QueryCustomInfo(c *gin.Context)

func QueryCustomLog

func QueryCustomLog(c *gin.Context, queryInfo Common.QueryLogJson)

func QueryLogInfo

func QueryLogInfo(c *gin.Context)

Types

type SContainerLogger

type SContainerLogger struct {
	Type string `json:"type"`
	Data struct {
		Container_uuid string `json:"container_uuid"`
		Environment_id string `json:"environment_id"`
		Namespace      string `json:"namespace"`
		Container_name string `json:"container_name"`
		Timestamp      string `json:"timestamp"`
		Log_info       struct {
			Log_time string `json:"log_time"`
			Source   string `json:"source"`
			Message  string `json:"message"`
		} `json:"log_info"`
	} `json:"data"`
}

type SCustomLogger

type SCustomLogger struct {
	Type string `json:"type"`
	Data struct {
		Container_uuid string `json:"container_uuid"`
		Environment_id string `json:"environment_id"`
		App_file       string `json:"app_file"`
		Timestamp      string `json:"timestamp"`
		Log_info       struct {
			Log_time  string `json:"log_time"`
			Warn_type string `json:"warn_type"`
			Message   string `json:"message"`
		} `json:"log_info"`
	} `json:"data"`
}

type SFileLogger

type SFileLogger struct {
	File_name      string `json:"file_name"`
	Log_start_time string `json:"log_start_time"`
	Log_end_time   string `json:"log_end_time"`
}

type SMysqlLogger

type SMysqlLogger struct {
	Type string `json:"type"`
	Data struct {
		Container_uuid string `json:"container_uuid"`
		Environment_id string `json:"environment_id"`
		Namespace      string `json:"namespace"`
		Container_name string `json:"container_name"`
		App_file       string `json:"app_file"`
		Timestamp      string `json:"timestamp"`
		Log_info       struct {
			Log_time  string `json:"log_time"`
			Warn_type string `json:"warn_type"`
			Message   string `json:"message"`
		} `json:"log_info"`
	} `json:"data"`
}

type SNginxLogger

type SNginxLogger struct {
	Type string `json:"type"`
	Data struct {
		Container_uuid string `json:"container_uuid"`
		Environment_id string `json:"environment_id"`
		Container_name string `json:"container_name"`
		Namespace      string `json:"namespace"`
		App_file       string `json:"app_file"`
		Timestamp      string `json:"timestamp"`
		Log_info       struct {
			Log_time       string `json:"log_time"`
			Remote         string `json:"remote"`
			Host           string `json:"host"`
			Container_uuid string `json:"user"`
			User           string `json:"method"`
			Path           string `json:"path"`
			Code           string `json:"code"`
			Size           string `json:"size"`
			Referer        string `json:"referer"`
			Agent          string `json:"agent"`
		} `json:"log_info"`
	} `json:"data"`
}

type SQueryContainerLogResult

type SQueryContainerLogResult struct {
	Return_code                 int64              `json:"return_code"`
	Current_query_result_length int64              `json:"current_query_result_length"`
	All_query_result_length     int64              `json:"all_query_result_length"`
	Type                        string             `json:"type"`
	Query_result                []SContainerLogger `json:"query_result"`
}

type SQueryCustomFileResult

type SQueryCustomFileResult struct {
	Return_code  int64         `json:"return_code"`
	Type         string        `json:"type"`
	Query_result []SFileLogger `json:"query_result"`
}

type SQueryCustomLogResult

type SQueryCustomLogResult struct {
	Return_code                 int64           `json:"return_code"`
	Current_query_result_length int64           `json:"current_query_result_length"`
	All_query_result_length     int64           `json:"all_query_result_length"`
	Type                        string          `json:"type"`
	Query_result                []SCustomLogger `json:"query_result"`
}

type SQueryMysqlLogResult

type SQueryMysqlLogResult struct {
	Return_code                 int64          `json:"return_code"`
	Current_query_result_length int64          `json:"current_query_result_length"`
	All_query_result_length     int64          `json:"all_query_result_length"`
	Type                        string         `json:"type"`
	Query_result                []SMysqlLogger `json:"query_result"`
}

type SQueryNginxLogResult

type SQueryNginxLogResult struct {
	Return_code                 int64          `json:"return_code"`
	Current_query_result_length int64          `json:"current_query_result_length"`
	All_query_result_length     int64          `json:"all_query_result_length"`
	Type                        string         `json:"type"`
	Query_result                []SNginxLogger `json:"query_result"`
}

type SQueryRedisLogResult

type SQueryRedisLogResult struct {
	Return_code                 int64          `json:"return_code"`
	Current_query_result_length int64          `json:"current_query_result_length"`
	All_query_result_length     int64          `json:"all_query_result_length"`
	Type                        string         `json:"type"`
	Query_result                []SRedisLogger `json:"query_result"`
}

type SRedisLogger

type SRedisLogger struct {
	Type string `json:"type"`
	Data struct {
		Container_uuid string `json:"container_uuid"`
		Environment_id string `json:"environment_id"`
		Namespace      string `json:"namespace"`
		Container_name string `json:"container_name"`
		App_file       string `json:"app_file"`
		Timestamp      string `json:"timestamp"`
		Log_info       struct {
			Log_time  string `json:"log_time"`
			Warn_type string `json:"warn_type"`
			Message   string `json:"message"`
		} `json:"log_info"`
	} `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL