Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
2861865c
K
kubesphere
项目概览
水淹萌龙
/
kubesphere
与 Fork 源项目一致
Fork自
KubeSphere / kubesphere
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kubesphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
2861865c
编写于
6月 06, 2019
作者:
H
huanggze
提交者:
zryfish
6月 10, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
doc: add monitoring and logging api doc
Signed-off-by:
N
huanggze
<
loganhuang@yunify.com
>
上级
468ef322
变更
6
展开全部
隐藏空白更改
内联
并排
Showing
6 changed file
with
392 addition
and
295 deletion
+392
-295
pkg/apis/logging/v1alpha2/register.go
pkg/apis/logging/v1alpha2/register.go
+141
-112
pkg/apis/monitoring/v1alpha2/register.go
pkg/apis/monitoring/v1alpha2/register.go
+209
-141
pkg/models/log/types.go
pkg/models/log/types.go
+2
-2
pkg/models/metrics/metrics.go
pkg/models/metrics/metrics.go
+7
-7
pkg/simple/client/elasticsearch/esclient.go
pkg/simple/client/elasticsearch/esclient.go
+25
-25
pkg/simple/client/fluentbit/fluentbitcrdclient.go
pkg/simple/client/fluentbit/fluentbitcrdclient.go
+8
-8
未找到文件。
pkg/apis/logging/v1alpha2/register.go
浏览文件 @
2861865c
此差异已折叠。
点击以展开。
pkg/apis/monitoring/v1alpha2/register.go
浏览文件 @
2861865c
此差异已折叠。
点击以展开。
pkg/models/log/types.go
浏览文件 @
2861865c
...
@@ -48,6 +48,6 @@ type FluentbitFiltersResult struct {
...
@@ -48,6 +48,6 @@ type FluentbitFiltersResult struct {
}
}
type
FluentbitOutputsResult
struct
{
type
FluentbitOutputsResult
struct
{
Status
int
`json:"status"`
Status
int
`json:"status"
description:"response status"
`
Outputs
[]
fb
.
OutputPlugin
`json:"outputs,omitempty"`
Outputs
[]
fb
.
OutputPlugin
`json:"outputs,omitempty"
description:"array of fluent bit output plugins"
`
}
}
pkg/models/metrics/metrics.go
浏览文件 @
2861865c
...
@@ -47,19 +47,19 @@ const (
...
@@ -47,19 +47,19 @@ const (
)
)
type
FormatedLevelMetric
struct
{
type
FormatedLevelMetric
struct
{
MetricsLevel
string
`json:"metrics_level"`
MetricsLevel
string
`json:"metrics_level"
description:"metrics level, eg. cluster"
`
Results
[]
FormatedMetric
`json:"results"`
Results
[]
FormatedMetric
`json:"results"
description:"actual array of results"
`
}
}
type
FormatedMetric
struct
{
type
FormatedMetric
struct
{
MetricName
string
`json:"metric_name,omitempty"`
MetricName
string
`json:"metric_name,omitempty"
description:"metrics name, eg. scheduler_up_sum"
`
Status
string
`json:"status"`
Status
string
`json:"status"
description:"result status, one of error, success"
`
Data
FormatedMetricData
`json:"data,omitempty"`
Data
FormatedMetricData
`json:"data,omitempty"
description:"actual metrics result"
`
}
}
type
FormatedMetricData
struct
{
type
FormatedMetricData
struct
{
Result
[]
map
[
string
]
interface
{}
`json:"result"`
Result
[]
map
[
string
]
interface
{}
`json:"result"
description:"result presenting metric labels, a series of time points and their instant values"
`
ResultType
string
`json:"resultType"`
ResultType
string
`json:"resultType"
description:"result type, one of matrix, vector"
`
}
}
type
MetricResultValues
[]
MetricResultValue
type
MetricResultValues
[]
MetricResultValue
...
...
pkg/simple/client/elasticsearch/esclient.go
浏览文件 @
2861865c
...
@@ -286,49 +286,49 @@ func createQueryRequest(param QueryParameters) (int, []byte, error) {
...
@@ -286,49 +286,49 @@ func createQueryRequest(param QueryParameters) (int, []byte, error) {
}
}
type
Response
struct
{
type
Response
struct
{
Status
int
`json:"status"`
Status
int
`json:"status"
description:"query status"
`
Workspace
string
`json:"workspace,omitempty"`
Workspace
string
`json:"workspace,omitempty"
description:"workspace the query was performed against"
`
Shards
Shards
`json:"_shards"`
Shards
Shards
`json:"_shards"
description:"tells shard information"
`
Hits
Hits
`json:"hits"`
Hits
Hits
`json:"hits"
description:"search results"
`
Aggregations
json
.
RawMessage
`json:"aggregations"`
Aggregations
json
.
RawMessage
`json:"aggregations"
description:"aggregation results"
`
}
}
type
Shards
struct
{
type
Shards
struct
{
Total
int64
`json:"total"`
Total
int64
`json:"total"
description:"tells how many shards were searched"
`
Successful
int64
`json:"successful"`
Successful
int64
`json:"successful"
description:"count of the successful searched shards"
`
Skipped
int64
`json:"skipped"`
Skipped
int64
`json:"skipped"
description:"count of the skipped searched shards"
`
Failed
int64
`json:"failed"`
Failed
int64
`json:"failed"
description:"count of the failed searched shards"
`
}
}
type
Hits
struct
{
type
Hits
struct
{
Total
int64
`json:"total"`
Total
int64
`json:"total"
description:"total number of documents matching our search criteria"
`
Hits
[]
Hit
`json:"hits"`
Hits
[]
Hit
`json:"hits"
description:"actual array of search results"
`
}
}
type
Hit
struct
{
type
Hit
struct
{
Source
Source
`json:"_source"`
Source
Source
`json:"_source"
description:"search result item"
`
HighLight
HighLight
`json:"highlight"`
HighLight
HighLight
`json:"highlight"
description:"highlighted log fragment"
`
Sort
[]
int64
`json:"sort"`
Sort
[]
int64
`json:"sort"
description:"sort key for results"
`
}
}
type
Source
struct
{
type
Source
struct
{
Log
string
`json:"log"`
Log
string
`json:"log"
description:"the log message"
`
Time
string
`json:"time"`
Time
string
`json:"time"
description:"log timestamp"
`
Kubernetes
Kubernetes
`json:"kubernetes"`
Kubernetes
Kubernetes
`json:"kubernetes"
description:"kubernetes addon information on the log"
`
}
}
type
Kubernetes
struct
{
type
Kubernetes
struct
{
Namespace
string
`json:"namespace_name"`
Namespace
string
`json:"namespace_name"
description:"the namespace the log is from"
`
Pod
string
`json:"pod_name"`
Pod
string
`json:"pod_name"
description:"the pod the log is from"
`
Container
string
`json:"container_name"`
Container
string
`json:"container_name"
description:"the container the log is from"
`
Host
string
`json:"host"`
Host
string
`json:"host"
description:"the node the log if from"
`
}
}
type
HighLight
struct
{
type
HighLight
struct
{
LogHighLights
[]
string
`json:"log,omitempty"`
LogHighLights
[]
string
`json:"log,omitempty"
description:"log messages to highlight"
`
NamespaceHighLights
[]
string
`json:"kubernetes.namespace_name.keyword,omitempty"`
NamespaceHighLights
[]
string
`json:"kubernetes.namespace_name.keyword,omitempty"
description:"namespaces to highlight"
`
PodHighLights
[]
string
`json:"kubernetes.pod_name.keyword,omitempty"`
PodHighLights
[]
string
`json:"kubernetes.pod_name.keyword,omitempty"
description:"pods to highlight"
`
ContainerHighLights
[]
string
`json:"kubernetes.container_name.keyword,omitempty"`
ContainerHighLights
[]
string
`json:"kubernetes.container_name.keyword,omitempty"
description:"containers to highlight"
`
}
}
type
LogRecord
struct
{
type
LogRecord
struct
{
...
...
pkg/simple/client/fluentbit/fluentbitcrdclient.go
浏览文件 @
2861865c
...
@@ -64,24 +64,24 @@ type FluentBitStatus struct {
...
@@ -64,24 +64,24 @@ type FluentBitStatus struct {
// Plugin struct for fluent-bit plugins
// Plugin struct for fluent-bit plugins
type
Plugin
struct
{
type
Plugin
struct
{
Type
string
`json:"type"`
Type
string
`json:"type"
description:"output plugin type, eg. fluentbit-output-es"
`
Name
string
`json:"name"`
Name
string
`json:"name"
description:"output plugin name, eg. fluentbit-output-es"
`
Parameters
[]
Parameter
`json:"parameters"`
Parameters
[]
Parameter
`json:"parameters"
description:"output plugin configuration parameters"
`
}
}
// Fluent-bit output plugins
// Fluent-bit output plugins
type
OutputPlugin
struct
{
type
OutputPlugin
struct
{
Plugin
Plugin
Id
string
`json:"id"`
Id
string
`json:"id
,omitempty" description:"output plugin uuid
"`
Enable
bool
`json:"enable"`
Enable
bool
`json:"enable"
description:"current output plugin status, one of true, false"
`
Updatetime
time
.
Time
`json:"updatetime,omitempty"`
Updatetime
time
.
Time
`json:"updatetime,omitempty"
description:"last updatetime of the output plugin"
`
}
}
// Parameter generic parameter type to handle values from different sources
// Parameter generic parameter type to handle values from different sources
type
Parameter
struct
{
type
Parameter
struct
{
Name
string
`json:"name"`
Name
string
`json:"name"
description:"configuration parameter key, eg. Name. refer to fluent bit official doc for more information."
`
ValueFrom
*
ValueFrom
`json:"valueFrom,omitempty"`
ValueFrom
*
ValueFrom
`json:"valueFrom,omitempty"`
Value
string
`json:"value"`
Value
string
`json:"value"
description:"configuration parameter value, eg. es. refer to fluent bit official doc for more information."
`
}
}
// ValueFrom generic type to determine value origin
// ValueFrom generic type to determine value origin
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录