sbcli-dev 17.2.9__tar.gz → 17.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/PKG-INFO +1 -1
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/env_var +1 -1
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +21 -21
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -2
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/prometheus.yml +1 -5
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/capacity_and_stats_collector.py +1 -101
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/lvol_stat_collector.py +1 -81
- sbcli_dev-17.3.1/simplyblock_web/blueprints/web_api_metrics.py +197 -0
- sbcli_dev-17.2.9/simplyblock_web/blueprints/web_api_metrics.py +0 -31
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/README.md +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/pyproject.toml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/requirements.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/setup.cfg +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/setup.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_cli/clibase.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/README.md +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/app.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/utils.py +0 -0
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml
RENAMED
|
@@ -67,27 +67,27 @@ services:
|
|
|
67
67
|
networks:
|
|
68
68
|
- monitoring-net
|
|
69
69
|
|
|
70
|
-
promagent:
|
|
71
|
-
image: simplyblock/promagent
|
|
72
|
-
environment:
|
|
73
|
-
ClusterID: "${CLUSTER_ID}"
|
|
74
|
-
ClusterIP: "HAProxy"
|
|
75
|
-
ClusterSecret: "${CLUSTER_SECRET}"
|
|
76
|
-
deploy:
|
|
77
|
-
mode: global
|
|
78
|
-
placement:
|
|
79
|
-
constraints: [node.role == manager]
|
|
80
|
-
networks:
|
|
81
|
-
- monitoring-net
|
|
82
|
-
|
|
83
|
-
pushgateway:
|
|
84
|
-
image: prom/pushgateway
|
|
85
|
-
deploy:
|
|
86
|
-
mode: global
|
|
87
|
-
placement:
|
|
88
|
-
constraints: [node.role == manager]
|
|
89
|
-
networks:
|
|
90
|
-
- monitoring-net
|
|
70
|
+
# promagent:
|
|
71
|
+
# image: simplyblock/promagent
|
|
72
|
+
# environment:
|
|
73
|
+
# ClusterID: "${CLUSTER_ID}"
|
|
74
|
+
# ClusterIP: "HAProxy"
|
|
75
|
+
# ClusterSecret: "${CLUSTER_SECRET}"
|
|
76
|
+
# deploy:
|
|
77
|
+
# mode: global
|
|
78
|
+
# placement:
|
|
79
|
+
# constraints: [node.role == manager]
|
|
80
|
+
# networks:
|
|
81
|
+
# - monitoring-net
|
|
82
|
+
#
|
|
83
|
+
# pushgateway:
|
|
84
|
+
# image: prom/pushgateway
|
|
85
|
+
# deploy:
|
|
86
|
+
# mode: global
|
|
87
|
+
# placement:
|
|
88
|
+
# constraints: [node.role == manager]
|
|
89
|
+
# networks:
|
|
90
|
+
# - monitoring-net
|
|
91
91
|
|
|
92
92
|
prometheus:
|
|
93
93
|
image: prom/prometheus:v2.44.0
|
|
@@ -113,7 +113,6 @@ services:
|
|
|
113
113
|
constraints: [node.role == manager]
|
|
114
114
|
volumes:
|
|
115
115
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
116
|
-
- "/etc/simplyblock:/etc/simplyblock"
|
|
117
116
|
networks:
|
|
118
117
|
- hostnet
|
|
119
118
|
environment:
|
|
@@ -171,7 +170,6 @@ services:
|
|
|
171
170
|
constraints: [node.role == manager]
|
|
172
171
|
volumes:
|
|
173
172
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
174
|
-
- "/etc/simplyblock:/etc/simplyblock"
|
|
175
173
|
networks:
|
|
176
174
|
- hostnet
|
|
177
175
|
environment:
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
global:
|
|
2
|
-
scrape_interval:
|
|
2
|
+
scrape_interval: 30s
|
|
3
3
|
external_labels:
|
|
4
4
|
monitor: 'codelab-monitor'
|
|
5
5
|
|
|
6
6
|
scrape_configs:
|
|
7
|
-
- job_name: 'metricsgateway'
|
|
8
|
-
static_configs:
|
|
9
|
-
- targets: ['pushgateway:9091']
|
|
10
7
|
|
|
11
8
|
- job_name: 'cluster_metrics'
|
|
12
9
|
static_configs:
|
|
13
10
|
- targets: ['HAProxy:80']
|
|
14
|
-
|
|
15
11
|
honor_labels: true
|
|
16
12
|
metrics_path: '/cluster/metrics'
|
|
17
13
|
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/capacity_and_stats_collector.py
RENAMED
|
@@ -2,16 +2,12 @@
|
|
|
2
2
|
import os
|
|
3
3
|
import time
|
|
4
4
|
|
|
5
|
-
from simplyblock_core import constants, db_controller, utils
|
|
5
|
+
from simplyblock_core import constants, db_controller, utils
|
|
6
6
|
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
7
7
|
from simplyblock_core.models.storage_node import StorageNode
|
|
8
8
|
from simplyblock_core.rpc_client import RPCClient
|
|
9
9
|
from simplyblock_core.models.stats import DeviceStatObject, NodeStatObject, ClusterStatObject
|
|
10
10
|
|
|
11
|
-
PROMETHEUS_MULTIPROC_DIR = constants.PROMETHEUS_MULTIPROC_DIR
|
|
12
|
-
os.environ["PROMETHEUS_MULTIPROC_DIR"] = PROMETHEUS_MULTIPROC_DIR
|
|
13
|
-
from prometheus_client import Gauge, CollectorRegistry, multiprocess
|
|
14
|
-
|
|
15
11
|
logger = utils.get_logger(__name__)
|
|
16
12
|
|
|
17
13
|
|
|
@@ -88,17 +84,6 @@ def add_device_stats(cl, device, capacity_dict, stats_dict):
|
|
|
88
84
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
89
85
|
last_object_record[device.get_id()] = stat_obj
|
|
90
86
|
|
|
91
|
-
ng = get_device_metrics()
|
|
92
|
-
for g in ng:
|
|
93
|
-
v = g.replace("device_", "")
|
|
94
|
-
if v in data:
|
|
95
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(data[v])
|
|
96
|
-
elif v == "status_code":
|
|
97
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(device.get_status_code())
|
|
98
|
-
elif v == "health_check":
|
|
99
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(device.health_check)
|
|
100
|
-
|
|
101
|
-
|
|
102
87
|
return stat_obj
|
|
103
88
|
|
|
104
89
|
|
|
@@ -133,16 +118,6 @@ def add_node_stats(node, records):
|
|
|
133
118
|
stat_obj = NodeStatObject(data=data)
|
|
134
119
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
135
120
|
|
|
136
|
-
ng = get_snode_metrics()
|
|
137
|
-
for g in ng:
|
|
138
|
-
v = g.replace("snode_", "")
|
|
139
|
-
if v in data:
|
|
140
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(data[v])
|
|
141
|
-
elif v == "status_code":
|
|
142
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(node.get_status_code())
|
|
143
|
-
elif v == "health_check":
|
|
144
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(node.health_check)
|
|
145
|
-
|
|
146
121
|
return stat_obj
|
|
147
122
|
|
|
148
123
|
|
|
@@ -172,84 +147,9 @@ def add_cluster_stats(cl, records):
|
|
|
172
147
|
stat_obj = ClusterStatObject(data=data)
|
|
173
148
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
174
149
|
|
|
175
|
-
ng = get_cluster_metrics()
|
|
176
|
-
for g in ng:
|
|
177
|
-
v = g.replace("cluster_", "")
|
|
178
|
-
if v in data:
|
|
179
|
-
ng[g].labels(cluster=cl.get_id()).set(data[v])
|
|
180
|
-
elif v == "status_code":
|
|
181
|
-
ng[g].labels(cluster=cl.get_id()).set(cl.get_status_code())
|
|
182
|
-
|
|
183
150
|
return stat_obj
|
|
184
151
|
|
|
185
152
|
|
|
186
|
-
if not os.path.exists(PROMETHEUS_MULTIPROC_DIR):
|
|
187
|
-
shell_utils.run_command(f"mkdir -p {PROMETHEUS_MULTIPROC_DIR}")
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
registry = CollectorRegistry()
|
|
191
|
-
multiprocess.MultiProcessCollector(registry)
|
|
192
|
-
|
|
193
|
-
io_stats_keys = [
|
|
194
|
-
"date",
|
|
195
|
-
"read_bytes",
|
|
196
|
-
"read_bytes_ps",
|
|
197
|
-
"read_io_ps",
|
|
198
|
-
"read_io",
|
|
199
|
-
"read_latency_ps",
|
|
200
|
-
"write_bytes",
|
|
201
|
-
"write_bytes_ps",
|
|
202
|
-
"write_io",
|
|
203
|
-
"write_io_ps",
|
|
204
|
-
"write_latency_ps",
|
|
205
|
-
"size_total",
|
|
206
|
-
"size_prov",
|
|
207
|
-
"size_used",
|
|
208
|
-
"size_free",
|
|
209
|
-
"size_util",
|
|
210
|
-
"size_prov_util",
|
|
211
|
-
"read_latency_ticks",
|
|
212
|
-
"record_duration",
|
|
213
|
-
"record_end_time",
|
|
214
|
-
"record_start_time",
|
|
215
|
-
"unmap_bytes",
|
|
216
|
-
"unmap_bytes_ps",
|
|
217
|
-
"unmap_io",
|
|
218
|
-
"unmap_io_ps",
|
|
219
|
-
"unmap_latency_ps",
|
|
220
|
-
"unmap_latency_ticks",
|
|
221
|
-
"write_latency_ticks",
|
|
222
|
-
]
|
|
223
|
-
|
|
224
|
-
ng = {}
|
|
225
|
-
cg = {}
|
|
226
|
-
dg = {}
|
|
227
|
-
|
|
228
|
-
def get_device_metrics():
|
|
229
|
-
global dg
|
|
230
|
-
if not dg:
|
|
231
|
-
labels = ['cluster', "snode", "device"]
|
|
232
|
-
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
233
|
-
dg["device_" + k] = Gauge("device_" + k, "device_" + k, labelnames=labels, registry=registry)
|
|
234
|
-
return dg
|
|
235
|
-
|
|
236
|
-
def get_snode_metrics():
|
|
237
|
-
global ng
|
|
238
|
-
if not ng:
|
|
239
|
-
labels = ['cluster', "snode"]
|
|
240
|
-
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
241
|
-
ng["snode_" + k] = Gauge("snode_" + k, "snode_" + k, labelnames=labels, registry=registry)
|
|
242
|
-
return ng
|
|
243
|
-
|
|
244
|
-
def get_cluster_metrics():
|
|
245
|
-
global cg
|
|
246
|
-
if not cg:
|
|
247
|
-
labels = ['cluster']
|
|
248
|
-
for k in io_stats_keys + ["status_code"]:
|
|
249
|
-
cg["cluster_" + k] = Gauge("cluster_" + k, "cluster_" + k, labelnames=labels, registry=registry)
|
|
250
|
-
return cg
|
|
251
|
-
|
|
252
|
-
|
|
253
153
|
|
|
254
154
|
# get DB controller
|
|
255
155
|
db_controller = db_controller.DBController()
|
|
@@ -2,79 +2,18 @@
|
|
|
2
2
|
import time
|
|
3
3
|
import os
|
|
4
4
|
|
|
5
|
-
from simplyblock_core import constants, db_controller, utils
|
|
5
|
+
from simplyblock_core import constants, db_controller, utils
|
|
6
6
|
from simplyblock_core.controllers import lvol_events
|
|
7
7
|
from simplyblock_core.models.cluster import Cluster
|
|
8
8
|
from simplyblock_core.models.lvol_model import LVol
|
|
9
9
|
from simplyblock_core.models.stats import LVolStatObject, PoolStatObject
|
|
10
10
|
from simplyblock_core.models.storage_node import StorageNode
|
|
11
11
|
from simplyblock_core.rpc_client import RPCClient
|
|
12
|
-
PROMETHEUS_MULTIPROC_DIR = constants.PROMETHEUS_MULTIPROC_DIR
|
|
13
|
-
os.environ["PROMETHEUS_MULTIPROC_DIR"] = PROMETHEUS_MULTIPROC_DIR
|
|
14
|
-
from prometheus_client import Gauge, CollectorRegistry, multiprocess
|
|
15
|
-
|
|
16
|
-
if not os.path.exists(PROMETHEUS_MULTIPROC_DIR):
|
|
17
|
-
shell_utils.run_command(f"mkdir -p {PROMETHEUS_MULTIPROC_DIR}")
|
|
18
|
-
|
|
19
12
|
|
|
20
13
|
logger = utils.get_logger(__name__)
|
|
21
14
|
|
|
22
15
|
last_object_record = {}
|
|
23
16
|
|
|
24
|
-
registry = CollectorRegistry()
|
|
25
|
-
multiprocess.MultiProcessCollector(registry)
|
|
26
|
-
|
|
27
|
-
io_stats_keys = [
|
|
28
|
-
"date",
|
|
29
|
-
"read_bytes",
|
|
30
|
-
"read_bytes_ps",
|
|
31
|
-
"read_io_ps",
|
|
32
|
-
"read_io",
|
|
33
|
-
"read_latency_ps",
|
|
34
|
-
"write_bytes",
|
|
35
|
-
"write_bytes_ps",
|
|
36
|
-
"write_io",
|
|
37
|
-
"write_io_ps",
|
|
38
|
-
"write_latency_ps",
|
|
39
|
-
"size_total",
|
|
40
|
-
"size_prov",
|
|
41
|
-
"size_used",
|
|
42
|
-
"size_free",
|
|
43
|
-
"size_util",
|
|
44
|
-
"size_prov_util",
|
|
45
|
-
"read_latency_ticks",
|
|
46
|
-
"record_duration",
|
|
47
|
-
"record_end_time",
|
|
48
|
-
"record_start_time",
|
|
49
|
-
"unmap_bytes",
|
|
50
|
-
"unmap_bytes_ps",
|
|
51
|
-
"unmap_io",
|
|
52
|
-
"unmap_io_ps",
|
|
53
|
-
"unmap_latency_ps",
|
|
54
|
-
"unmap_latency_ticks",
|
|
55
|
-
"write_latency_ticks",
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
lg = {}
|
|
59
|
-
pg = {}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def get_lvol_metrics():
|
|
63
|
-
global lg
|
|
64
|
-
if not lg:
|
|
65
|
-
labels = ['cluster', "pool", "lvol"]
|
|
66
|
-
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
67
|
-
lg["lvol_" + k] = Gauge("lvol_" + k, "lvol_" + k, labelnames=labels, registry=registry)
|
|
68
|
-
return lg
|
|
69
|
-
|
|
70
|
-
def get_pool_metrics():
|
|
71
|
-
global pg
|
|
72
|
-
if not pg:
|
|
73
|
-
labels = ['cluster', "pool", "name"]
|
|
74
|
-
for k in io_stats_keys + ["status_code"]:
|
|
75
|
-
pg["pool_" + k] = Gauge("pool_" + k, "pool_" + k, labelnames=labels, registry=registry)
|
|
76
|
-
return pg
|
|
77
|
-
|
|
78
17
|
|
|
79
18
|
def sum_stats(stats_list):
|
|
80
19
|
if not stats_list or len(stats_list) == 0:
|
|
@@ -216,16 +155,6 @@ def add_lvol_stats(cluster, lvol, stats_list, capacity_dict=None):
|
|
|
216
155
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
217
156
|
last_object_record[lvol.get_id()] = stat_obj
|
|
218
157
|
|
|
219
|
-
ng = get_lvol_metrics()
|
|
220
|
-
for g in ng:
|
|
221
|
-
v = g.replace("lvol_", "")
|
|
222
|
-
if v in data:
|
|
223
|
-
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(data[v])
|
|
224
|
-
elif v == "status_code":
|
|
225
|
-
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(lvol.get_status_code())
|
|
226
|
-
elif v == "health_check":
|
|
227
|
-
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(lvol.health_check)
|
|
228
|
-
|
|
229
158
|
return stat_obj
|
|
230
159
|
|
|
231
160
|
|
|
@@ -245,15 +174,6 @@ def add_pool_stats(pool, records):
|
|
|
245
174
|
|
|
246
175
|
stat_obj = PoolStatObject(data=data)
|
|
247
176
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
248
|
-
|
|
249
|
-
ng = get_pool_metrics()
|
|
250
|
-
for g in ng:
|
|
251
|
-
v = g.replace("pool_", "")
|
|
252
|
-
if v in data:
|
|
253
|
-
ng[g].labels(cluster=cluster.get_id(), name=pool.pool_name, pool=pool.get_id()).set(data[v])
|
|
254
|
-
elif v == "status_code":
|
|
255
|
-
ng[g].labels(cluster=cluster.get_id(), name=pool.pool_name, pool=pool.get_id()).set(pool.get_status_code())
|
|
256
|
-
|
|
257
177
|
return stat_obj
|
|
258
178
|
|
|
259
179
|
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
# encoding: utf-8
|
|
3
|
+
import json
|
|
4
|
+
import logging
|
|
5
|
+
import os
|
|
6
|
+
|
|
7
|
+
from flask import Blueprint
|
|
8
|
+
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
9
|
+
from simplyblock_core.models.storage_node import StorageNode
|
|
10
|
+
from simplyblock_core import db_controller
|
|
11
|
+
|
|
12
|
+
from prometheus_client import generate_latest
|
|
13
|
+
from flask import Response
|
|
14
|
+
from prometheus_client import Gauge, CollectorRegistry
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
logger = logging.getLogger(__name__)
|
|
18
|
+
|
|
19
|
+
bp = Blueprint("metrics", __name__)
|
|
20
|
+
|
|
21
|
+
registry = CollectorRegistry()
|
|
22
|
+
db_controller = db_controller.DBController()
|
|
23
|
+
|
|
24
|
+
io_stats_keys = [
|
|
25
|
+
"date",
|
|
26
|
+
"read_bytes",
|
|
27
|
+
"read_bytes_ps",
|
|
28
|
+
"read_io_ps",
|
|
29
|
+
"read_io",
|
|
30
|
+
"read_latency_ps",
|
|
31
|
+
"write_bytes",
|
|
32
|
+
"write_bytes_ps",
|
|
33
|
+
"write_io",
|
|
34
|
+
"write_io_ps",
|
|
35
|
+
"write_latency_ps",
|
|
36
|
+
"size_total",
|
|
37
|
+
"size_prov",
|
|
38
|
+
"size_used",
|
|
39
|
+
"size_free",
|
|
40
|
+
"size_util",
|
|
41
|
+
"size_prov_util",
|
|
42
|
+
"read_latency_ticks",
|
|
43
|
+
"record_duration",
|
|
44
|
+
"record_end_time",
|
|
45
|
+
"record_start_time",
|
|
46
|
+
"unmap_bytes",
|
|
47
|
+
"unmap_bytes_ps",
|
|
48
|
+
"unmap_io",
|
|
49
|
+
"unmap_io_ps",
|
|
50
|
+
"unmap_latency_ps",
|
|
51
|
+
"unmap_latency_ticks",
|
|
52
|
+
"write_latency_ticks",
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
ng = {}
|
|
56
|
+
cg = {}
|
|
57
|
+
dg = {}
|
|
58
|
+
lg = {}
|
|
59
|
+
pg = {}
|
|
60
|
+
|
|
61
|
+
def get_device_metrics():
|
|
62
|
+
global dg
|
|
63
|
+
if not dg:
|
|
64
|
+
labels = ['cluster', "snode", "device"]
|
|
65
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
66
|
+
dg["device_" + k] = Gauge("device_" + k, "device_" + k, labelnames=labels, registry=registry)
|
|
67
|
+
return dg
|
|
68
|
+
|
|
69
|
+
def get_snode_metrics():
|
|
70
|
+
global ng
|
|
71
|
+
if not ng:
|
|
72
|
+
labels = ['cluster', "snode"]
|
|
73
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
74
|
+
ng["snode_" + k] = Gauge("snode_" + k, "snode_" + k, labelnames=labels, registry=registry)
|
|
75
|
+
return ng
|
|
76
|
+
|
|
77
|
+
def get_cluster_metrics():
|
|
78
|
+
global cg
|
|
79
|
+
if not cg:
|
|
80
|
+
labels = ['cluster']
|
|
81
|
+
for k in io_stats_keys + ["status_code"]:
|
|
82
|
+
cg["cluster_" + k] = Gauge("cluster_" + k, "cluster_" + k, labelnames=labels, registry=registry)
|
|
83
|
+
return cg
|
|
84
|
+
|
|
85
|
+
def get_lvol_metrics():
|
|
86
|
+
global lg
|
|
87
|
+
if not lg:
|
|
88
|
+
labels = ['cluster', "pool", "lvol"]
|
|
89
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
90
|
+
lg["lvol_" + k] = Gauge("lvol_" + k, "lvol_" + k, labelnames=labels, registry=registry)
|
|
91
|
+
return lg
|
|
92
|
+
|
|
93
|
+
def get_pool_metrics():
|
|
94
|
+
global pg
|
|
95
|
+
if not pg:
|
|
96
|
+
labels = ['cluster', "pool", "name"]
|
|
97
|
+
for k in io_stats_keys + ["status_code"]:
|
|
98
|
+
pg["pool_" + k] = Gauge("pool_" + k, "pool_" + k, labelnames=labels, registry=registry)
|
|
99
|
+
return pg
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
@bp.route('/cluster/metrics', methods=['GET'])
|
|
103
|
+
def get_data():
|
|
104
|
+
|
|
105
|
+
clusters = db_controller.get_clusters()
|
|
106
|
+
for cl in clusters:
|
|
107
|
+
|
|
108
|
+
records = db_controller.get_cluster_stats(cl, 1)
|
|
109
|
+
if records:
|
|
110
|
+
data = records[0].get_clean_dict()
|
|
111
|
+
ng = get_cluster_metrics()
|
|
112
|
+
for g in ng:
|
|
113
|
+
v = g.replace("cluster_", "")
|
|
114
|
+
if v in data:
|
|
115
|
+
ng[g].labels(cluster=cl.get_id()).set(data[v])
|
|
116
|
+
elif v == "status_code":
|
|
117
|
+
ng[g].labels(cluster=cl.get_id()).set(cl.get_status_code())
|
|
118
|
+
|
|
119
|
+
snodes = db_controller.get_storage_nodes_by_cluster_id(cl.get_id())
|
|
120
|
+
for node in snodes:
|
|
121
|
+
logger.info("Node: %s", node.get_id())
|
|
122
|
+
if node.status != StorageNode.STATUS_ONLINE:
|
|
123
|
+
logger.info("Node is not online, skipping")
|
|
124
|
+
continue
|
|
125
|
+
|
|
126
|
+
if not node.nvme_devices:
|
|
127
|
+
logger.error("No devices found in node: %s", node.get_id())
|
|
128
|
+
continue
|
|
129
|
+
|
|
130
|
+
records = db_controller.get_node_stats(node, 1)
|
|
131
|
+
if records:
|
|
132
|
+
data = records[0].get_clean_dict()
|
|
133
|
+
ng = get_snode_metrics()
|
|
134
|
+
for g in ng:
|
|
135
|
+
v = g.replace("snode_", "")
|
|
136
|
+
if v in data:
|
|
137
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(data[v])
|
|
138
|
+
elif v == "status_code":
|
|
139
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(node.get_status_code())
|
|
140
|
+
elif v == "health_check":
|
|
141
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id()).set(node.health_check)
|
|
142
|
+
|
|
143
|
+
for device in node.nvme_devices:
|
|
144
|
+
|
|
145
|
+
logger.info("Getting device stats: %s", device.uuid)
|
|
146
|
+
if device.status not in [NVMeDevice.STATUS_ONLINE, NVMeDevice.STATUS_READONLY, NVMeDevice.STATUS_CANNOT_ALLOCATE]:
|
|
147
|
+
logger.info(f"Device is skipped: {device.get_id()} status: {device.status}")
|
|
148
|
+
continue
|
|
149
|
+
|
|
150
|
+
records= db_controller.get_device_stats(device, 1)
|
|
151
|
+
if records:
|
|
152
|
+
data = records[0].get_clean_dict()
|
|
153
|
+
ng = get_device_metrics()
|
|
154
|
+
for g in ng:
|
|
155
|
+
v = g.replace("device_", "")
|
|
156
|
+
if v in data:
|
|
157
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(data[v])
|
|
158
|
+
elif v == "status_code":
|
|
159
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(
|
|
160
|
+
device.get_status_code())
|
|
161
|
+
elif v == "health_check":
|
|
162
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(
|
|
163
|
+
device.health_check)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
for pool in db_controller.get_pools():
|
|
167
|
+
|
|
168
|
+
records = db_controller.get_pool_stats(pool, 1)
|
|
169
|
+
if records:
|
|
170
|
+
data = records[0].get_clean_dict()
|
|
171
|
+
ng = get_pool_metrics()
|
|
172
|
+
for g in ng:
|
|
173
|
+
v = g.replace("pool_", "")
|
|
174
|
+
if v in data:
|
|
175
|
+
ng[g].labels(cluster=cl.get_id(), name=pool.pool_name, pool=pool.get_id()).set(data[v])
|
|
176
|
+
elif v == "status_code":
|
|
177
|
+
ng[g].labels(cluster=cl.get_id(), name=pool.pool_name, pool=pool.get_id()).set(
|
|
178
|
+
pool.get_status_code())
|
|
179
|
+
|
|
180
|
+
for lvol in db_controller.get_lvols(cl.get_id()):
|
|
181
|
+
records = db_controller.get_lvol_stats(lvol, limit=1)
|
|
182
|
+
if records:
|
|
183
|
+
data = records[0].get_clean_dict()
|
|
184
|
+
ng = get_lvol_metrics()
|
|
185
|
+
for g in ng:
|
|
186
|
+
v = g.replace("lvol_", "")
|
|
187
|
+
if v in data:
|
|
188
|
+
ng[g].labels(cluster=cl.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(data[v])
|
|
189
|
+
elif v == "status_code":
|
|
190
|
+
ng[g].labels(cluster=cl.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(
|
|
191
|
+
lvol.get_status_code())
|
|
192
|
+
elif v == "health_check":
|
|
193
|
+
ng[g].labels(cluster=cl.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(
|
|
194
|
+
lvol.health_check)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
return Response(generate_latest(registry), mimetype=str('text/plain; version=0.0.4; charset=utf-8'))
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python
|
|
2
|
-
# encoding: utf-8
|
|
3
|
-
import json
|
|
4
|
-
import logging
|
|
5
|
-
import os
|
|
6
|
-
|
|
7
|
-
from flask import Blueprint
|
|
8
|
-
from simplyblock_core import constants, shell_utils
|
|
9
|
-
|
|
10
|
-
PROMETHEUS_MULTIPROC_DIR = constants.PROMETHEUS_MULTIPROC_DIR
|
|
11
|
-
os.environ["PROMETHEUS_MULTIPROC_DIR"] = PROMETHEUS_MULTIPROC_DIR
|
|
12
|
-
|
|
13
|
-
from prometheus_client import generate_latest, multiprocess
|
|
14
|
-
from flask import Response
|
|
15
|
-
from prometheus_client import CollectorRegistry
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
if not os.path.exists(PROMETHEUS_MULTIPROC_DIR):
|
|
19
|
-
shell_utils.run_command(f"mkdir -p {PROMETHEUS_MULTIPROC_DIR}")
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
logger = logging.getLogger(__name__)
|
|
23
|
-
|
|
24
|
-
bp = Blueprint("metrics", __name__)
|
|
25
|
-
|
|
26
|
-
registry = CollectorRegistry()
|
|
27
|
-
multiprocess.MultiProcessCollector(registry)
|
|
28
|
-
|
|
29
|
-
@bp.route('/cluster/metrics', methods=['GET'])
|
|
30
|
-
def get_data():
|
|
31
|
-
return Response(generate_latest(registry), mimetype=str('text/plain; version=0.0.4; charset=utf-8'))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/controllers/caching_node_controller.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/clean_local_storage_deploy.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/scripts/dashboards/node-exporter.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/cached_lvol_stat_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/main_distr_event_collector.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_core/services/tasks_runner_new_dev_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.9 → sbcli_dev-17.3.1}/simplyblock_web/static/SimplyBlock-API.postman_collection.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|