Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
水淹萌龙
kubesphere
提交
3e8035dc
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看板
提交
3e8035dc
编写于
4月 30, 2019
作者:
H
huanggze
提交者:
zryfish
5月 05, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update pod metrics
Signed-off-by:
N
huanggze
<
loganhuang@yunify.com
>
上级
3931912f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
3 addition
and
3 deletion
+3
-3
pkg/models/metrics/metricsruleconst.go
pkg/models/metrics/metricsruleconst.go
+3
-3
未找到文件。
pkg/models/metrics/metricsruleconst.go
浏览文件 @
3e8035dc
...
...
@@ -415,7 +415,7 @@ var RulePromQLTmplMap = MetricMap{
"cluster_pod_count"
:
`cluster:pod:sum`
,
"cluster_pod_quota"
:
`sum(kube_node_status_capacity_pods unless on (node) (kube_node_status_condition{condition="Ready",status=~"unknown|false"} > 0))`
,
"cluster_pod_utilisation"
:
`cluster:pod_utilization:ratio`
,
"cluster_pod_running_count"
:
`c
ount(kube_pod_info unless on (pod) (kube_pod_status_phase{phase=~"Failed|Pending|Unknown|Succeeded"} > 0) unless on (node) (kube_node_status_condition{condition="Ready",status=~"unknown|false"} > 0))
`
,
"cluster_pod_running_count"
:
`c
luster:pod_running:count
`
,
"cluster_pod_succeeded_count"
:
`count(kube_pod_info unless on (pod) (kube_pod_status_phase{phase=~"Failed|Pending|Unknown|Running"} > 0) unless on (node) (kube_node_status_condition{condition="Ready",status=~"unknown|false"} > 0))`
,
"cluster_pod_abnormal_count"
:
`cluster:pod_abnormal:sum`
,
...
...
@@ -637,7 +637,7 @@ var RulePromQLTmplMap = MetricMap{
"workspace_pod_count"
:
`sum(kube_pod_status_phase{phase!~"Failed|Succeeded", namespace!="", namespace$1})`
,
"workspace_pod_running_count"
:
`sum(kube_pod_status_phase{phase="Running", namespace!="", namespace$1})`
,
"workspace_pod_succeeded_count"
:
`sum(kube_pod_status_phase{phase="Succeeded", namespace!="", namespace$1})`
,
"workspace_pod_abnormal_count"
:
`
sum(kube_pod_status_phase{phase=~"Failed|Pending|Unknown", namespace!="", namespace$1}
)`
,
"workspace_pod_abnormal_count"
:
`
count(kube_pod_info{node!="", namespace$1} unless on (pod, namespace) (kube_pod_status_phase{job="kube-state-metrics", phase="Succeeded"}>0) unless on (pod, namespace) ((kube_pod_status_ready{job="kube-state-metrics", condition="true"}>0) and on (pod, namespace) (kube_pod_status_phase{job="kube-state-metrics", phase="Running"}>0)) unless on (pod, namespace) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", reason="ContainerCreating"}>0)
)`
,
"workspace_configmap_count_used"
:
`sum(kube_resourcequota{resourcequota!="quota", type="used", namespace!="", namespace$1, resource="count/configmaps"}) by (resource, type)`
,
"workspace_jobs_batch_count_used"
:
`sum(kube_resourcequota{resourcequota!="quota", type="used", namespace!="", namespace$1, resource="count/jobs.batch"}) by (resource, type)`
,
...
...
@@ -676,7 +676,7 @@ var RulePromQLTmplMap = MetricMap{
"workspace_all_project_count"
:
`count(kube_namespace_annotations)`
,
// New in ks 2.0
"workspace_pod_abnormal_ratio"
:
`
sum(kube_pod_status_phase{phase=~"Failed|Pending|Unknown", namespace!="", namespace$1}
) / sum(kube_pod_status_phase{phase!~"Succeeded", namespace!="", namespace$1})`
,
"workspace_pod_abnormal_ratio"
:
`
count(kube_pod_info{node!="", namespace$1} unless on (pod, namespace) (kube_pod_status_phase{job="kube-state-metrics", phase="Succeeded"}>0) unless on (pod, namespace) ((kube_pod_status_ready{job="kube-state-metrics", condition="true"}>0) and on (pod, namespace) (kube_pod_status_phase{job="kube-state-metrics", phase="Running"}>0)) unless on (pod, namespace) (kube_pod_container_status_waiting_reason{job="kube-state-metrics", reason="ContainerCreating"}>0)
) / sum(kube_pod_status_phase{phase!~"Succeeded", namespace!="", namespace$1})`
,
// component
"etcd_server_list"
:
`label_replace(up{job="etcd"}, "node_ip", "$1", "instance", "(.*):.*")`
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录