Commit b0af2d99 authored by alinamihaila's avatar alinamihaila Committed by Alper Akgun

Add topology metric definition

  - Add topology metric definition
  - Add object_json_schema attribute with a
  link to json schema of the object inside
  topology key
  - Remove duration_s and failures separate
  definitions
parent 549ea1d9
---
key_path: topology.failures
description: Contains information about failed queries
product_section: enablement
product_stage: enablement
product_group: group::memory
product_category:
value_type: number
status: data_available
time_frame: all
data_source: prometheus
distribution:
- ce
- ee
tier:
- free
- premium
- ultimate
skip_validation: true
{
"type": "object",
"required": ["duration", "failures"],
"properties": {
"duration": { "type": "number", "description": "The time it took to collect topology data" },
"failures": { "type": "array", "description": "The information about failed queries" },
"application_requests_per_hour": { "type": "number", "description": "The number of requests to the web application per hour" },
"nodes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"node_cpus": { "type": "number", "description": "The number of CPU cores of this node" },
"node_cpu_utilization": { "type": "number", "description": "The CPU utilization ratio of this node" },
"node_memory_total_bytes": { "type": "number", "description": "The total available memory of this node" },
"node_memory_utilization": { "type": "number", "description": "The memory utilization ratio of this node" },
"node_services": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string", "description": "The name of the GitLab service running on this node" },
"server": { "type": "string", "description": "The type of web server used (Unicorn or Puma)" },
"process_count": { "type": "number", "description": "The number of processes running for this service" },
"process_memory_rss": { "type": "number", "description": "The average Resident Set Size of a service process" },
"process_memory_uss": { "type": "number", "description": "The average Unique Set Size of a service process" },
"process_memory_pss": { "type": "number", "description": "The average Proportional Set Size of a service proces" }
}
}
},
"node_uname_info": {
"type": "object",
"properties": {
"machine": { "type": "string", "description": "The machine hardware name of this node" },
"release": { "type": "string", "description": "The operating system release of this node" },
"sysname": { "type": "string", "description": "The operating system name of this node" }
}
}
}
}
}
}
}
---
key_path: topology.duration_s
description: Time it took to collect topology data
key_path: topology
description: Topology data
product_section: enablement
product_stage: enablement
product_group: group::memory
product_category:
value_type: number
value_type: object
status: data_available
time_frame: all
milestone: "13.11"
introduced_by_url: https://gitlab.com/groups/gitlab-org/-/epics/3209
time_frame: none
data_source: prometheus
distribution:
- ce
......@@ -16,4 +18,4 @@ tier:
- free
- premium
- ultimate
skip_validation: true
object_json_schema: 'config/metrics/objects_schemas/topology_schema.json'
......@@ -14000,23 +14000,13 @@ Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
### `topology.duration_s`
### `topology`
Time it took to collect topology data
Topology data
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180922_duration_s.yml)
[Object JSON schema](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/objects_schemas/topology_schema.json)
Group: `group::memory`
Status: `data_available`
Tiers: `free`, `premium`, `ultimate`
### `topology.failures`
Contains information about failed queries
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/counts_all/20210216180924_failures.yml)
[YAML definition](https://gitlab.com/gitlab-org/gitlab/-/blob/master/config/metrics/settings/20210323120839_topology.yml)
Group: `group::memory`
......
......@@ -33,6 +33,10 @@ module Gitlab
object[:description]
end
def render_object_schema(object)
"[Object JSON schema](#{object.json_schema_path})"
end
def render_yaml_link(yaml_path)
"[YAML definition](#{yaml_path})"
end
......
......@@ -27,6 +27,9 @@
= render_name(name)
\
= render_description(object.attributes)
- if object.has_json_schema?
\
= render_object_schema(object)
\
= render_yaml_link(object.yaml_path)
\
......
......@@ -22,6 +22,16 @@ module Gitlab
attributes
end
def json_schema_path
return '' unless has_json_schema?
"#{BASE_REPO_PATH}/#{attributes[:object_json_schema]}"
end
def has_json_schema?
attributes[:value_type] == 'object' && attributes[:object_json_schema].present?
end
def yaml_path
"#{BASE_REPO_PATH}#{path.delete_prefix(Rails.root.to_s)}"
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment