refactor: builtin tpl gets api (#2760)

This commit is contained in:
Yening Qin 2025-06-27 19:45:28 +08:00 committed by GitHub
parent a938ea3e56
commit 4945e98200
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 7304 additions and 1116 deletions

View File

@ -3,11 +3,15 @@ package integration
import (
"encoding/json"
"path"
"sort"
"strings"
"time"
"github.com/ccfos/nightingale/v6/models"
"github.com/ccfos/nightingale/v6/pkg/ctx"
"github.com/pkg/errors"
"github.com/toolkits/pkg/container/set"
"github.com/toolkits/pkg/file"
"github.com/toolkits/pkg/logger"
"github.com/toolkits/pkg/runner"
@ -15,7 +19,18 @@ import (
const SYSTEM = "system"
var BuiltinPayloadInFile *BuiltinPayloadInFileType
type BuiltinPayloadInFileType struct {
Data map[uint64]map[string]map[string][]*models.BuiltinPayload // map[componet_id]map[type]map[cate][]*models.BuiltinPayload
IndexData map[int64]*models.BuiltinPayload // map[uuid]payload
BuiltinMetrics map[string]*models.BuiltinMetric
}
func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
BuiltinPayloadInFile = NewBuiltinPayloadInFileType()
err := models.InitBuiltinPayloads(ctx)
if err != nil {
logger.Warning("init old builtinPayloads fail ", err)
@ -146,11 +161,10 @@ func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
}
newAlerts := []models.AlertRule{}
writeAlertFileFlag := false
for _, alert := range alerts {
if alert.UUID == 0 {
writeAlertFileFlag = true
alert.UUID = time.Now().UnixNano()
time.Sleep(time.Microsecond)
alert.UUID = time.Now().UnixMicro()
}
newAlerts = append(newAlerts, alert)
@ -169,47 +183,11 @@ func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
Tags: alert.AppendTags,
Content: string(content),
UUID: alert.UUID,
ID: alert.UUID,
}
BuiltinPayloadInFile.addBuiltinPayload(&builtinAlert)
old, err := models.BuiltinPayloadGet(ctx, "uuid = ?", alert.UUID)
if err != nil {
logger.Warning("get builtin alert fail ", builtinAlert, err)
continue
}
if old == nil {
err := builtinAlert.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin alert fail ", builtinAlert, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.ComponentID = component.ID
old.Content = string(content)
old.Name = alert.Name
old.Tags = alert.AppendTags
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin alert:%+v fail %v", builtinAlert, err)
}
}
}
if writeAlertFileFlag {
bs, err = json.MarshalIndent(newAlerts, "", " ")
if err != nil {
logger.Warning("marshal builtin alerts fail ", newAlerts, err)
continue
}
_, err = file.WriteBytes(fp, bs)
if err != nil {
logger.Warning("write builtin alerts file fail ", f, err)
}
}
}
}
@ -261,32 +239,9 @@ func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
Tags: dashboard.Tags,
Content: string(content),
UUID: dashboard.UUID,
ID: dashboard.UUID,
}
old, err := models.BuiltinPayloadGet(ctx, "uuid = ?", dashboard.UUID)
if err != nil {
logger.Warning("get builtin alert fail ", builtinDashboard, err)
continue
}
if old == nil {
err := builtinDashboard.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin alert fail ", builtinDashboard, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.ComponentID = component.ID
old.Content = string(content)
old.Name = dashboard.Name
old.Tags = dashboard.Tags
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin alert:%+v fail %v", builtinDashboard, err)
}
}
BuiltinPayloadInFile.addBuiltinPayload(&builtinDashboard)
}
} else if err != nil {
logger.Warningf("read builtin component dash dir fail %s %v", component.Ident, err)
@ -304,64 +259,21 @@ func Init(ctx *ctx.Context, builtinIntegrationsDir string) {
}
metrics := []models.BuiltinMetric{}
newMetrics := []models.BuiltinMetric{}
err = json.Unmarshal(bs, &metrics)
if err != nil {
logger.Warning("parse builtin component metrics file fail", f, err)
continue
}
writeMetricFileFlag := false
for _, metric := range metrics {
if metric.UUID == 0 {
writeMetricFileFlag = true
metric.UUID = time.Now().UnixNano()
time.Sleep(time.Microsecond)
metric.UUID = time.Now().UnixMicro()
}
newMetrics = append(newMetrics, metric)
metric.ID = metric.UUID
old, err := models.BuiltinMetricGet(ctx, "uuid = ?", metric.UUID)
if err != nil {
logger.Warning("get builtin metrics fail ", metric, err)
continue
}
if old == nil {
err := metric.Add(ctx, SYSTEM)
if err != nil {
logger.Warning("add builtin metrics fail ", metric, err)
}
continue
}
if old.UpdatedBy == SYSTEM {
old.Collector = metric.Collector
old.Typ = metric.Typ
old.Name = metric.Name
old.Unit = metric.Unit
old.Note = metric.Note
old.Lang = metric.Lang
old.Expression = metric.Expression
err = models.DB(ctx).Model(old).Select("*").Updates(old).Error
if err != nil {
logger.Warningf("update builtin metric:%+v fail %v", metric, err)
}
}
BuiltinPayloadInFile.BuiltinMetrics[metric.Expression] = &metric
}
if writeMetricFileFlag {
bs, err = json.MarshalIndent(newMetrics, "", " ")
if err != nil {
logger.Warning("marshal builtin metrics fail ", newMetrics, err)
continue
}
_, err = file.WriteBytes(fp, bs)
if err != nil {
logger.Warning("write builtin metrics file fail ", f, err)
}
}
}
} else if err != nil {
logger.Warningf("read builtin component metrics dir fail %s %v", component.Ident, err)
@ -387,3 +299,304 @@ type BuiltinBoard struct {
Hide int `json:"hide"` // 0: false, 1: true
UUID int64 `json:"uuid"`
}
func NewBuiltinPayloadInFileType() *BuiltinPayloadInFileType {
return &BuiltinPayloadInFileType{
Data: make(map[uint64]map[string]map[string][]*models.BuiltinPayload),
IndexData: make(map[int64]*models.BuiltinPayload),
BuiltinMetrics: make(map[string]*models.BuiltinMetric),
}
}
func (b *BuiltinPayloadInFileType) addBuiltinPayload(bp *models.BuiltinPayload) {
if _, exists := b.Data[bp.ComponentID]; !exists {
b.Data[bp.ComponentID] = make(map[string]map[string][]*models.BuiltinPayload)
}
bpInType := b.Data[bp.ComponentID]
if _, exists := bpInType[bp.Type]; !exists {
bpInType[bp.Type] = make(map[string][]*models.BuiltinPayload)
}
bpInCate := bpInType[bp.Type]
if _, exists := bpInCate[bp.Cate]; !exists {
bpInCate[bp.Cate] = make([]*models.BuiltinPayload, 0)
}
bpInCate[bp.Cate] = append(bpInCate[bp.Cate], bp)
b.IndexData[bp.UUID] = bp
}
func (b *BuiltinPayloadInFileType) GetBuiltinPayload(typ, cate, query string, componentId uint64) ([]*models.BuiltinPayload, error) {
var result []*models.BuiltinPayload
source := b.Data[componentId]
if source == nil {
return nil, nil
}
typeMap, exists := source[typ]
if !exists {
return nil, nil
}
if cate != "" {
payloads, exists := typeMap[cate]
if !exists {
return nil, nil
}
result = append(result, filterByQuery(payloads, query)...)
} else {
for _, payloads := range typeMap {
result = append(result, filterByQuery(payloads, query)...)
}
}
if len(result) > 0 {
sort.Slice(result, func(i, j int) bool {
return result[i].Name < result[j].Name
})
}
return result, nil
}
func (b *BuiltinPayloadInFileType) GetBuiltinPayloadCates(typ string, componentId uint64) ([]string, error) {
var result []string
source := b.Data[componentId]
if source == nil {
return result, nil
}
typeData := source[typ]
if typeData == nil {
return result, nil
}
for cate := range typeData {
result = append(result, cate)
}
sort.Strings(result)
return result, nil
}
func filterByQuery(payloads []*models.BuiltinPayload, query string) []*models.BuiltinPayload {
if query == "" {
return payloads
}
var filtered []*models.BuiltinPayload
for _, p := range payloads {
if strings.Contains(p.Name, query) || strings.Contains(p.Tags, query) {
filtered = append(filtered, p)
}
}
return filtered
}
func (b *BuiltinPayloadInFileType) BuiltinMetricGets(metricsInDB []*models.BuiltinMetric, lang, collector, typ, query, unit string, limit, offset int) ([]*models.BuiltinMetric, int, error) {
var filteredMetrics []*models.BuiltinMetric
expressionSet := set.NewStringSet()
builtinMetricsByDB := convertBuiltinMetricByDB(metricsInDB)
for expression, metric := range builtinMetricsByDB {
b.BuiltinMetrics[expression] = metric
}
for _, metric := range b.BuiltinMetrics {
if !applyFilter(metric, collector, typ, query, unit) {
continue
}
// Skip if expression is already in db cache
// NOTE: 忽略重复的expression特别的在旧版本中用户可能已经创建了重复的metrics需要覆盖掉ByFile中相同的Metrics
// NOTE: Ignore duplicate expressions, especially in the old version, users may have created duplicate metrics,
if expressionSet.Exists(metric.Expression) {
continue
}
// Add db expression in set.
expressionSet.Add(metric.Expression)
// Apply language
trans, err := getTranslationWithLanguage(metric, lang)
if err != nil {
logger.Errorf("Error getting translation for metric %s: %v", metric.Name, err)
continue // Skip if translation not found
}
metric.Name = trans.Name
metric.Note = trans.Note
filteredMetrics = append(filteredMetrics, metric)
}
// Sort metrics
sort.Slice(filteredMetrics, func(i, j int) bool {
if filteredMetrics[i].Collector != filteredMetrics[j].Collector {
return filteredMetrics[i].Collector < filteredMetrics[j].Collector
}
if filteredMetrics[i].Typ != filteredMetrics[j].Typ {
return filteredMetrics[i].Typ < filteredMetrics[j].Typ
}
return filteredMetrics[i].Name < filteredMetrics[j].Name
})
totalCount := len(filteredMetrics)
// Validate parameters
if offset < 0 {
offset = 0
}
if limit < 0 {
limit = 0
}
// Handle edge cases
if offset >= totalCount || limit == 0 {
return []*models.BuiltinMetric{}, totalCount, nil
}
// Apply pagination
end := offset + limit
if end > totalCount {
end = totalCount
}
return filteredMetrics[offset:end], totalCount, nil
}
func (b *BuiltinPayloadInFileType) BuiltinMetricTypes(lang, collector, query string) []string {
typeSet := set.NewStringSet()
for _, metric := range b.BuiltinMetrics {
if !applyFilter(metric, collector, "", query, "") {
continue
}
typeSet.Add(metric.Typ)
}
return typeSet.ToSlice()
}
func (b *BuiltinPayloadInFileType) BuiltinMetricCollectors(lang, typ, query string) []string {
collectorSet := set.NewStringSet()
for _, metric := range b.BuiltinMetrics {
if !applyFilter(metric, "", typ, query, "") {
continue
}
collectorSet.Add(metric.Collector)
}
return collectorSet.ToSlice()
}
func applyFilter(metric *models.BuiltinMetric, collector, typ, query, unit string) bool {
return (collector == "" || metric.Collector == collector) &&
(typ == "" || metric.Typ == typ) &&
(unit == "" || containsUnit(unit, metric.Unit)) &&
(query == "" || applyQueryFilter(metric, query))
}
func containsUnit(unit, metricUnit string) bool {
us := strings.Split(unit, ",")
for _, u := range us {
if u == metricUnit {
return true
}
}
return false
}
func applyQueryFilter(metric *models.BuiltinMetric, query string) bool {
qs := strings.Split(query, " ")
for _, q := range qs {
if strings.HasPrefix(q, "-") {
q = strings.TrimPrefix(q, "-")
if strings.Contains(metric.Name, q) || strings.Contains(metric.Note, q) || strings.Contains(metric.Expression, q) {
return false
}
} else {
if !strings.Contains(metric.Name, q) && !strings.Contains(metric.Note, q) && !strings.Contains(metric.Expression, q) {
return false
}
}
}
return true
}
func getTranslationWithLanguage(bm *models.BuiltinMetric, lang string) (*models.Translation, error) {
var defaultTranslation *models.Translation
for _, t := range bm.Translation {
if t.Lang == lang {
return &t, nil
}
if t.Lang == "en_US" {
defaultTranslation = &t
}
}
if defaultTranslation != nil {
return defaultTranslation, nil
}
return nil, errors.Errorf("translation not found for metric %s", bm.Name)
}
func convertBuiltinMetricByDB(metricsInDB []*models.BuiltinMetric) map[string]*models.BuiltinMetric {
builtinMetricsByDB := make(map[string]*models.BuiltinMetric)
builtinMetricsByDBList := make(map[string][]*models.BuiltinMetric)
for _, metric := range metricsInDB {
builtinMetrics, ok := builtinMetricsByDBList[metric.Expression]
if !ok {
builtinMetrics = []*models.BuiltinMetric{}
}
builtinMetrics = append(builtinMetrics, metric)
builtinMetricsByDBList[metric.Expression] = builtinMetrics
}
for expression, builtinMetrics := range builtinMetricsByDBList {
if len(builtinMetrics) == 0 {
continue
}
// NOTE: 为兼容旧版本用户已经创建的 metrics同时将修改 metrics 收敛到同一个记录上,
// 我们选择使用 expression 相同但是 id 最小的 metric 记录作为主要的 Metric。
sort.Slice(builtinMetrics, func(i, j int) bool {
return builtinMetrics[i].ID < builtinMetrics[j].ID
})
currentBuiltinMetric := builtinMetrics[0]
// User have no customed translation, so we can merge it
if len(currentBuiltinMetric.Translation) == 0 {
translationMap := make(map[string]models.Translation)
for _, bm := range builtinMetrics {
for _, t := range getDefaultTranslation(bm) {
translationMap[t.Lang] = t
}
}
currentBuiltinMetric.Translation = make([]models.Translation, 0, len(translationMap))
for _, t := range translationMap {
currentBuiltinMetric.Translation = append(currentBuiltinMetric.Translation, t)
}
}
builtinMetricsByDB[expression] = currentBuiltinMetric
}
return builtinMetricsByDB
}
func getDefaultTranslation(bm *models.BuiltinMetric) []models.Translation {
if len(bm.Translation) != 0 {
return bm.Translation
}
return []models.Translation{{
Lang: bm.Lang,
Name: bm.Name,
Note: bm.Note,
}}
}

View File

@ -523,10 +523,9 @@ func (rt *Router) Config(r *gin.Engine) {
pages.GET("/builtin-payloads", rt.auth(), rt.user(), rt.builtinPayloadsGets)
pages.GET("/builtin-payloads/cates", rt.auth(), rt.user(), rt.builtinPayloadcatesGet)
pages.POST("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/components/add"), rt.builtinPayloadsAdd)
pages.GET("/builtin-payload/:id", rt.auth(), rt.user(), rt.perm("/components"), rt.builtinPayloadGet)
pages.PUT("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/components/put"), rt.builtinPayloadsPut)
pages.DELETE("/builtin-payloads", rt.auth(), rt.user(), rt.perm("/components/del"), rt.builtinPayloadsDel)
pages.GET("/builtin-payload", rt.auth(), rt.user(), rt.builtinPayloadsGetByUUIDOrID)
pages.GET("/builtin-payload", rt.auth(), rt.user(), rt.builtinPayloadsGetByUUID)
pages.POST("/message-templates", rt.auth(), rt.user(), rt.perm("/notification-templates/add"), rt.messageTemplatesAdd)
pages.DELETE("/message-templates", rt.auth(), rt.user(), rt.perm("/notification-templates/del"), rt.messageTemplatesDel)

View File

@ -2,8 +2,10 @@ package router
import (
"net/http"
"sort"
"time"
"github.com/ccfos/nightingale/v6/center/integration"
"github.com/ccfos/nightingale/v6/models"
"github.com/gin-gonic/gin"
@ -29,7 +31,7 @@ func (rt *Router) builtinMetricsAdd(c *gin.Context) {
reterr := make(map[string]string)
for i := 0; i < count; i++ {
lst[i].Lang = lang
lst[i].UUID = time.Now().UnixNano()
lst[i].UUID = time.Now().UnixMicro()
if err := lst[i].Add(rt.Ctx, username); err != nil {
reterr[lst[i].Name] = i18n.Sprintf(c.GetHeader("X-Language"), err.Error())
}
@ -51,8 +53,9 @@ func (rt *Router) builtinMetricsGets(c *gin.Context) {
bm, err := models.BuiltinMetricGets(rt.Ctx, lang, collector, typ, query, unit, limit, ginx.Offset(c, limit))
ginx.Dangerous(err)
total, err := models.BuiltinMetricCount(rt.Ctx, lang, collector, typ, query, unit)
bm, total, err := integration.BuiltinPayloadInFile.BuiltinMetricGets(bm, lang, collector, typ, query, unit, limit, ginx.Offset(c, limit))
ginx.Dangerous(err)
ginx.NewRender(c).Data(gin.H{
"list": bm,
"total": total,
@ -100,8 +103,26 @@ func (rt *Router) builtinMetricsTypes(c *gin.Context) {
query := ginx.QueryStr(c, "query", "")
lang := c.GetHeader("X-Language")
metricTypeList, err := models.BuiltinMetricTypes(rt.Ctx, lang, collector, query)
ginx.NewRender(c).Data(metricTypeList, err)
metricTypeListInDB, err := models.BuiltinMetricTypes(rt.Ctx, lang, collector, query)
ginx.Dangerous(err)
metricTypeListInFile := integration.BuiltinPayloadInFile.BuiltinMetricTypes(lang, collector, query)
typeMap := make(map[string]struct{})
for _, metricType := range metricTypeListInDB {
typeMap[metricType] = struct{}{}
}
for _, metricType := range metricTypeListInFile {
typeMap[metricType] = struct{}{}
}
metricTypeList := make([]string, 0, len(typeMap))
for metricType := range typeMap {
metricTypeList = append(metricTypeList, metricType)
}
sort.Strings(metricTypeList)
ginx.NewRender(c).Data(metricTypeList, nil)
}
func (rt *Router) builtinMetricsCollectors(c *gin.Context) {
@ -109,5 +130,24 @@ func (rt *Router) builtinMetricsCollectors(c *gin.Context) {
query := ginx.QueryStr(c, "query", "")
lang := c.GetHeader("X-Language")
ginx.NewRender(c).Data(models.BuiltinMetricCollectors(rt.Ctx, lang, typ, query))
collectorListInDB, err := models.BuiltinMetricCollectors(rt.Ctx, lang, typ, query)
ginx.Dangerous(err)
collectorListInFile := integration.BuiltinPayloadInFile.BuiltinMetricCollectors(lang, typ, query)
collectorMap := make(map[string]struct{})
for _, collector := range collectorListInDB {
collectorMap[collector] = struct{}{}
}
for _, collector := range collectorListInFile {
collectorMap[collector] = struct{}{}
}
collectorList := make([]string, 0, len(collectorMap))
for collector := range collectorMap {
collectorList = append(collectorList, collector)
}
sort.Strings(collectorList)
ginx.NewRender(c).Data(collectorList, nil)
}

View File

@ -7,6 +7,7 @@ import (
"time"
"github.com/BurntSushi/toml"
"github.com/ccfos/nightingale/v6/center/integration"
"github.com/ccfos/nightingale/v6/models"
"github.com/gin-gonic/gin"
"github.com/toolkits/pkg/ginx"
@ -192,13 +193,26 @@ func (rt *Router) builtinPayloadsAdd(c *gin.Context) {
func (rt *Router) builtinPayloadsGets(c *gin.Context) {
typ := ginx.QueryStr(c, "type", "")
if typ == "" {
ginx.Bomb(http.StatusBadRequest, "type is required")
return
}
ComponentID := ginx.QueryInt64(c, "component_id", 0)
cate := ginx.QueryStr(c, "cate", "")
query := ginx.QueryStr(c, "query", "")
lst, err := models.BuiltinPayloadGets(rt.Ctx, uint64(ComponentID), typ, cate, query)
ginx.NewRender(c).Data(lst, err)
ginx.Dangerous(err)
lstInFile, err := integration.BuiltinPayloadInFile.GetBuiltinPayload(typ, cate, query, uint64(ComponentID))
ginx.Dangerous(err)
if len(lstInFile) > 0 {
lst = append(lst, lstInFile...)
}
ginx.NewRender(c).Data(lst, nil)
}
func (rt *Router) builtinPayloadcatesGet(c *gin.Context) {
@ -206,21 +220,31 @@ func (rt *Router) builtinPayloadcatesGet(c *gin.Context) {
ComponentID := ginx.QueryInt64(c, "component_id", 0)
cates, err := models.BuiltinPayloadCates(rt.Ctx, typ, uint64(ComponentID))
ginx.NewRender(c).Data(cates, err)
}
ginx.Dangerous(err)
func (rt *Router) builtinPayloadGet(c *gin.Context) {
id := ginx.UrlParamInt64(c, "id")
catesInFile, err := integration.BuiltinPayloadInFile.GetBuiltinPayloadCates(typ, uint64(ComponentID))
ginx.Dangerous(err)
bp, err := models.BuiltinPayloadGet(rt.Ctx, "id = ?", id)
if err != nil {
ginx.Bomb(http.StatusInternalServerError, err.Error())
}
if bp == nil {
ginx.Bomb(http.StatusNotFound, "builtin payload not found")
// 使用 map 进行去重
cateMap := make(map[string]bool)
// 添加数据库中的分类
for _, cate := range cates {
cateMap[cate] = true
}
ginx.NewRender(c).Data(bp, nil)
// 添加文件中的分类
for _, cate := range catesInFile {
cateMap[cate] = true
}
// 将去重后的结果转换回切片
result := make([]string, 0, len(cateMap))
for cate := range cateMap {
result = append(result, cate)
}
ginx.NewRender(c).Data(result, nil)
}
func (rt *Router) builtinPayloadsPut(c *gin.Context) {
@ -273,14 +297,15 @@ func (rt *Router) builtinPayloadsDel(c *gin.Context) {
ginx.NewRender(c).Message(models.BuiltinPayloadDels(rt.Ctx, req.Ids))
}
func (rt *Router) builtinPayloadsGetByUUIDOrID(c *gin.Context) {
uuid := ginx.QueryInt64(c, "uuid", 0)
// 优先以 uuid 为准
if uuid != 0 {
ginx.NewRender(c).Data(models.BuiltinPayloadGet(rt.Ctx, "uuid = ?", uuid))
return
}
func (rt *Router) builtinPayloadsGetByUUID(c *gin.Context) {
uuid := ginx.QueryInt64(c, "uuid")
id := ginx.QueryInt64(c, "id", 0)
ginx.NewRender(c).Data(models.BuiltinPayloadGet(rt.Ctx, "id = ?", id))
bp, err := models.BuiltinPayloadGet(rt.Ctx, "uuid = ?", uuid)
ginx.Dangerous(err)
if bp != nil {
ginx.NewRender(c).Data(bp, nil)
} else {
ginx.NewRender(c).Data(integration.BuiltinPayloadInFile.IndexData[uuid], nil)
}
}

View File

@ -273,6 +273,11 @@ CREATE TABLE `source_token` (
KEY `idx_source_type_id_token` (`source_type`, `source_id`, `token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
/* Add translation column for builtin metrics */
ALTER TABLE `builtin_metrics` ADD COLUMN `translation` TEXT COMMENT 'translation of metric' AFTER `lang`;
/* v8.0.0-beta.12 2025-06-03 */
ALTER TABLE `alert_his_event` ADD COLUMN `notify_rule_ids` text COMMENT 'notify rule ids';
ALTER TABLE `alert_cur_event` ADD COLUMN `notify_rule_ids` text COMMENT 'notify rule ids';

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse HTTP 连接数",
"note": "通过HTTP协议连接到ClickHouse服务器的客户端数量。"
},
{
"lang": "en_US",
"name": "ClickHouse HTTP Connections",
"note": "The number of clients connected to the ClickHouse server via the HTTP protocol."
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse INSERT查询平均时间",
"note": "插入查询执行的平均时间(微秒)。"
},
{
"lang": "en_US",
"name": "ClickHouse INSERT query average time",
"note": "The average time in microseconds for the insertion query to execute."
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse SELECT 查询数",
"note": "执行的选择SELECT查询的数量"
},
{
"lang": "en_US",
"name": "ClickHouse SELECT Query Number",
"note": "Number of SELECT queries executed"
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse SELECT查询平均时间",
"note": "选择查询执行的平均时间(微秒)。"
},
{
"lang": "en_US",
"name": "ClickHouse SELECT query average time",
"note": "Select the average time (microseconds) for query execution."
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse TCP 连接数",
"note": "通过TCP协议连接到ClickHouse服务器的客户端数量。"
},
{
"lang": "en_US",
"name": "ClickHouse TCP Connections",
"note": "The number of clients connected to the ClickHouse server via the TCP protocol."
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 临时数据量",
"note": "临时数据部分的数量,这些部分当前正在生成。"
},
{
"lang": "en_US",
"name": "ClickHouse Temporary Data Volume",
"note": "The number of temporary data sections that are currently being generated."
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 分布式表连接数",
"note": "发送到分布式表的远程服务器的数据连接数。"
},
{
"lang": "en_US",
"name": "ClickHouse Distributed Table Joins",
"note": "The number of data connections sent to the remote server of the distributed table."
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 宽数据量",
"note": "宽数据部分的数量。"
},
{
"lang": "en_US",
"name": "ClickHouse wide data volume",
"note": "Number of wide data sections."
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 待插入分布式表文件数",
"note": "等待异步插入到分布式表的文件数量。"
},
{
"lang": "en_US",
"name": "ClickHouse Number of distributed table files to be inserted",
"note": "The number of files waiting to be inserted asynchronously into the distributed table."
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 提交前数据量",
"note": "提交前的数据部分数量这些部分在data_parts列表中但不用于SELECT查询。"
},
{
"lang": "en_US",
"name": "Data volume before ClickHouse submission",
"note": "The number of data parts before submission, which are in the data _ parts list, but are not used for SELECT queries."
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 提交后数据量",
"note": "提交后的数据部分数量这些部分在data_parts列表中并且用于SELECT查询。"
},
{
"lang": "en_US",
"name": "Data volume after ClickHouse submission",
"note": "The number of submitted data parts, which are in the data _ parts list and used for SELECT queries."
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 插入未压缩",
"note": " 插入操作写入的未压缩字节数。"
},
{
"lang": "en_US",
"name": "ClickHouse Insert Uncompressed",
"note": "The number of uncompressed bytes written by the insert operation."
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 插入行数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of ClickHouse inserted rows",
"note": ""
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 查询优先级",
"note": "由于优先级设置,被停止并等待的查询数量。\n"
},
{
"lang": "en_US",
"name": "ClickHouse Query Priority",
"note": "The number of queries that were stopped and waiting due to the priority setting. \n"
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 查询总数",
"note": "ClickHouse执行的查询总数。"
},
{
"lang": "en_US",
"name": "Total ClickHouse Queries",
"note": "The total number of queries executed by ClickHouse."
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 查询总时间",
"note": "查询执行的总时间(微秒)。"
},
{
"lang": "en_US",
"name": "Total ClickHouse query time",
"note": "The total time in microseconds for the query to execute."
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 正被删除数据量",
"note": "正在被删除的数据部分数量。"
},
{
"lang": "en_US",
"name": "ClickHouse Amount of Data being Deleted",
"note": "The number of data parts being deleted."
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 移动池活动任务数",
"note": "后台移动池中的活动任务数,用于处理数据移动。"
},
{
"lang": "en_US",
"name": "Number of active tasks in ClickHouse mobile pool",
"note": "The number of active tasks in the background move pool, used to handle data moves."
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 紧凑数据量",
"note": "紧凑数据部分的数量。"
},
{
"lang": "en_US",
"name": "ClickHouse Compact Data Volume",
"note": "Number of compact data sections."
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 缓冲区活动任务数",
"note": "后台缓冲区冲洗调度池中的活动任务数,用于定期缓冲区冲洗。"
},
{
"lang": "en_US",
"name": "Number of active tasks in ClickHouse buffer",
"note": "The number of active tasks in the background buffer flushing scheduling pool for periodic buffer flushing."
}
]
},
{
"id": 0,
@ -312,7 +552,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 跨磁盘量",
"note": "移动到另一个磁盘并应在析构函数中删除的数据部分数量。"
},
{
"lang": "en_US",
"name": "ClickHouse cross-disk volume",
"note": "The number of portions of data that are moved to another disk and should be deleted in the destructor."
}
]
},
{
"id": 0,
@ -327,7 +579,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse 过时数据量",
"note": " 过时的数据部分数量这些部分不是活动数据部分但当前SELECT查询可能使用它们。"
},
{
"lang": "en_US",
"name": "ClickHouse Obsolete Data Volume",
"note": "The number of obsolete data parts that are not active data parts, but may be used by the current SELECT query."
}
]
},
{
"id": 0,
@ -342,7 +606,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse中内存使用情况",
"note": "ClickHouse服务器使用的总内存量。"
},
{
"lang": "en_US",
"name": "Memory usage in ClickHouse",
"note": "The total amount of memory used by the ClickHouse server."
}
]
},
{
"id": 0,
@ -357,7 +633,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse中数据库数量",
"note": "ClickHouse数据库数量"
},
{
"lang": "en_US",
"name": "Number of databases in ClickHouse",
"note": "Number of ClickHouse databases"
}
]
},
{
"id": 0,
@ -372,7 +660,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse中表的数量",
"note": "ClickHouse表数量"
},
{
"lang": "en_US",
"name": "Number of tables in ClickHouse",
"note": "Number of ClickHouse tables"
}
]
},
{
"id": 0,
@ -387,7 +687,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse修订",
"note": "ClickHouse服务器的修订号通常是一个用于标识特定构建的数字。"
},
{
"lang": "en_US",
"name": "ClickHouse Revision",
"note": "The revision number of the ClickHouse server, usually a number used to identify a specific build."
}
]
},
{
"id": 0,
@ -402,7 +714,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse服务器运行时间",
"note": "ClickHouse服务器自启动以来的运行时间。"
},
{
"lang": "en_US",
"name": "ClickHouse server runtime",
"note": "The running time of the ClickHouse server since it started."
}
]
},
{
"id": 0,
@ -417,6 +741,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "ClickHouse版本号",
"note": "ClickHouse服务器的版本号以整数形式表示。"
},
{
"lang": "en_US",
"name": "ClickHouse version number",
"note": "Version number of the ClickHouse server, expressed as an integer."
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health delayed unassigned 的分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Cluster Health delayed unassigned shards",
"note": ""
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health Pending task 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Cluster Health Pending tasks quantity",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health relocating 的分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of shards for Cluster Health relocating",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health unassigned 的分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Cluster Health unassigned number of shards",
"note": ""
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 健康度状态码",
"note": "- 1Green绿色状态表示所有分片都正常\n- 2Yellow黄色状态主分片都正常从分片有不正常的\n- 3Red红色状态有些主分片不正常"
},
{
"lang": "en_US",
"name": "Cluster Health health status code",
"note": "-1: Green, Green state, indicating that all shards are normal \n-2: Yellow, Yellow state, the main shard is normal, the slave shard is abnormal \n-3: Red, Red state, some main shards are abnormal"
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 数据节点数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Cluster Health data nodes",
"note": ""
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 正在初始化的分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of shards being initialized by Cluster Health",
"note": ""
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 活跃主分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Cluster Health Number of active primary shards",
"note": ""
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 活跃分片数",
"note": ""
},
{
"lang": "en_US",
"name": "Cluster Health Active Shards",
"note": ""
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Cluster Health 节点数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Cluster Health nodes",
"note": ""
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Indexing 平均耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Indexing average time consumption",
"note": ""
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Merge 平均耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Average time consumed by Merge",
"note": ""
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Query 平均耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Query average time consumption",
"note": ""
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "每秒 indexing 数量",
"note": ""
},
{
"lang": "en_US",
"name": "indexing per second",
"note": ""
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "每秒 merge 大小",
"note": ""
},
{
"lang": "en_US",
"name": "merge size per second",
"note": ""
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "每秒 merge 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of merges per second",
"note": ""
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "每秒删除 doc 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of docs deleted per second",
"note": ""
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Hard Drive Usage",
"note": ""
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网络流量 - 入向每秒流量",
"note": ""
},
{
"lang": "en_US",
"name": "Network traffic-inbound traffic per second",
"note": ""
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网络流量 - 出向每秒流量",
"note": ""
},
{
"lang": "en_US",
"name": "Network traffic-outbound traffic per second",
"note": ""
}
]
},
{
"id": 0,
@ -312,7 +552,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 CPU 使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Process CPU usage",
"note": ""
}
]
},
{
"id": 0,
@ -327,7 +579,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 JVM Heap 使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Process JVM Heap Usage",
"note": ""
}
]
},
{
"id": 0,
@ -342,7 +606,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 JVM Heap 区 committed 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Process JVM Heap area committed size",
"note": ""
}
]
},
{
"id": 0,
@ -357,7 +633,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 JVM Non Heap 区 committed 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Process JVM Non Heap area committed size",
"note": ""
}
]
},
{
"id": 0,
@ -372,7 +660,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 JVM Old 内存池 used 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Process JVM Old memory pool used size",
"note": ""
}
]
},
{
"id": 0,
@ -387,7 +687,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 JVM Young 内存池 used 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Process JVM Young memory pool used size",
"note": ""
}
]
},
{
"id": 0,
@ -402,7 +714,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程新生代每秒 GC 次数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of GCs per second for the new generation of the process",
"note": ""
}
]
},
{
"id": 0,
@ -417,7 +741,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程新生代每秒 GC 耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Process new generation time per second GC",
"note": ""
}
]
},
{
"id": 0,
@ -432,7 +768,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程老生代每秒 GC 次数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of GCs per second of process old generation",
"note": ""
}
]
},
{
"id": 0,
@ -447,6 +795,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程老生代每秒 GC 耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Process old generation GC time per second",
"note": ""
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "HTTP 探测响应码",
"note": "如果没有拿到 response这个指标就没有值了"
},
{
"lang": "en_US",
"name": "HTTP probe response code",
"note": "If you don't get response, this indicator has no value"
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "HTTP 探测结果状态码",
"note": "0 值表示正常,大于 0 就是异常,各个值的含义如下:\n\n```\nSuccess = 0\nConnectionFailed = 1\nTimeout = 2\nDNSError = 3\nAddressError = 4\nBodyMismatch = 5\nCodeMismatch = 6\n```"
},
{
"lang": "en_US",
"name": "HTTP probe result status code",
"note": "A value of 0 means normal, and a value greater than 0 means abnormal. The meanings of each value are as follows: \n \n``` \nSuccess = 0 \nConnectionFailed = 1 \nTimeout = 2 \nDNSError = 3 \nAddressError = 4 \nBodyMismatch = 5 \nCodeMismatch = 6 \n```"
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "HTTP 探测耗时",
"note": ""
},
{
"lang": "en_US",
"name": "HTTP probe time-consuming",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "HTTP 证书过期时间",
"note": ""
},
{
"lang": "en_US",
"name": "HTTP certificate expiration time",
"note": ""
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - DNS 请求耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-DNS request time-consuming",
"note": ""
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - TCP建连耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-TCP connection establishment time",
"note": ""
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - TLS握手耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-TLS handshake time-consuming",
"note": ""
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - 探测结果状态码",
"note": "探测结果0 是正常,其他数字有不同含义\n- 0成功\n- 1连接失败\n- 2监测超时\n- 3DNS解析失败\n- 4地址格式错误\n- 5返回内容不匹配\n- 6返回码不匹配\n- 其他数字为未知错误"
},
{
"lang": "en_US",
"name": "Dial test-detection result status code",
"note": "Detection result, 0 is normal, other numbers have different meanings \n-0: Success \n-1: Connection failed \n-2: Monitoring timeout \n-3: DNS resolution failed \n-4: Address format is wrong \n-5: Return content does not match \n-6: Return code mismatch \n-Other numbers are unknown error"
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - 整体耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-overall time-consuming",
"note": ""
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - 返回状态码",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-Return status code",
"note": ""
}
]
},
{
"id": 0,
@ -162,6 +282,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "拨测 - 首包耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Dial test-first package time-consuming",
"note": ""
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Broker 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Brokers",
"note": ""
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Partition 副本不同步的数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of out-of-sync copies of Partition",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Partition 副本数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Partition copies",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "各个 Topic 每秒消费消息量",
"note": ""
},
{
"lang": "en_US",
"name": "Each Topic consumes messages per second",
"note": ""
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "各个 Topic 每秒生产消息量",
"note": ""
},
{
"lang": "en_US",
"name": "Production message volume per second per Topic",
"note": ""
}
]
},
{
"id": 0,
@ -87,6 +147,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "各个 Topic 的 Partition 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of Partitions for each Topic",
"note": ""
}
]
}
]

File diff suppressed because it is too large Load Diff

View File

@ -1,282 +1,618 @@
[
{
"uuid": 1745893024149445000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "Inode数量",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_inodes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024149445000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "Inode数量",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_inodes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "Inode数量",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Number of Inodes",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024121015300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "不可中断任务数量",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_tasks_state{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\", state=\"uninterruptible\"}) by (name)"
"uuid": 1745893024121015300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "不可中断任务数量",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_tasks_state{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\", state=\"uninterruptible\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "不可中断任务数量",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Number of uninterruptible tasks",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024130551800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器cache使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_cache{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))"
"uuid": 1745893024130551800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器cache使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_cache{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))",
"translation": [
{
"lang": "zh_CN",
"name": "容器cache使用",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container cache use",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024108569900,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU Limit",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\",",
"lang": "zh_CN",
"expression": "(sum(container_spec_cpu_quota{namespace=\"$namespace\", pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\", pod=~\"$pod_name\"}) by (name))"
"uuid": 1745893024108569900,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU Limit",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\",",
"lang": "zh_CN",
"expression": "(sum(container_spec_cpu_quota{namespace=\"$namespace\", pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\", pod=~\"$pod_name\"}) by (name))",
"translation": [
{
"lang": "zh_CN",
"name": "容器CPU Limit",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\","
},
{
"lang": "en_US",
"name": "Container CPU Limit",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"}/container _ spec _ cpu _ period {namespace = \"$namespace\","
}
]
},
{
"uuid": 1745893024112672500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU load 10",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_cpu_load_average_10s{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024112672500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU load 10",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_cpu_load_average_10s{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器CPU load 10",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container CPU load 10",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024026246700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)"
"uuid": 1745893024026246700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器CPU使用率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container CPU usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024029544000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU归一化后使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)/((sum(container_spec_cpu_quota{namespace=\"$namespace\", pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\", pod=~\"$pod_name\"}) by (name)))"
"uuid": 1745893024029544000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器CPU归一化后使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_usage_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)/((sum(container_spec_cpu_quota{namespace=\"$namespace\", pod=~\"$pod_name\"}/container_spec_cpu_period{namespace=\"$namespace\", pod=~\"$pod_name\"}) by (name)))",
"translation": [
{
"lang": "zh_CN",
"name": "容器CPU归一化后使用率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container CPU usage after normalization",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024146207700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器I/O",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_io_current{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024146207700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器I/O",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_io_current{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器I/O",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container I/O",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024136457000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器RSS内存使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_rss{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))"
"uuid": 1745893024136457000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器RSS内存使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_rss{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))",
"translation": [
{
"lang": "zh_CN",
"name": "容器RSS内存使用",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container RSS memory usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024139900200,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存 Limit",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_spec_memory_limit_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024139900200,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存 Limit",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_spec_memory_limit_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器内存 Limit",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container Memory Limit",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024032984300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))"
"uuid": 1745893024032984300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存使用",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "(sum(container_memory_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name))",
"translation": [
{
"lang": "zh_CN",
"name": "容器内存使用",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container memory usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024127585500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "((sum(container_memory_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)) /(sum(container_spec_memory_limit_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)))*100"
"uuid": 1745893024127585500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内存使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "((sum(container_memory_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)) /(sum(container_spec_memory_limit_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)))*100",
"translation": [
{
"lang": "zh_CN",
"name": "容器内存使用率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container memory usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024093620000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内核态CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_system_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)"
"uuid": 1745893024093620000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器内核态CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_system_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器内核态CPU使用率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container kernel mode CPU usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024102879000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器发生CPU throttle的比率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m]))by(name) *100"
"uuid": 1745893024102879000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器发生CPU throttle的比率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_cfs_throttled_periods_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m]))by(name) *100",
"translation": [
{
"lang": "zh_CN",
"name": "容器发生CPU throttle的比率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "The rate at which container CPU throttle occurs",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024143177000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器发生OOM次数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_oom_events_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024143177000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器发生OOM次数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_oom_events_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器发生OOM次数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Number of OOM occurrences for container",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024083942000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器启动时长(小时)",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum((time()-container_start_time_seconds{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"})) by (name)"
"uuid": 1745893024083942000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器启动时长(小时)",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum((time()-container_start_time_seconds{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"})) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器启动时长(小时)",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container startup time (hours)",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024152466200,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器已使用的文件系统大小",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)"
"uuid": 1745893024152466200,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器已使用的文件系统大小",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(container_fs_usage_bytes{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}) by (name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器已使用的文件系统大小",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "File system size used by the container",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024097849600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器用户态CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_user_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)"
"uuid": 1745893024097849600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "容器用户态CPU使用率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_cpu_user_seconds_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])*100) by(name)",
"translation": [
{
"lang": "zh_CN",
"name": "容器用户态CPU使用率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "Container user mode CPU usage",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024036896800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "文件系统写入速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_fs_writes_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])) by(name)"
"uuid": 1745893024036896800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "文件系统写入速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_fs_writes_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])) by(name)",
"translation": [
{
"lang": "zh_CN",
"name": "文件系统写入速率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "File system write rate",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024057722000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "文件系统读取速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_fs_reads_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])) by(name)"
"uuid": 1745893024057722000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "文件系统读取速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\",",
"lang": "zh_CN",
"expression": "sum(rate(container_fs_reads_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\", image!~\".*pause.*\"}[1m])) by(name)",
"translation": [
{
"lang": "zh_CN",
"name": "文件系统读取速率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\","
},
{
"lang": "en_US",
"name": "File system read rate",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\","
}
]
},
{
"uuid": 1745893024166898000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送丢包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024166898000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送丢包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络发送丢包数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Number of packets lost by network transmission",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024160266500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送数据包",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024160266500,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送数据包",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_packets_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络发送数据包",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "The network sends packets",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024069935000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024069935000,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络发送速率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Network transmission rate",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024163721700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送错误数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024163721700,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络发送错误数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_transmit_errors_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络发送错误数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Number of network transmission errors",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024173485600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收丢包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024173485600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收丢包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_packets_dropped_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络接收丢包数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Number of packet losses received by network",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024156389600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收数据包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024156389600,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收数据包数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_packets_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络接收数据包数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Number of packets received by network",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024075864800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024075864800,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收速率",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_bytes_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络接收速率",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Network reception rate",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
},
{
"uuid": 1745893024170233300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收错误数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)"
"uuid": 1745893024170233300,
"collector": "Pod",
"typ": "Kubernetes",
"name": "网络接收错误数",
"unit": "",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))",
"lang": "zh_CN",
"expression": "sum(rate(container_network_receive_errors_total{namespace=\"$namespace\", pod=~\"$pod_name\"}[1m])) by(name, interface)",
"translation": [
{
"lang": "zh_CN",
"name": "网络接收错误数",
"note": "Pod自身指标\n类型: pod=~\"$pod_name\"}[1m]))"
},
{
"lang": "en_US",
"name": "Number of network reception errors",
"note": "Pod's own indicators \nType: pod = ~ \"$pod _ name\"} [1m]))"
}
]
}
]
]

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU Steal 时间占比(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "CPU Steal time ratio (average of the whole machine)",
"note": ""
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 内核态时间占比(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "CPU core mode time ratio (average of the whole machine)",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 利用率(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "CPU utilization (machine average)",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 用户态时间占比(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "CPU user mode time ratio (average of the whole machine)",
"note": ""
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 硬中断时间占比(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "Proportion of CPU hard interrupt time (average of the whole machine)",
"note": ""
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 空闲率(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "CPU idle rate (overall machine average)",
"note": ""
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "CPU 软中断时间占比(整机平均)",
"note": ""
},
{
"lang": "en_US",
"name": "Proportion of CPU soft interrupt time (average of the whole machine)",
"note": ""
}
]
},
{
"id": 0,
@ -113,11 +197,23 @@
"unit": "percent",
"note": "交换空间使用率。计算原子取自 `/proc/meminfo`。",
"lang": "zh_CN",
"expression": "(node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes)/node_memory_SwapTotal_bytes * 100 and node_memory_SwapTotal_bytes \u003e 0",
"expression": "(node_memory_SwapTotal_bytes - node_memory_SwapFree_bytes)/node_memory_SwapTotal_bytes * 100 and node_memory_SwapTotal_bytes > 0",
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "交换空间使用率",
"note": "交换空间使用率。计算原子取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Swap space usage",
"note": "Swap space usage. The computational atom is taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "交换空间总量",
"note": "交换空间总量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Total swap space",
"note": "Total amount of swap space. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "交换空间空闲量",
"note": "交换空间空闲量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Swap space free amount",
"note": "Exchange space free amount. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存 Buffered 量",
"note": "用作缓冲区的内存量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Memory Buffered amount",
"note": "The amount of memory used as a buffer. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存 Cached 量",
"note": "用作文件缓存的内存量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Memory Cached amount",
"note": "The amount of memory used as file cache. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存使用率基于MemAvailable",
"note": "内存使用率。基于 MemAvailable 计算更准确,但是老版本的 Linux 不支持。"
},
{
"lang": "en_US",
"name": "Memory usage (based on MemAvailable)",
"note": "Memory usage. Calculation based on MemAvailable is more accurate, but older versions of Linux do not support it."
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存可用量",
"note": "可以立即分配给进程的可用内存量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Memory Availability",
"note": "The amount of available memory that can be immediately allocated to a process. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存总量",
"note": "内存总量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Total memory",
"note": "Total amount of memory. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "内存空闲量",
"note": "未使用的内存量。取自 `/proc/meminfo`。"
},
{
"lang": "en_US",
"name": "Free memory amount",
"note": "Amount of unused memory. Taken from `/proc/meminfo `."
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "文件句柄 - 已分配占比",
"note": ""
},
{
"lang": "en_US",
"name": "File handle-allocated proportion",
"note": ""
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "文件句柄 - 已分配量",
"note": ""
},
{
"lang": "en_US",
"name": "File Handle-Amount Allocated",
"note": ""
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "文件句柄 - 总可分配量",
"note": ""
},
{
"lang": "en_US",
"name": "File handle-total allocable quantity",
"note": ""
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘 IO - 时间维度 Utilization",
"note": "在时间维度统计硬盘 IO 时间占比,比如该值是 50%,表示有 50% 的时间是在处理 IO该值 100%,表示一直在处理 IO但是注意现代磁盘设备具备并行处理多个 I/O 请求的能力,所以即便该值是 100%,可能硬盘还是可以接收新的处理请求。\n\n比如某人有两只手最近 1 分钟一直在用单手劳动,从时间维度来看,利用率是 100%,但即便是 100%,再给他更多的活,他也能干,因为他还有一只手可用。"
},
{
"lang": "en_US",
"name": "Hard Disk IO-Time Dimension Utilization",
"note": "Count the proportion of hard disk IO time in the time dimension. For example, if the value is 50%, it means that 50% of the time is processing IO, and if the value is 100%, it means that IO has been processing all the time. However, note that modern disk devices have the ability to process multiple I/O requests in parallel, so even if the value is 100%, the hard disk may still be able to receive new processing requests. \n \nFor example, someone has two hands and has been working with one hand in the last minute. From the time dimension, the utilization rate is 100%, but even if it is 100%, he can do it if he is given more work, because he still has one hand available."
}
]
},
{
"id": 0,
@ -312,7 +552,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘 IO - 每秒写入字节数量",
"note": ""
},
{
"lang": "en_US",
"name": "Hard disk IO-bytes written per second",
"note": ""
}
]
},
{
"id": 0,
@ -327,7 +579,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘 IO - 每秒写次数",
"note": "每秒写次数"
},
{
"lang": "en_US",
"name": "Hard drive IO-writes per second",
"note": "Writes per second"
}
]
},
{
"id": 0,
@ -342,7 +606,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘 IO - 每秒读取字节数量",
"note": ""
},
{
"lang": "en_US",
"name": "Hard Drive IO-bytes read per second",
"note": ""
}
]
},
{
"id": 0,
@ -357,7 +633,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘 IO - 每秒读次数",
"note": "每秒读次数"
},
{
"lang": "en_US",
"name": "Hard drive IO-Reads per second",
"note": "Reads per second"
}
]
},
{
"id": 0,
@ -372,7 +660,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘使用率",
"note": "硬盘空间使用率。"
},
{
"lang": "en_US",
"name": "Hard Drive Usage",
"note": "Hard disk space usage."
}
]
},
{
"id": 0,
@ -387,7 +687,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘剩余量",
"note": "使用 SI 标准渲染数据,和 df 命令保持一致。"
},
{
"lang": "en_US",
"name": "Remaining hard disk",
"note": "Use the SI standard to render data, consistent with the df command."
}
]
},
{
"id": 0,
@ -402,7 +714,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘可用量",
"note": "使用 SI 标准渲染数据,和 df 命令保持一致。"
},
{
"lang": "en_US",
"name": "Hard Drive Availability",
"note": "Use the SI standard to render data, consistent with the df command."
}
]
},
{
"id": 0,
@ -417,7 +741,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "硬盘总量",
"note": "使用 SI 标准渲染数据,和 df 命令保持一致。"
},
{
"lang": "en_US",
"name": "Total hard disk",
"note": "Use the SI standard to render data, consistent with the df command."
}
]
},
{
"id": 0,
@ -432,7 +768,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统 CPU 核数",
"note": "CPU 逻辑核的数量。"
},
{
"lang": "en_US",
"name": "Number of CPU cores",
"note": "Number of CPU logical cores."
}
]
},
{
"id": 0,
@ -447,7 +795,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载 - 最近 1 分钟",
"note": "取自 `/proc/loadavg`。"
},
{
"lang": "en_US",
"name": "System load average-last 1 minute",
"note": "Taken from `/proc/loadavg `."
}
]
},
{
"id": 0,
@ -462,7 +822,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载 - 最近 15 分钟",
"note": "取自 `/proc/loadavg`。"
},
{
"lang": "en_US",
"name": "System load average-last 15 minutes",
"note": "Taken from `/proc/loadavg `."
}
]
},
{
"id": 0,
@ -477,7 +849,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载 - 最近 5 分钟",
"note": "取自 `/proc/loadavg`。"
},
{
"lang": "en_US",
"name": "System load average-last 5 minutes",
"note": "Taken from `/proc/loadavg `."
}
]
},
{
"id": 0,
@ -492,7 +876,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载(单核) - 最近 1 分钟",
"note": ""
},
{
"lang": "en_US",
"name": "System Load Average (Single Core)-Last 1 Minute",
"note": ""
}
]
},
{
"id": 0,
@ -507,7 +903,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载(单核) - 最近 15 分钟",
"note": ""
},
{
"lang": "en_US",
"name": "System Load Average (Single Core)-Last 15 Minutes",
"note": ""
}
]
},
{
"id": 0,
@ -522,7 +930,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "系统平均负载(单核) - 最近 5 分钟",
"note": ""
},
{
"lang": "en_US",
"name": "System Load Average (Single Core)-Last 5 Minutes",
"note": ""
}
]
},
{
"id": 0,
@ -537,7 +957,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡入方向(接收)每秒丢弃的数据包个数",
"note": "原始指标 node_network_receive_drop_total 表示操作系统启动之后各个网卡入方向(接收)丢弃的数据包总数。"
},
{
"lang": "en_US",
"name": "Number of packets dropped per second in the incoming direction (receiving) of the network card",
"note": "The original indicator node _ network _ receive _ drop _ total indicates the total number of packets dropped (received) by each network card after the operating system starts."
}
]
},
{
"id": 0,
@ -552,7 +984,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡入方向(接收)每秒数据包数",
"note": "原始指标 node_network_receive_packets_total 表示操作系统启动之后各个网卡入方向(接收)数据包总数。"
},
{
"lang": "en_US",
"name": "NIC incoming (receiving) packets per second",
"note": "The original indicator node _ network _ receive _ packets _ total indicates the total number of data packets incoming (received) by each network card after the operating system is booted."
}
]
},
{
"id": 0,
@ -567,7 +1011,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡入方向(接收)每秒错包数",
"note": "原始指标 node_network_receive_errs_total 表示操作系统启动之后各个网卡入方向(接收)错包总数。"
},
{
"lang": "en_US",
"name": "Number of wrong packets per second in the incoming direction (receiving) of the network card",
"note": "The original indicator node _ network _ receive _ errs _ total indicates the total number of error packets incoming (received) by each network card after the operating system is started."
}
]
},
{
"id": 0,
@ -582,7 +1038,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡出方向(发送)每秒丢弃的数据包个数",
"note": "原始指标 node_network_transmit_drop_total 表示操作系统启动之后各个网卡出方向(发送)丢弃的数据包总数。"
},
{
"lang": "en_US",
"name": "Number of packets discarded per second in the outbound direction (sending) of the network card",
"note": "The original indicator node _ network _ transmit _ drop _ total indicates the total number of packets discarded (sent) by each network card after the operating system starts."
}
]
},
{
"id": 0,
@ -597,7 +1065,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡出方向(发送)每秒数据包数",
"note": "原始指标 node_network_transmit_packets_total 表示操作系统启动之后各个网卡出方向(发送)数据包总数。"
},
{
"lang": "en_US",
"name": "Number of packets per second in the outgoing direction (sent) of the network card",
"note": "The original indicator node _ network _ transmit _ packets _ total indicates the total number of outbound (sent) data packets from each network card after the operating system is started."
}
]
},
{
"id": 0,
@ -612,7 +1092,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡出方向(发送)每秒错包数",
"note": "原始指标 node_network_transmit_errs_total 表示操作系统启动之后各个网卡出方向(发送)错包总数。"
},
{
"lang": "en_US",
"name": "Number of wrong packets per second in the outgoing direction (sending) of the network card",
"note": "The original indicator node _ network _ transmit _ errs _ total indicates the total number of error packets sent out (sent) by each network card after the operating system is started."
}
]
},
{
"id": 0,
@ -627,7 +1119,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡每秒发送的 bit 量",
"note": "原始指标 node_network_transmit_bytes_total 表示操作系统启动之后发送的 byte 总量,因为网卡流量习惯使用 bit 作为单位,所以在表达式中做了换算。"
},
{
"lang": "en_US",
"name": "The amount of bits sent per second by the network card",
"note": "The original indicator node _ network _ transmit _ bytes _ total represents the total number of bytes sent after the operating system starts. Because the network card traffic is used to using bits as a unit, it is converted in the expression."
}
]
},
{
"id": 0,
@ -642,6 +1146,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "网卡每秒接收的 bit 量",
"note": "原始指标 node_network_receive_bytes_total 表示操作系统启动之后接收的 byte 总量,因为网卡流量习惯使用 bit 作为单位,所以在表达式中做了换算。"
},
{
"lang": "en_US",
"name": "The number of bits received by the network card per second",
"note": "The original indicator node _ network _ received _ bytes _ total represents the total number of bytes received after the operating system is started. Because the network card traffic is used to using bits as a unit, it is converted in the expression."
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池 data 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status InnoDB buffer pool data size",
"note": ""
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池 dirty 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status InnoDB buffer pool dirty size",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池 free 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status InnoDB buffer pool free size",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池 page 使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status InnoDB buffer pool page usage",
"note": ""
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池 used 大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status InnoDB Buffer Pool used Size",
"note": ""
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status InnoDB 缓冲池总大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Total InnoDB Buffer Pool Size",
"note": ""
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 启动时长",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Startup Time",
"note": ""
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 当前 running 的 threads 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status The number of threads currently running",
"note": ""
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 当前打开的文件句柄数",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Number of file handles currently open",
"note": ""
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 当前连接数",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Number of current connections",
"note": ""
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 最大曾用连接数",
"note": "曾经达到过的最大连接数"
},
{
"lang": "en_US",
"name": "Global Status Maximum number of connections used",
"note": "Maximum number of connections ever reached"
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒 Command 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Number of Commands per second",
"note": ""
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒 query 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status queries per second",
"note": ""
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒 question 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Questions per second",
"note": ""
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒 slow query 数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status slow queries per second",
"note": ""
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒事务操作数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Number of transactions per second",
"note": ""
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒写操作数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Number of writes per second",
"note": ""
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒发送流量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status sends traffic per second",
"note": ""
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒接收流量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status receives traffic per second",
"note": ""
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 每秒读操作数量",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status Read operations per second",
"note": ""
}
]
},
{
"id": 0,
@ -312,7 +552,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 近 3 分钟 abort 的客户端",
"note": "原始指标 mysql_global_status_aborted_clients 表示由于客户端未正确关闭连接而终止的连接数Counter 类型,单调递增。"
},
{
"lang": "en_US",
"name": "Global Status nearly 3 minutes abort client",
"note": "The raw metric mysql _ global _ status _ aborted _ clients represents the number of connections terminated because the client did not properly close the connection, Counter type, monotonically increasing."
}
]
},
{
"id": 0,
@ -327,7 +579,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 近 3 分钟 abort 的连接数",
"note": "原始指标 mysql_global_status_aborted_connects 表示尝试连接到 MySQL 服务器失败的次数Counter 类型,单调递增。"
},
{
"lang": "en_US",
"name": "Global Status Number of connections in last 3 minutes abort",
"note": "The raw metric MySQL _ global _ status _ aborted _ connects represents the number of failed attempts to connect to a MySQL server, Counter type, monotonically increasing."
}
]
},
{
"id": 0,
@ -342,7 +606,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Status 近 3 分钟 table lock 等待次数",
"note": ""
},
{
"lang": "en_US",
"name": "Global Status nearly 3 minutes table lock waiting times",
"note": ""
}
]
},
{
"id": 0,
@ -357,7 +633,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Variables InnoDB 缓冲池配置大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Variables InnoDB buffer pool configuration size",
"note": ""
}
]
},
{
"id": 0,
@ -372,7 +660,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Variables read_only 开关值",
"note": "0 就是 OFF1 是 ON"
},
{
"lang": "en_US",
"name": "Global Variables read _ only Switch value",
"note": "0 is OFF, 1 is ON"
}
]
},
{
"id": 0,
@ -387,7 +687,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Variables 允许打开的文件句柄数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of file handles that Global Variables allows to open",
"note": ""
}
]
},
{
"id": 0,
@ -402,7 +714,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Variables 最大连接数限制",
"note": "允许的最大连接数,默认值是 151过小了。\n\n- 通过 `SHOW VARIABLES LIKE 'max_connections'` 命令查看当前设置\n- 通过 `SET GLOBAL max_connections = 2048` 重新设置最大连接数\n- 通过修改 MySQL 配置文件,在 `[mysqld]` 下面添加 `max_connections = 2048` 使其重启依旧生效"
},
{
"lang": "en_US",
"name": "Global Variables Maximum Connection Limit",
"note": "The maximum number of connections allowed, the default value is 151, is too small. \n \n-View the current settings with the ` SHOW VARIABLES LIKE'max _ connections ''command \n-Reset the maximum number of connections via ` SET GLOBAL max _ connections = 2048 ` \n-By modifying the MySQL configuration file, add ` max _ connections = 2048 ` under ` [mysqld] ` so that its restart still works"
}
]
},
{
"id": 0,
@ -417,7 +741,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Global Variables 查询缓存大小",
"note": ""
},
{
"lang": "en_US",
"name": "Global Variables Query Cache Size",
"note": ""
}
]
},
{
"id": 0,
@ -432,7 +768,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "MySQL 实例是否 UP",
"note": "1 表示 UP说明能正常连到 MySQL 采集数据0 表示无法连通 MySQL 实例,可能是网络问题、认证问题,或者 MySQL 本身就是挂了"
},
{
"lang": "en_US",
"name": "Whether MySQL instance is UP",
"note": "1 means UP, indicating that it can normally connect to MySQL to collect data; 0 means that the MySQL instance cannot be connected. It may be a network problem, authentication problem, or MySQL itself is down"
}
]
},
{
"id": 0,
@ -447,7 +795,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "MySQL 指标抓取耗时",
"note": ""
},
{
"lang": "en_US",
"name": "MySQL metric crawling time-consuming",
"note": ""
}
]
},
{
"id": 0,
@ -462,6 +822,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "MySQL 版本信息",
"note": ""
},
{
"lang": "en_US",
"name": "MySQL version information",
"note": ""
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "NET 探测结果状态码",
"note": "0 值表示正常,大于 0 就是异常,各个值的含义如下:\n\n- 0: Success\n- 1: Timeout\n- 2: ConnectionFailed\n- 3: ReadFailed\n- 4: StringMismatch"
},
{
"lang": "en_US",
"name": "NET Probe Result Status Code",
"note": "A value of 0 means normal, and a value greater than 0 means abnormal. The meanings of each value are as follows: \n \n-0: Success \n1: Timeout \n2: ConnectionFailed \n-3: ReadFailed \n4: StringMismatch"
}
]
},
{
"id": 0,
@ -27,6 +39,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "NET 探测耗时",
"note": ""
},
{
"lang": "en_US",
"name": "NET probe time-consuming",
"note": ""
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 当前空闲连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
},
{
"lang": "en_US",
"name": "Nginx stub _ status Number of current idle connections",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 正在回写 response 的连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
},
{
"lang": "en_US",
"name": "Nginx stub _ status The number of connections that are writing back response",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 正在处理的活动连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)\n\nReading + Writing + Waiting 的总和"
},
{
"lang": "en_US",
"name": "Nginx stub _ status Number of active connections being processed",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md) \n \nSum of Reading + Writing + Waiting"
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 正在读取 request header 的连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
},
{
"lang": "en_US",
"name": "Nginx stub _ status is reading the number of connections to the request header",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 每秒 accept 的新连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
},
{
"lang": "en_US",
"name": "Nginx stub _ status New connections accepted per second",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 每秒 handle 的新连接数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
},
{
"lang": "en_US",
"name": "Nginx stub _ status New connections per second handle",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)"
}
]
},
{
"id": 0,
@ -102,6 +174,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Nginx stub_status 每秒处理的请求数",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md)\n\n如果有 keep-alive 连接的情况,一个连接上会处理多个请求。"
},
{
"lang": "en_US",
"name": "Nginx stub _ status requests processed per second",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/nginx/README.md) \n \nIf there is a keep-alive connection, multiple requests will be processed on one connection."
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping ttl 时间",
"note": "Time To Live指的是报文在网络中能够“存活”的限制时间"
},
{
"lang": "en_US",
"name": "Ping ttl time",
"note": "Time To Live refers to the limited time that a packet can \"survive\" in the network"
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping 丢包率",
"note": ""
},
{
"lang": "en_US",
"name": "Ping packet loss rate",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping 平均耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Ping average time consumed",
"note": ""
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping 探测结果状态码",
"note": "值为 0 就是正常,非 0 值就是异常。如果 Ping 失败Categraf 日志中理应会有异常日志"
},
{
"lang": "en_US",
"name": "Ping probe result status code",
"note": "A value of 0 is normal, and a non-0 value is abnormal. If the Ping fails, there should be an exception log in the Categraf log"
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping 最大耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Ping maximum time consumption",
"note": ""
}
]
},
{
"id": 0,
@ -87,6 +147,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "Ping 最小耗时",
"note": ""
},
{
"lang": "en_US",
"name": "Ping minimum time consumption",
"note": ""
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 CPU 利用率(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)\n\nCPU 利用率有两个模式,一个是 solaris一个是 irix默认是 irixirix 模式下CPU 利用率可能会超过 100%solaris 会考虑 CPU 核数solaris 模式的 CPU 利用率不会超过 100%。"
},
{
"lang": "en_US",
"name": "Process CPU utilization (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md) \n \nThere are two modes of CPU utilization, one is solaris and the other is irix. The default is irix. In irix mode, the CPU utilization may exceed 100%. solaris will consider the number of CPU cores, and the CPU utilization in solaris mode will not exceed 100%."
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 CPU 总利用率(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)\n\nCPU 利用率有两个模式,一个是 solaris一个是 irix默认是 irixirix 模式下CPU 利用率可能会超过 100%solaris 会考虑 CPU 核数solaris 模式的 CPU 利用率不会超过 100%。"
},
{
"lang": "en_US",
"name": "Total process CPU utilization (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md) \n \nThere are two modes of CPU utilization, one is solaris and the other is irix. The default is irix. In irix mode, the CPU utilization may exceed 100%. solaris will consider the number of CPU cores, and the CPU utilization in solaris mode will not exceed 100%."
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒写入字节总数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of bytes written per second by process IO (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒写入字节数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Number of bytes written per second by process IO (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒写入次数总数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of process IO writes per second (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒写入次数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process IO writes per second (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒读取字节总数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of bytes read per second by process IO (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒读取字节数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process IO reads bytes per second (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒读取次数总数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of process IO reads per second (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 IO 每秒读取次数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process IO reads per second (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 Memory 利用率(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process Memory utilization (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 Memory 总利用率(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process Memory Total utilization (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 rlimit fd 软限制数量(匹配到的所有进程中的最小值)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process rlimit fd Number of soft limits (minimum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程 rlimit fd 软限制数量(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Process rlimit fd Number of soft limits (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程启动时长(匹配到的所有进程的最小值)",
"note": "启动了多久"
},
{
"lang": "en_US",
"name": "Process start time (minimum of all processes matched to)",
"note": "How long has it started"
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程启动时长(单进程)",
"note": "启动了多久"
},
{
"lang": "en_US",
"name": "Process startup time (single process)",
"note": "How long has it started"
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程数量(根据匹配条件查到的进程数量)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Number of processes (the number of processes found according to matching conditions)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程文件句柄总打开数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of process file handles open (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程文件句柄打开数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Number of process file handle openings (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程线程总数(匹配到的所有进程加和)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Total number of process threads (sum of all processes matched to)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
},
{
"id": 0,
@ -312,6 +552,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "进程线程数(单进程)",
"note": "[文档](https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
},
{
"lang": "en_US",
"name": "Number of process threads (single process)",
"note": "[Documentation] (https://github.com/flashcatcloud/categraf/blob/main/inputs/procstat/README.md)"
}
]
}
]

View File

@ -12,7 +12,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 利用率system",
"note": ""
},
{
"lang": "en_US",
"name": "Container CPU utilization (system)",
"note": ""
}
]
},
{
"id": 0,
@ -27,7 +39,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 利用率user",
"note": ""
},
{
"lang": "en_US",
"name": "Container CPU utilization (user)",
"note": ""
}
]
},
{
"id": 0,
@ -42,7 +66,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 利用率(整体,值不会大于 100",
"note": "只有设置了 limit 的容器才能计算此利用率"
},
{
"lang": "en_US",
"name": "Container CPU utilization (overall, the value will not be greater than 100)",
"note": "Only containers with limit set can calculate this utilization"
}
]
},
{
"id": 0,
@ -57,7 +93,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 利用率(整体,值可能大于 100",
"note": "如果是 200% 表示占用了 2 个核"
},
{
"lang": "en_US",
"name": "Container CPU utilization (overall, value may be greater than 100)",
"note": "If 200%, it means that 2 cores are occupied"
}
]
},
{
"id": 0,
@ -72,7 +120,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 每秒有多少 period",
"note": ""
},
{
"lang": "en_US",
"name": "How many periods does the container CPU have per second",
"note": ""
}
]
},
{
"id": 0,
@ -87,7 +147,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 每秒被 throttle 的 period 量",
"note": "如果容器限制了 CPU而 app 所需算法过多, 会被抑制使用container_cpu_cfs_throttled_periods_total 统计总共有多少个 period 被抑制了,如果近期发生抑制是需要关注的,一些延迟敏感的 app 受影响尤为明显。出现被抑制的情况,大概率是需要升配了。"
},
{
"lang": "en_US",
"name": "The amount of periods that the container CPU is throttle per second",
"note": "If the container limits the CPU and the app requires too many algorithms, it will be suppressed. container _ CPU _ cfs _ throttled _ periods _ total counts how many periods have been suppressed in total. If suppression occurs recently, it needs attention. Some delay-sensitive apps are particularly affected. If it is suppressed, there is a high probability that it needs to be upgraded."
}
]
},
{
"id": 0,
@ -102,7 +174,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 CPU 被 throttle 的比例",
"note": "这个值大于 0 就要注意"
},
{
"lang": "en_US",
"name": "The proportion of container CPU being throttle",
"note": "If this value is greater than 0, pay attention"
}
]
},
{
"id": 0,
@ -117,7 +201,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 filesystem 使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Container filesystem usage",
"note": ""
}
]
},
{
"id": 0,
@ -132,7 +228,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 filesystem 使用量",
"note": ""
},
{
"lang": "en_US",
"name": "Container filesystem usage",
"note": ""
}
]
},
{
"id": 0,
@ -147,7 +255,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 filesystem 当前 IO 次数",
"note": ""
},
{
"lang": "en_US",
"name": "Container filesystem Current IO times",
"note": ""
}
]
},
{
"id": 0,
@ -162,7 +282,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 filesystem 总量",
"note": ""
},
{
"lang": "en_US",
"name": "Container filesystem Total",
"note": ""
}
]
},
{
"id": 0,
@ -177,7 +309,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 inode free 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container inode free amount",
"note": ""
}
]
},
{
"id": 0,
@ -192,7 +336,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 inode total 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container inode total",
"note": ""
}
]
},
{
"id": 0,
@ -207,7 +363,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 inode 使用率",
"note": ""
},
{
"lang": "en_US",
"name": "Container inode usage",
"note": ""
}
]
},
{
"id": 0,
@ -222,7 +390,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 IO 每秒写入 byte 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container IO writes bytes per second",
"note": ""
}
]
},
{
"id": 0,
@ -237,7 +417,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 IO 每秒读取 byte 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container IO reads bytes per second",
"note": ""
}
]
},
{
"id": 0,
@ -252,7 +444,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory cache 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory cache amount",
"note": ""
}
]
},
{
"id": 0,
@ -267,7 +471,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用率Usage",
"note": "如果有大量文件 IO有大量 container_memory_cachecontainer_memory_usage_bytes 和 container_memory_working_set_bytes 的大小会有差异"
},
{
"lang": "en_US",
"name": "Container memory Usage (Usage)",
"note": "If there is a large number of file IO and a large number of container _ memory _ cache, the size of container _ memory _ usage _ bytes and container _ memory _ working _ set _ bytes will be different"
}
]
},
{
"id": 0,
@ -282,7 +498,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用率Working Set",
"note": "如果有大量文件 IO有大量 container_memory_cachecontainer_memory_usage_bytes 和 container_memory_working_set_bytes 的大小会有差异"
},
{
"lang": "en_US",
"name": "Container memory usage rate (Working Set)",
"note": "If there is a large number of file IO and a large number of container _ memory _ cache, the size of container _ memory _ usage _ bytes and container _ memory _ working _ set _ bytes will be different"
}
]
},
{
"id": 0,
@ -297,7 +525,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用量mapped_file",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory usage (mapped _ file)",
"note": ""
}
]
},
{
"id": 0,
@ -312,7 +552,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用量RSS",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory usage (RSS)",
"note": ""
}
]
},
{
"id": 0,
@ -327,7 +579,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用量Swap",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory usage (Swap)",
"note": ""
}
]
},
{
"id": 0,
@ -342,7 +606,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用量Usage",
"note": "如果有大量文件 IO有大量 container_memory_cachecontainer_memory_usage_bytes 和 container_memory_working_set_bytes 的大小会有差异"
},
{
"lang": "en_US",
"name": "Container memory Usage",
"note": "If there is a large number of file IO and a large number of container _ memory _ cache, the size of container _ memory _ usage _ bytes and container _ memory _ working _ set _ bytes will be different"
}
]
},
{
"id": 0,
@ -357,7 +633,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 使用量Working Set",
"note": "如果有大量文件 IO有大量 container_memory_cachecontainer_memory_usage_bytes 和 container_memory_working_set_bytes 的大小会有差异"
},
{
"lang": "en_US",
"name": "Container memory usage (Working Set)",
"note": "If there is a large number of file IO and a large number of container _ memory _ cache, the size of container _ memory _ usage _ bytes and container _ memory _ working _ set _ bytes will be different"
}
]
},
{
"id": 0,
@ -372,7 +660,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 分配失败次数(每秒)",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory allocation failures (per second)",
"note": ""
}
]
},
{
"id": 0,
@ -387,7 +687,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 memory 限制量",
"note": ""
},
{
"lang": "en_US",
"name": "Container memory limit",
"note": ""
}
]
},
{
"id": 0,
@ -402,7 +714,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒发送 bit 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container net sends bits per second",
"note": ""
}
]
},
{
"id": 0,
@ -417,7 +741,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒发送 byte 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container net sends bytes per second",
"note": ""
}
]
},
{
"id": 0,
@ -432,7 +768,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒发送数据包数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of packets sent per second by container net",
"note": ""
}
]
},
{
"id": 0,
@ -447,7 +795,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒发送时 drop 包数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of drop packets sent by container net per second",
"note": ""
}
]
},
{
"id": 0,
@ -462,7 +822,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒发送错包数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of wrong packets sent by container net per second",
"note": ""
}
]
},
{
"id": 0,
@ -477,7 +849,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒接收 bit 量",
"note": ""
},
{
"lang": "en_US",
"name": "The amount of bits received by the container net per second",
"note": ""
}
]
},
{
"id": 0,
@ -492,7 +876,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒接收 byte 量",
"note": ""
},
{
"lang": "en_US",
"name": "Container net receives bytes per second",
"note": ""
}
]
},
{
"id": 0,
@ -507,7 +903,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒接收数据包数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of packets received per second by container net",
"note": ""
}
]
},
{
"id": 0,
@ -522,7 +930,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒接收时 drop 包数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of drop packets received by container net per second",
"note": ""
}
]
},
{
"id": 0,
@ -537,7 +957,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器 net 每秒接收错包数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of wrong packets received by container net per second",
"note": ""
}
]
},
{
"id": 0,
@ -552,7 +984,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器允许运行的最大线程数",
"note": ""
},
{
"lang": "en_US",
"name": "The maximum number of threads the container is allowed to run",
"note": ""
}
]
},
{
"id": 0,
@ -567,7 +1011,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器内 1 号进程 soft ulimit 值",
"note": "容器内1号进程的软 ulimit 值。如果为-1则无限制。"
},
{
"lang": "en_US",
"name": "Process No. 1 soft ulimit value in container",
"note": "Soft ulimit value for process # 1 inside the container. If-1, there is no limit."
}
]
},
{
"id": 0,
@ -582,7 +1038,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器已经运行的时间",
"note": ""
},
{
"lang": "en_US",
"name": "How long the container has been running",
"note": ""
}
]
},
{
"id": 0,
@ -597,7 +1065,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器当前打开套接字数量",
"note": ""
},
{
"lang": "en_US",
"name": "Number of currently open sockets in the container",
"note": ""
}
]
},
{
"id": 0,
@ -612,7 +1092,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器当前打开文件句柄数量",
"note": ""
},
{
"lang": "en_US",
"name": "Container Number of currently open file handles",
"note": ""
}
]
},
{
"id": 0,
@ -627,7 +1119,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器当前运行的线程数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of threads currently running in the container",
"note": ""
}
]
},
{
"id": 0,
@ -642,7 +1146,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器当前运行的进程数",
"note": ""
},
{
"lang": "en_US",
"name": "Number of processes currently running in the container",
"note": ""
}
]
},
{
"id": 0,
@ -657,7 +1173,19 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器总 GPU 加速卡可用内存量",
"note": ""
},
{
"lang": "en_US",
"name": "Container Total GPU Accelerator Available Memory",
"note": ""
}
]
},
{
"id": 0,
@ -672,6 +1200,18 @@
"created_at": 0,
"created_by": "",
"updated_at": 0,
"updated_by": ""
"updated_by": "",
"translation": [
{
"lang": "zh_CN",
"name": "容器正在使用的 GPU 加速卡内存量",
"note": ""
},
{
"lang": "en_US",
"name": "The amount of GPU accelerator card memory the container is using",
"note": ""
}
]
}
]

View File

@ -8,6 +8,8 @@ import (
"github.com/ccfos/nightingale/v6/pkg/ctx"
)
const SYSTEM = "system"
// BuiltinComponent represents a builtin component along with its metadata.
type BuiltinComponent struct {
ID uint64 `json:"id" gorm:"primaryKey;type:bigint;autoIncrement;comment:'unique identifier'"`
@ -115,7 +117,7 @@ func BuiltinComponentGets(ctx *ctx.Context, query string, disabled int) ([]*Buil
var lst []*BuiltinComponent
err := session.Order("ident ASC").Find(&lst).Error
err := session.Order("disabled ASC, updated_at DESC, ident ASC").Find(&lst).Error
return lst, err
}

View File

@ -12,19 +12,26 @@ import (
// BuiltinMetric represents a metric along with its metadata.
type BuiltinMetric struct {
ID int64 `json:"id" gorm:"primaryKey;type:bigint;autoIncrement;comment:'unique identifier'"`
UUID int64 `json:"uuid" gorm:"type:bigint;not null;default:0;comment:'uuid'"`
Collector string `json:"collector" gorm:"uniqueIndex:idx_collector_typ_name;type:varchar(191);not null;index:idx_collector,sort:asc;comment:'type of collector'"`
Typ string `json:"typ" gorm:"uniqueIndex:idx_collector_typ_name;type:varchar(191);not null;index:idx_typ,sort:asc;comment:'type of metric'"`
Name string `json:"name" gorm:"uniqueIndex:idx_collector_typ_name;type:varchar(191);not null;index:idx_builtinmetric_name,sort:asc;comment:'name of metric'"`
Unit string `json:"unit" gorm:"type:varchar(191);not null;comment:'unit of metric'"`
Note string `json:"note" gorm:"type:varchar(4096);not null;comment:'description of metric'"`
Lang string `json:"lang" gorm:"uniqueIndex:idx_collector_typ_name;type:varchar(191);not null;default:'zh';index:idx_lang,sort:asc;comment:'language'"`
Expression string `json:"expression" gorm:"type:varchar(4096);not null;comment:'expression of metric'"`
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:'create time'"`
CreatedBy string `json:"created_by" gorm:"type:varchar(191);not null;default:'';comment:'creator'"`
UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:'update time'"`
UpdatedBy string `json:"updated_by" gorm:"type:varchar(191);not null;default:'';comment:'updater'"`
ID int64 `json:"id" gorm:"primaryKey;type:bigint;autoIncrement;comment:'unique identifier'"`
UUID int64 `json:"uuid" gorm:"type:bigint;not null;default:0;comment:'uuid'"`
Collector string `json:"collector" gorm:"type:varchar(191);not null;index:idx_collector,sort:asc;comment:'type of collector'"`
Typ string `json:"typ" gorm:"type:varchar(191);not null;index:idx_typ,sort:asc;comment:'type of metric'"`
Name string `json:"name" gorm:"type:varchar(191);not null;index:idx_builtinmetric_name,sort:asc;comment:'name of metric'"`
Unit string `json:"unit" gorm:"type:varchar(191);not null;comment:'unit of metric'"`
Note string `json:"note" gorm:"type:varchar(4096);not null;comment:'description of metric'"`
Lang string `json:"lang" gorm:"type:varchar(191);not null;default:'zh';index:idx_lang,sort:asc;comment:'language'"`
Translation []Translation `json:"translation" gorm:"type:text;serializer:json;comment:'translation of metric'"`
Expression string `json:"expression" gorm:"type:varchar(4096);not null;comment:'expression of metric'"`
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:'create time'"`
CreatedBy string `json:"created_by" gorm:"type:varchar(191);not null;default:'';comment:'creator'"`
UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:'update time'"`
UpdatedBy string `json:"updated_by" gorm:"type:varchar(191);not null;default:'';comment:'updater'"`
}
type Translation struct {
Lang string `json:"lang"`
Name string `json:"name"`
Note string `json:"note"`
}
func (bm *BuiltinMetric) TableName() string {
@ -36,6 +43,10 @@ func (bm *BuiltinMetric) TableOptions() string {
}
func (bm *BuiltinMetric) Verify() error {
if len(bm.Translation) == 0 {
return errors.New("translation is required")
}
bm.Collector = strings.TrimSpace(bm.Collector)
if bm.Collector == "" {
return errors.New("collector is blank")
@ -46,11 +57,6 @@ func (bm *BuiltinMetric) Verify() error {
return errors.New("type is blank")
}
bm.Name = strings.TrimSpace(bm.Name)
if bm.Name == "" {
return errors.New("name is blank")
}
return nil
}
@ -88,19 +94,9 @@ func (bm *BuiltinMetric) Update(ctx *ctx.Context, req BuiltinMetric) error {
return err
}
if bm.Lang != req.Lang && bm.Collector != req.Collector && bm.Typ != req.Typ && bm.Name != req.Name {
exists, err := BuiltinMetricExists(ctx, &req)
if err != nil {
return err
}
if exists {
return errors.New("builtin metric already exists")
}
}
req.UpdatedAt = time.Now().Unix()
req.CreatedAt = bm.CreatedAt
req.CreatedBy = bm.CreatedBy
req.Lang = bm.Lang
req.UUID = bm.UUID
return DB(ctx).Model(bm).Select("*").Updates(req).Error
@ -122,17 +118,9 @@ func BuiltinMetricGets(ctx *ctx.Context, lang, collector, typ, query, unit strin
return lst, err
}
func BuiltinMetricCount(ctx *ctx.Context, lang, collector, typ, query, unit string) (int64, error) {
session := DB(ctx).Model(&BuiltinMetric{})
session = builtinMetricQueryBuild(lang, collector, session, typ, query, unit)
var cnt int64
err := session.Count(&cnt).Error
return cnt, err
}
func builtinMetricQueryBuild(lang, collector string, session *gorm.DB, typ string, query, unit string) *gorm.DB {
session = session.Where("updated_by != ?", SYSTEM)
if lang != "" {
session = session.Where("lang = ?", lang)
}
@ -183,7 +171,7 @@ func BuiltinMetricGet(ctx *ctx.Context, where string, args ...interface{}) (*Bui
func BuiltinMetricTypes(ctx *ctx.Context, lang, collector, query string) ([]string, error) {
var typs []string
session := DB(ctx).Model(&BuiltinMetric{})
session := DB(ctx).Model(&BuiltinMetric{}).Where("updated_by != ?", SYSTEM)
if lang != "" {
session = session.Where("lang = ?", lang)
}
@ -202,7 +190,7 @@ func BuiltinMetricTypes(ctx *ctx.Context, lang, collector, query string) ([]stri
func BuiltinMetricCollectors(ctx *ctx.Context, lang, typ, query string) ([]string, error) {
var collectors []string
session := DB(ctx).Model(&BuiltinMetric{})
session := DB(ctx).Model(&BuiltinMetric{}).Where("updated_by != ?", SYSTEM)
if lang != "" {
session = session.Where("lang = ?", lang)
}

View File

@ -118,7 +118,7 @@ func BuiltinPayloadGet(ctx *ctx.Context, where string, args ...interface{}) (*Bu
}
func BuiltinPayloadGets(ctx *ctx.Context, componentId uint64, typ, cate, query string) ([]*BuiltinPayload, error) {
session := DB(ctx)
session := DB(ctx).Where("updated_by != ?", SYSTEM)
if typ != "" {
session = session.Where("type = ?", typ)
}
@ -146,7 +146,7 @@ func BuiltinPayloadGets(ctx *ctx.Context, componentId uint64, typ, cate, query s
// get cates of BuiltinPayload by type and component, return []string
func BuiltinPayloadCates(ctx *ctx.Context, typ string, componentID uint64) ([]string, error) {
var cates []string
err := DB(ctx).Model(new(BuiltinPayload)).Where("type = ? and component_id = ?", typ, componentID).Distinct("cate").Pluck("cate", &cates).Error
err := DB(ctx).Model(new(BuiltinPayload)).Where("type = ? and component_id = ? and updated_by != ?", typ, componentID, SYSTEM).Distinct("cate").Pluck("cate", &cates).Error
return cates, err
}