Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Juicedata
JuiceFS
提交
61278633
JuiceFS
项目概览
Juicedata
/
JuiceFS
通知
10
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
JuiceFS
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
61278633
编写于
3月 19, 2021
作者:
D
Davies Liu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup P8s metrics
上级
2c833f33
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
22 addition
and
21 deletion
+22
-21
cmd/mount.go
cmd/mount.go
+7
-6
pkg/chunk/cached_store.go
pkg/chunk/cached_store.go
+6
-6
pkg/meta/redis_metrics.go
pkg/meta/redis_metrics.go
+2
-2
pkg/object/metrics.go
pkg/object/metrics.go
+3
-3
pkg/vfs/accesslog.go
pkg/vfs/accesslog.go
+1
-1
pkg/vfs/handle.go
pkg/vfs/handle.go
+1
-1
pkg/vfs/vfs.go
pkg/vfs/vfs.go
+2
-2
未找到文件。
cmd/mount.go
浏览文件 @
61278633
...
...
@@ -45,23 +45,23 @@ import (
var
(
cpu
=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
cpu_usage"
,
Name
:
"cpu_usage"
,
Help
:
"Accumulated CPU usage in seconds."
,
})
memory
=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
memory"
,
Name
:
"memory"
,
Help
:
"Used memory in bytes."
,
})
uptime
=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
uptime"
,
Name
:
"uptime"
,
Help
:
"Total running time in seconds."
,
})
usedSpace
=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
used_space"
,
Name
:
"used_space"
,
Help
:
"Total used space in bytes."
,
})
usedInodes
=
prometheus
.
NewGauge
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
used_inodes"
,
Name
:
"used_inodes"
,
Help
:
"Total number of inodes."
,
})
)
...
...
@@ -153,7 +153,8 @@ func mount(c *cli.Context) error {
"mp"
:
mp
,
}
// Wrap the default registry, all prometheus.MustRegister() calls should be afterwards
prometheus
.
DefaultRegisterer
=
prometheus
.
WrapRegistererWith
(
mntLabels
,
prometheus
.
DefaultRegisterer
)
prometheus
.
DefaultRegisterer
=
prometheus
.
WrapRegistererWith
(
mntLabels
,
prometheus
.
WrapRegistererWithPrefix
(
"juicefs_"
,
prometheus
.
DefaultRegisterer
))
chunkConf
:=
chunk
.
Config
{
BlockSize
:
format
.
BlockSize
*
1024
,
...
...
pkg/chunk/cached_store.go
浏览文件 @
61278633
...
...
@@ -42,19 +42,19 @@ var (
logger
=
utils
.
GetLogger
(
"juicefs"
)
cacheHits
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
blockcache_hits"
,
Name
:
"blockcache_hits"
,
Help
:
"read from cached block"
,
})
cacheMiss
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
blockcache_miss"
,
Name
:
"blockcache_miss"
,
Help
:
"missed read from cached block"
,
})
cacheHitBytes
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
blockcache_hit_bytes"
,
Name
:
"blockcache_hit_bytes"
,
Help
:
"read bytes from cached block"
,
})
cacheMissBytes
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
blockcache_miss_bytes"
,
Name
:
"blockcache_miss_bytes"
,
Help
:
"missed bytes from cached block"
,
})
)
...
...
@@ -682,7 +682,7 @@ func NewCachedStore(storage object.ObjectStorage, config Config) ChunkStore {
_
=
prometheus
.
Register
(
cacheMissBytes
)
_
=
prometheus
.
Register
(
prometheus
.
NewGaugeFunc
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
blockcache_blocks"
,
Name
:
"blockcache_blocks"
,
Help
:
"number of cached blocks"
,
},
func
()
float64
{
...
...
@@ -691,7 +691,7 @@ func NewCachedStore(storage object.ObjectStorage, config Config) ChunkStore {
}))
_
=
prometheus
.
Register
(
prometheus
.
NewGaugeFunc
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
blockcache_bytes"
,
Name
:
"blockcache_bytes"
,
Help
:
"number of cached bytes"
,
},
func
()
float64
{
...
...
pkg/meta/redis_metrics.go
浏览文件 @
61278633
...
...
@@ -19,12 +19,12 @@ import "github.com/prometheus/client_golang/prometheus"
var
(
redisTxDist
=
prometheus
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Name
:
"
juicefs_
redis_tx_durations_histogram_seconds"
,
Name
:
"redis_tx_durations_histogram_seconds"
,
Help
:
"Redis transactions latency distributions."
,
Buckets
:
prometheus
.
ExponentialBuckets
(
0.0001
,
1.5
,
30
),
})
redisTxRestart
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
redis_transaction_restart"
,
Name
:
"redis_transaction_restart"
,
Help
:
"The number of times a Redis transaction is restarted."
,
})
)
...
...
pkg/object/metrics.go
浏览文件 @
61278633
...
...
@@ -24,16 +24,16 @@ import (
var
(
reqsHistogram
=
prometheus
.
NewHistogramVec
(
prometheus
.
HistogramOpts
{
Name
:
"
juicefs_
object_request_durations_histogram_seconds"
,
Name
:
"object_request_durations_histogram_seconds"
,
Help
:
"Object requests latency distributions."
,
Buckets
:
prometheus
.
ExponentialBuckets
(
0.01
,
1.5
,
20
),
},
[]
string
{
"method"
})
reqErrors
=
prometheus
.
NewCounter
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
object_request_errors"
,
Name
:
"object_request_errors"
,
Help
:
"failed requests to object store"
,
})
dataBytes
=
prometheus
.
NewCounterVec
(
prometheus
.
CounterOpts
{
Name
:
"
juicefs_
object_request_data_bytes"
,
Name
:
"object_request_data_bytes"
,
Help
:
"Object requests size in bytes."
,
},
[]
string
{
"method"
})
)
...
...
pkg/vfs/accesslog.go
浏览文件 @
61278633
...
...
@@ -26,7 +26,7 @@ import (
var
(
opsDurationsHistogram
=
prometheus
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Name
:
"
juicefs_
fuse_ops_durations_histogram_seconds"
,
Name
:
"fuse_ops_durations_histogram_seconds"
,
Help
:
"Operations latency distributions."
,
Buckets
:
prometheus
.
ExponentialBuckets
(
0.0001
,
1.5
,
30
),
})
...
...
pkg/vfs/handle.go
浏览文件 @
61278633
...
...
@@ -27,7 +27,7 @@ import (
var
(
handlersGause
=
prometheus
.
NewGaugeFunc
(
prometheus
.
GaugeOpts
{
Name
:
"
juicefs_
fuse_open_handlers"
,
Name
:
"fuse_open_handlers"
,
Help
:
"number of open files and directories."
,
},
func
()
float64
{
hanleLock
.
Lock
()
...
...
pkg/vfs/vfs.go
浏览文件 @
61278633
...
...
@@ -54,12 +54,12 @@ var (
var
(
readSizeHistogram
=
prometheus
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Name
:
"
juicefs_
fuse_read_size_bytes"
,
Name
:
"fuse_read_size_bytes"
,
Help
:
"size of read distributions."
,
Buckets
:
prometheus
.
LinearBuckets
(
4096
,
4096
,
32
),
})
writtenSizeHistogram
=
prometheus
.
NewHistogram
(
prometheus
.
HistogramOpts
{
Name
:
"
juicefs_
fuse_written_size_bytes"
,
Name
:
"fuse_written_size_bytes"
,
Help
:
"size of write distributions."
,
Buckets
:
prometheus
.
LinearBuckets
(
4096
,
4096
,
32
),
})
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录