功能介绍
控制服务状态页面接口调用说明。
URI
GET /apis/monitoring/v1/ecms/services
可选Metrics
名称 | 说明 | 运行中 | 警告 | 停止 | 无数据 | 禁用 | 未知 | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
控制服务状态–Service Running State | ||||||||||||||
service_control_api_state | 控制 API 服务 Control Plane API Service |
[99.9, 10000) | [0.1, 99.9) | [0, 0.1) | [null, null) | |||||||||
service_control_scheduler_state | 控制调度服务 Control Plane Scheduler Service |
[99.9, 10000) | [0.1, 99.9) | [0, 0.1) | [null, null) | |||||||||
service_control_management_state | 控制管理服务 Control Plane Management Service |
[99.9, 10000) | [0.1, 99.9) | [0, 0.1) | [null, null) | |||||||||
service_compute_api_state | 计算 API 服务 Compute API Service |
1 | 0 | null | 2 | |||||||||
service_compute_management_state | 计算管理服务 Compute Management Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_compute_state | 计算服务 Compute Service |
[0, 0.9) | [0.9, 2.9) | [2.9, 10000) | [null, null) | [-10000, -0.9) | ||||||||
service_compute_scheduler_state | 计算调度服务 Compute Scheduler Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_network_vnc_state | VNC 权限管理服务 VNC Privilege Management Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_network_api_state | 网络 API 服务 Network API Service |
1 | 0 | null | 2 | |||||||||
service_network_metadata_state | 网络元数据服务 Network Metadata Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_network_virtual_switch_state | 虚拟交换网络服务 Virtual Switch Network Service |
[0, 0.9) | [0.9, 2.9) | [2.9, 10000) | [null, null) | [-10000, -0.9) | ||||||||
service_network_dhcp_state | 网络 DHCP 服务 Network DHCP Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_authentication_api_state | 认证 API 服务 Authentication API Service |
1 | 0 | null | 2 | |||||||||
service_image_management_state | 镜像管理 API 服务 Image Management API Service |
1 | 0 | null | 2 | |||||||||
service_virtualization_management_state | 虚拟化管理服务 Virtualization Management Service |
[0, 0.9) | [0.9, 2.9) | [2.9, 10000) | [null, null) | [-10000, -0.9) | ||||||||
service_hostha_state | 主机高可用服务 HostHA Service |
1 | -1 | null | 0 | 2 | ||||||||
service_rabbitmq_state | 消息队列服务 MQ Service |
[99.9, 10000) | [0.1, 99.9) | [-10000, 0.1) | [null, null) | |||||||||
service_database_state | 数据库服务 Database Service |
1 | 0 | null | 2 | |||||||||
service_automation_center_state | 自动化中心服务 Automation Center Service |
[2.9, 100.1) | [0.9, 2.9) | [0, 0.9) | [null, null) | |||||||||
service_time_synchronization_state | 时间同步服务 Time Synchronization Service |
[0.9, 100.1) | [0, 0.9) | [null, null) | ||||||||||
service_cloud_console_state | 云控制台 Cloud Service Console |
1 | 0 | null | ||||||||||
service_cloud_automation_state | 自动化中心 Cloud Automation Service |
1 | 0 | null | ||||||||||
service_network_l3_state | 3层网络服务 L3 Network Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_network_lb_state | 网络负载均衡服务 Network LB Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_high_performance_cache_state | 高性能缓存服务 High Performance Cache Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_high_performance_cache_management_state | 高性能缓存管理服务 High Performance Cache Management Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
控制子服务运行状态–Sub-service Running State | ||||||||||||||
service_block_storage_api_state | 块存储 API 服务 Block Storage API Service |
1 | 0 | null | 2 | |||||||||
service_block_storage_scheduler_state | 块存储调度服务 Block Storage Scheduler Service |
[0.1, 100.1) | [0, 0) | [null, null) | ||||||||||
service_block_storage_state | 块存储服务 Block Storage Service |
[0, 0.1) | [0.1, 99.9) | [99.9, 100.1) | [null, null) | |||||||||
service_block_storage_backup_state | 块存储备份服务 Block Storage Backup Service |
[0.1, 100.1) | [0, 0) | [null, null) | ||||||||||
service_monitoring_api_state | 监控 API 服务 Monitoring API Service |
1 | 0 | null | 2 | |||||||||
service_monitoring_alert_api_state | 监控告警 API 服务 Monitoring Alert API Service |
1 | 0 | null | 2 | |||||||||
service_monitoring_storage_api_state | 监控数据存储 API 服务 Monitoring Data Storage API Service |
1 | 0 | null | 2 | |||||||||
service_log_collection_state | 日志收集服务 Log Collection Service |
1 | 0 | null | ||||||||||
service_event_mesh_state | 事件网格服务 Event Mesh Service |
[99.9, 10000) | [0.1, 99.9) | [-10000, 0.1) | [null, null) | |||||||||
service_data_protection_state | 数据保护服务 Data Protection Service |
[99.9, 10000) | [0.1, 99.9) | [-10000, 0.1) | [null, null) | |||||||||
service_orchestration_api_state | 编排 API 服务 Orchestration API Service |
1 | 0 | null | 2 | |||||||||
service_container_cluster_management_api_state | 容器集群管理 API 服务 Container Cluster Management API Service |
1 | 0 | null | 2 | |||||||||
service_app_center_api_state | 应用中心 API 服务 APP Center API Service |
1 | 0 | null | 2 | |||||||||
service_object_storage_api_state | 对象存储 API 服务 Object Storage API Service |
1 | 0 | null | 2 | |||||||||
service_billing_api_state | 计费 API 服务 Billing API Service |
1 | 0 | null | 2 | |||||||||
service_billing_account_management_api_state | 计费账户管理 API 服务 Billing Account Management API Service |
1 | 0 | null | 2 |
说明:
查询metrics返回值有实数(或null)和区间两种类型,如 0,[0, 0.1)
以上服务可能存在的六种状态:
- 运行中(Running)
- 警告(Warning)
- 停止(Stopped)
- 无数据(No data)
- 禁用(Disabled)
- 未知(Unknown)
示例
示例一:查询控制API服务状态
请求示例:
cURI -H 'X-Auth-Token: gAAAAABf_Qb8yyZ2zM-uhK7q5c8D6ikGc7A5o4FenPkzYlpCI2PhJXtnDOyl9EeCQ-Gj9lg0SV37PIZda3nlUCTrBawfsbnSM1pw-9QJWoEo3NDxSvM5fyhQIadjI17H0jV40NHx9tc3EkIxrAScXhxZsldOt9uVjRO6cq9pFTKs6qhxyu1GBHk' 'http://emla.openstack.svc.cluster.local/apis/monitoring/v1/ecms/services?metrics_filter=service_control_api_state'
响应示例:
{
"results": [
{
"metric_name": "service_control_api_state",
"data": {
"resultType": "vector",
"result": [
{
"value": [
1609216641.367,
"100"
]
}
]
}
}
]
}
value[1609216641.367, “100”] : 第一个值 1609216641.367 为时间戳, 第二个“100”为服务状态值,“100” 在 [99.9, 10000)范围内, 所以此时控制 API 服务状态为运行中。
示例二:查询计算服务和监控API服务状态
请求示例:
cURI -H 'X-Auth-Token: gAAAAABf_Qb8yyZ2zM-uhK7q5c8D6ikGc7A5o4FenPkzYlpCI2PhJXtnDOyl9EeCQ-Gj9lg0SV37PIZda3nlUCTrBawfsbnSM1pw-9QJWoEo3NDxSvM5fyhQIadjI17H0jV40NHx9tc3EkIxrAScXhxZsldOt9uVjRO6cq9pFTKs6qhxyu1GBHk' 'http://emla.openstack.svc.cluster.local/apis/monitoring/v1/ecms/services?metrics_filter=service_compute_state|service_monitoring_api_state'
响应示例:
{
"results": [
{
"metric_name": "service_compute_state",
"data": {
"resultType": "vector",
"result": [
{
"value": [
1609218576.298,
"1"
]
}
]
}
},
{
"metric_name": "service_monitoring_api_state",
"data": {
"resultType": "vector",
"result": [
{
"metric": {
"__name__": "check_ceilometer_api",
"application": "prometheus-openstack-exporter",
"component": "metrics",
"instance": "openstack-exporter",
"job": "openstack-metrics",
"kubernetes_name": "openstack-metrics",
"kubernetes_namespace": "openstack",
"region": "RegionOne",
"release_group": "prometheus-openstack-exporter",
"service": "ceilometer",
"URI": "http://ceilometer-api.openstack.svc.cluster.local:8777/v2/capabilities"
},
"value": [
1609218576.298,
"0"
]
}
]
}
}
]
}
- service_compute_state:“1”在[0.9, 2.9)范围内, 计算服务状态为警告。
- service_monitoring_api_state:“0”对应Stopped,监控API服务状态为停止。