sbcli-dev 17.2.5__tar.gz → 17.2.6__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.5 → sbcli_dev-17.2.6}/PKG-INFO +1 -1
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/SOURCES.txt +1 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/constants.py +1 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/env_var +1 -1
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/docker-compose-swarm.yml +3 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/capacity_and_stats_collector.py +122 -1
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/lvol_stat_collector.py +25 -2
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/storage_node_monitor.py +1 -1
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/app.py +2 -7
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/auth_middleware.py +2 -1
- sbcli_dev-17.2.6/simplyblock_web/blueprints/web_api_metrics.py +27 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/README.md +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/pyproject.toml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/requirements.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/setup.cfg +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/setup.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_cli/clibase.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/cluster_ops.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/snapshot_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/prometheus.yml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/README.md +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_web/utils.py +0 -0
|
@@ -138,6 +138,7 @@ simplyblock_web/blueprints/web_api_cluster.py
|
|
|
138
138
|
simplyblock_web/blueprints/web_api_deployer.py
|
|
139
139
|
simplyblock_web/blueprints/web_api_device.py
|
|
140
140
|
simplyblock_web/blueprints/web_api_lvol.py
|
|
141
|
+
simplyblock_web/blueprints/web_api_metrics.py
|
|
141
142
|
simplyblock_web/blueprints/web_api_mgmt_node.py
|
|
142
143
|
simplyblock_web/blueprints/web_api_pool.py
|
|
143
144
|
simplyblock_web/blueprints/web_api_snapshot.py
|
|
@@ -132,3 +132,4 @@ HA_JM_COUNT=3
|
|
|
132
132
|
SENTRY_SDK_DNS = "https://745047b017ac424b4173550e19910fb7@o4508953941311488.ingest.de.sentry.io/4508996361584720"
|
|
133
133
|
ONE_KB = 1024
|
|
134
134
|
TEMP_CORES_FILE = "/etc/simplyblock/tmp_cores_config"
|
|
135
|
+
PROMETHEUS_MULTIPROC_DIR = "/etc/simplyblock/metrics"
|
|
@@ -60,6 +60,7 @@ services:
|
|
|
60
60
|
constraints: [node.role == manager]
|
|
61
61
|
volumes:
|
|
62
62
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
63
|
+
- "/etc/simplyblock:/etc/simplyblock"
|
|
63
64
|
environment:
|
|
64
65
|
SIMPLYBLOCK_LOG_LEVEL: "$LOG_LEVEL"
|
|
65
66
|
FLASK_DEBUG: "False"
|
|
@@ -112,6 +113,7 @@ services:
|
|
|
112
113
|
constraints: [node.role == manager]
|
|
113
114
|
volumes:
|
|
114
115
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
116
|
+
- "/etc/simplyblock:/etc/simplyblock"
|
|
115
117
|
networks:
|
|
116
118
|
- hostnet
|
|
117
119
|
environment:
|
|
@@ -169,6 +171,7 @@ services:
|
|
|
169
171
|
constraints: [node.role == manager]
|
|
170
172
|
volumes:
|
|
171
173
|
- "/etc/foundationdb:/etc/foundationdb"
|
|
174
|
+
- "/etc/simplyblock:/etc/simplyblock"
|
|
172
175
|
networks:
|
|
173
176
|
- hostnet
|
|
174
177
|
environment:
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/capacity_and_stats_collector.py
RENAMED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
+
import os
|
|
2
3
|
import time
|
|
3
4
|
|
|
4
|
-
from simplyblock_core import constants, db_controller, utils
|
|
5
|
+
from simplyblock_core import constants, db_controller, utils, shell_utils
|
|
5
6
|
from simplyblock_core.models.nvme_device import NVMeDevice
|
|
6
7
|
from simplyblock_core.models.storage_node import StorageNode
|
|
7
8
|
from simplyblock_core.rpc_client import RPCClient
|
|
8
9
|
from simplyblock_core.models.stats import DeviceStatObject, NodeStatObject, ClusterStatObject
|
|
9
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
|
|
10
14
|
|
|
11
15
|
logger = utils.get_logger(__name__)
|
|
12
16
|
|
|
@@ -83,6 +87,18 @@ def add_device_stats(cl, device, capacity_dict, stats_dict):
|
|
|
83
87
|
stat_obj = DeviceStatObject(data=data)
|
|
84
88
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
85
89
|
last_object_record[device.get_id()] = stat_obj
|
|
90
|
+
|
|
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(), node_ip=node.get_id(), device_id=device.get_id()).set(data[v])
|
|
96
|
+
elif v == "status_code":
|
|
97
|
+
ng[g].labels(cluster=cl.get_id(), node_ip=node.get_id(), device_id=device.get_id()).set(device.get_status_code())
|
|
98
|
+
elif v == "health_check":
|
|
99
|
+
ng[g].labels(cluster=cl.get_id(), node_ip=node.get_id(), device_id=device.get_id()).set(device.health_check)
|
|
100
|
+
|
|
101
|
+
|
|
86
102
|
return stat_obj
|
|
87
103
|
|
|
88
104
|
|
|
@@ -116,6 +132,17 @@ def add_node_stats(node, records):
|
|
|
116
132
|
})
|
|
117
133
|
stat_obj = NodeStatObject(data=data)
|
|
118
134
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
135
|
+
|
|
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(), node_ip=node.get_id()).set(data[v])
|
|
141
|
+
elif v == "status_code":
|
|
142
|
+
ng[g].labels(cluster=cl.get_id(), node_ip=node.get_id()).set(node.get_status_code())
|
|
143
|
+
elif v == "health_check":
|
|
144
|
+
ng[g].labels(cluster=cl.get_id(), node_ip=node.get_id()).set(node.health_check)
|
|
145
|
+
|
|
119
146
|
return stat_obj
|
|
120
147
|
|
|
121
148
|
|
|
@@ -144,9 +171,103 @@ def add_cluster_stats(cl, records):
|
|
|
144
171
|
|
|
145
172
|
stat_obj = ClusterStatObject(data=data)
|
|
146
173
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
174
|
+
|
|
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
|
+
|
|
147
183
|
return stat_obj
|
|
148
184
|
|
|
149
185
|
|
|
186
|
+
if os.path.exists(PROMETHEUS_MULTIPROC_DIR):
|
|
187
|
+
shell_utils.run_command(f"rm -rf {PROMETHEUS_MULTIPROC_DIR}")
|
|
188
|
+
os.makedirs(PROMETHEUS_MULTIPROC_DIR, exist_ok=True)
|
|
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
|
+
lg = {}
|
|
228
|
+
pg = {}
|
|
229
|
+
|
|
230
|
+
def get_device_metrics():
|
|
231
|
+
global dg
|
|
232
|
+
if not dg:
|
|
233
|
+
labels = ['cluster', "node_ip", "device_id"]
|
|
234
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
235
|
+
dg["device_" + k] = Gauge("device_" + k, "device_" + k, labelnames=labels, registry=registry)
|
|
236
|
+
return dg
|
|
237
|
+
|
|
238
|
+
def get_lvol_metrics():
|
|
239
|
+
global lg
|
|
240
|
+
if not lg:
|
|
241
|
+
labels = ['cluster', "pool", "lvol"]
|
|
242
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
243
|
+
lg["lvol_" + k] = Gauge("lvol_" + k, "lvol_" + k, labelnames=labels, registry=registry)
|
|
244
|
+
return lg
|
|
245
|
+
|
|
246
|
+
def get_pool_metrics():
|
|
247
|
+
global pg
|
|
248
|
+
if not pg:
|
|
249
|
+
labels = ['cluster', "pool", "name"]
|
|
250
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
251
|
+
pg["pool_" + k] = Gauge("pool_" + k, "pool_" + k, labelnames=labels, registry=registry)
|
|
252
|
+
return pg
|
|
253
|
+
|
|
254
|
+
def get_snode_metrics():
|
|
255
|
+
global ng
|
|
256
|
+
if not ng:
|
|
257
|
+
labels = ['cluster', "node_ip"]
|
|
258
|
+
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
259
|
+
ng["snode_" + k] = Gauge("snode_" + k, "snode_" + k, labelnames=labels, registry=registry)
|
|
260
|
+
return ng
|
|
261
|
+
|
|
262
|
+
def get_cluster_metrics():
|
|
263
|
+
global cg
|
|
264
|
+
if not cg:
|
|
265
|
+
labels = ['cluster']
|
|
266
|
+
for k in io_stats_keys + ["status_code"]:
|
|
267
|
+
cg["cluster_" + k] = Gauge("cluster_" + k, "cluster_" + k, labelnames=labels, registry=registry)
|
|
268
|
+
return cg
|
|
269
|
+
|
|
270
|
+
|
|
150
271
|
|
|
151
272
|
# get DB controller
|
|
152
273
|
db_controller = db_controller.DBController()
|
|
@@ -8,7 +8,7 @@ from simplyblock_core.models.lvol_model import LVol
|
|
|
8
8
|
from simplyblock_core.models.stats import LVolStatObject, PoolStatObject
|
|
9
9
|
from simplyblock_core.models.storage_node import StorageNode
|
|
10
10
|
from simplyblock_core.rpc_client import RPCClient
|
|
11
|
-
|
|
11
|
+
from simplyblock_core.services.capacity_and_stats_collector import get_lvol_metrics, get_pool_metrics
|
|
12
12
|
|
|
13
13
|
logger = utils.get_logger(__name__)
|
|
14
14
|
|
|
@@ -48,7 +48,7 @@ def add_lvol_stats(cluster, lvol, stats_list, capacity_dict=None):
|
|
|
48
48
|
size_used = 0
|
|
49
49
|
lvol_dict = capacity_dict
|
|
50
50
|
size_total = int(lvol_dict['num_blocks']*lvol_dict['block_size'])
|
|
51
|
-
cluster_size = cluster.
|
|
51
|
+
cluster_size = cluster.page_size_in_blocks
|
|
52
52
|
if "driver_specific" in lvol_dict and "lvol" in lvol_dict["driver_specific"]:
|
|
53
53
|
num_allocated_clusters = lvol_dict["driver_specific"]["lvol"]["num_allocated_clusters"]
|
|
54
54
|
size_used = int(num_allocated_clusters*cluster_size)
|
|
@@ -155,6 +155,17 @@ def add_lvol_stats(cluster, lvol, stats_list, capacity_dict=None):
|
|
|
155
155
|
stat_obj = LVolStatObject(data=data)
|
|
156
156
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
157
157
|
last_object_record[lvol.get_id()] = stat_obj
|
|
158
|
+
|
|
159
|
+
ng = get_lvol_metrics()
|
|
160
|
+
for g in ng:
|
|
161
|
+
v = g.replace("lvol_", "")
|
|
162
|
+
if v in data:
|
|
163
|
+
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(data[v])
|
|
164
|
+
elif v == "status_code":
|
|
165
|
+
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(lvol.get_status_code())
|
|
166
|
+
elif v == "health_check":
|
|
167
|
+
ng[g].labels(cluster=cluster.get_id(), lvol=lvol.get_id(), pool=lvol.pool_name).set(lvol.health_check)
|
|
168
|
+
|
|
158
169
|
return stat_obj
|
|
159
170
|
|
|
160
171
|
|
|
@@ -174,6 +185,18 @@ def add_pool_stats(pool, records):
|
|
|
174
185
|
|
|
175
186
|
stat_obj = PoolStatObject(data=data)
|
|
176
187
|
stat_obj.write_to_db(db_controller.kv_store)
|
|
188
|
+
|
|
189
|
+
ng = get_pool_metrics()
|
|
190
|
+
for g in ng:
|
|
191
|
+
v = g.replace("pool_", "")
|
|
192
|
+
if v in data:
|
|
193
|
+
ng[g].labels(cluster=cluster.get_id(), name=pool.pool_name, pool=pool.get_id()).set(data[v])
|
|
194
|
+
elif v == "status_code":
|
|
195
|
+
ng[g].labels(cluster=cluster.get_id(), name=pool.pool_name, pool=pool.get_id()).set(pool.get_status_code())
|
|
196
|
+
elif v == "health_check":
|
|
197
|
+
ng[g].labels(cluster=cluster.get_id(), name=pool.pool_name, pool=pool.get_id()).set(pool.health_check)
|
|
198
|
+
|
|
199
|
+
|
|
177
200
|
return stat_obj
|
|
178
201
|
|
|
179
202
|
|
|
@@ -261,7 +261,7 @@ while True:
|
|
|
261
261
|
if snode.status == StorageNode.STATUS_SCHEDULABLE and not ping_check and not node_api_check:
|
|
262
262
|
continue
|
|
263
263
|
|
|
264
|
-
spdk_process =
|
|
264
|
+
spdk_process = False
|
|
265
265
|
if node_api_check:
|
|
266
266
|
# 3- check spdk_process
|
|
267
267
|
spdk_process = health_controller._check_spdk_process_up(snode.mgmt_ip, snode.rpc_port)
|
|
@@ -7,11 +7,9 @@ from flask import Flask
|
|
|
7
7
|
import utils
|
|
8
8
|
from blueprints import web_api_cluster, web_api_mgmt_node, web_api_device, \
|
|
9
9
|
web_api_lvol, web_api_storage_node, web_api_pool, web_api_caching_node, \
|
|
10
|
-
web_api_snapshot, web_api_deployer, swagger_ui_blueprint
|
|
10
|
+
web_api_snapshot, web_api_deployer, swagger_ui_blueprint, web_api_metrics
|
|
11
11
|
from auth_middleware import token_required
|
|
12
12
|
from simplyblock_core import constants, utils as core_utils
|
|
13
|
-
from werkzeug.middleware.dispatcher import DispatcherMiddleware
|
|
14
|
-
from prometheus_client import make_wsgi_app
|
|
15
13
|
|
|
16
14
|
logger = core_utils.get_logger(__name__)
|
|
17
15
|
|
|
@@ -35,6 +33,7 @@ app.register_blueprint(web_api_pool.bp)
|
|
|
35
33
|
app.register_blueprint(web_api_caching_node.bp)
|
|
36
34
|
app.register_blueprint(web_api_deployer.bp)
|
|
37
35
|
app.register_blueprint(swagger_ui_blueprint.bp, url_prefix=swagger_ui_blueprint.SWAGGER_URL)
|
|
36
|
+
app.register_blueprint(web_api_metrics.bp)
|
|
38
37
|
|
|
39
38
|
|
|
40
39
|
@app.before_request
|
|
@@ -48,10 +47,6 @@ def status():
|
|
|
48
47
|
return utils.get_response("Live")
|
|
49
48
|
|
|
50
49
|
|
|
51
|
-
app.wsgi_app = DispatcherMiddleware(app.wsgi_app, {
|
|
52
|
-
'/cluster/metrics': make_wsgi_app()
|
|
53
|
-
})
|
|
54
|
-
|
|
55
50
|
app.config['JSONIFY_PRETTYPRINT_REGULAR'] = True
|
|
56
51
|
if __name__ == '__main__':
|
|
57
52
|
logging.getLogger('werkzeug').setLevel(constants.LOG_WEB_LEVEL)
|
|
@@ -12,7 +12,8 @@ def token_required(f):
|
|
|
12
12
|
@wraps(f)
|
|
13
13
|
def decorated(*args, **kwargs):
|
|
14
14
|
|
|
15
|
-
if request.method == "GET" and request.path.startswith("/swagger")
|
|
15
|
+
if request.method == "GET" and [request.path.startswith("/swagger") or
|
|
16
|
+
request.path.startswith("/cluster/metrics")]:
|
|
16
17
|
return f(*args, **kwargs)
|
|
17
18
|
|
|
18
19
|
cluster_id = None
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
|
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
|
+
logger = logging.getLogger(__name__)
|
|
19
|
+
|
|
20
|
+
bp = Blueprint("metrics", __name__)
|
|
21
|
+
|
|
22
|
+
registry = CollectorRegistry()
|
|
23
|
+
multiprocess.MultiProcessCollector(registry)
|
|
24
|
+
|
|
25
|
+
@bp.route('/cluster/metrics', methods=['GET'])
|
|
26
|
+
def get_data():
|
|
27
|
+
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
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/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.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/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.5 → sbcli_dev-17.2.6}/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
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml
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
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/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.5 → sbcli_dev-17.2.6}/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
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/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
|
{sbcli_dev-17.2.5 → sbcli_dev-17.2.6}/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
|