sbcli-dev 17.2.8__tar.gz → 17.3.0__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.8 → sbcli_dev-17.3.0}/PKG-INFO +1 -1
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/PKG-INFO +1 -1
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/cluster_ops.py +1 -1
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/snapshot_controller.py +2 -2
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/env_var +1 -1
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/docker-compose-swarm-monitoring.yml +21 -21
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/prometheus.yml +3 -2
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/capacity_and_stats_collector.py +4 -4
- sbcli_dev-17.3.0/simplyblock_web/blueprints/web_api_metrics.py +197 -0
- sbcli_dev-17.2.8/simplyblock_web/blueprints/web_api_metrics.py +0 -31
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/README.md +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/pyproject.toml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/requirements.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/SOURCES.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/dependency_links.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/entry_points.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/requires.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/sbcli_dev.egg-info/top_level.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/setup.cfg +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/setup.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_cli/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_cli/cli.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_cli/clibase.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_cli/main.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/cnode_client.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/constants.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/caching_node_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/cluster_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/device_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/device_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/events_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/health_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/lvol_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/lvol_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/mgmt_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/pool_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/pool_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/snapshot_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/storage_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/tasks_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/tasks_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/controllers/tcp_ports_events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/db_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/distr_controller.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/mgmt_node_ops.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/base_model.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/caching_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/cluster.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/deployer.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/events.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/iface.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/job_schedule.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/lvol_model.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/mgmt_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/nvme_device.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/pool.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/port_stat.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/snapshot.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/stats.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/models/storage_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/pci_utils.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/rpc_client.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2 +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/alerting/alert_rules.yaml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/clean_local_storage_deploy.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/config_docker.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboard.yml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/cluster.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/devices.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/lvols.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/node-exporter.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/nodes.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/dashboards/pools.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/datasource.yml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/db_config_double.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/db_config_single.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/deploy_fdb.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/deploy_stack.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/docker-compose-swarm.yml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/foundation.yml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/haproxy.cfg +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/install_deps.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/objstore.yml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/prepare_fdb.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/run_ssh.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/set_db_config.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/stack_deploy_wait.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/cached_lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/caching_node_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/cap_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/device_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/health_check_service.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/install_service.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/lvol_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/lvol_stat_collector.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/main_distr_event_collector.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/mgmt_node_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/new_device_discovery.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/remove_service.sh +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/service_template.service +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/spdk/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/spdk/client.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/spdk_http_proxy_server.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/spdk_stats_collector.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/storage_node_monitor.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_failed_migration.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_migration.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_new_dev_migration.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_node_add.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_restart.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/shell_utils.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/snode_client.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/storage_node_ops.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/test/test_utils.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/utils.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/workers/cleanup_foundationdb.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/README.md +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/app.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/auth_middleware.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/__init__.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/caching_node_ops.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/caching_node_ops_k8s.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/node_api_basic.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/node_api_caching_docker.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/node_api_caching_ks.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/snode_ops.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/snode_ops_k8s.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/swagger_ui_blueprint.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_caching_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_cluster.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_deployer.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_device.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_lvol.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_mgmt_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_pool.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_snapshot.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/blueprints/web_api_storage_node.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/node_utils.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/node_utils_k8s.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/node_webapp.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/requirements.txt +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/SimplyBlock-API.postman_collection.json +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/delete.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/deploy.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/deploy_cnode.yaml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/deploy_spdk.yaml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/is_up.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/list_deps.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/rpac.yaml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/swagger.yaml +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/static/tst.py +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/templates/caching_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/templates/storage_deploy_spdk.yaml.j2 +0 -0
- {sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_web/utils.py +0 -0
|
@@ -998,7 +998,7 @@ def list_all_info(cluster_id):
|
|
|
998
998
|
"Write BW/s": f"{utils.humanbytes(rec.write_bytes_ps)}",
|
|
999
999
|
"Read IOP/s": f"{rec.read_io_ps}",
|
|
1000
1000
|
"Write IOP/s": f"{rec.write_io_ps}",
|
|
1001
|
-
"Connections": f"{rec.connected_clients}",
|
|
1001
|
+
# "Connections": f"{rec.connected_clients}",
|
|
1002
1002
|
"Health": lvol.health_check,
|
|
1003
1003
|
"Status": lvol.status,
|
|
1004
1004
|
|
|
@@ -102,7 +102,7 @@ def add(lvol_id, snapshot_name):
|
|
|
102
102
|
if snap_bdev:
|
|
103
103
|
snap_uuid = snap_bdev[0]['uuid']
|
|
104
104
|
blobid = snap_bdev[0]['driver_specific']['lvol']['blobid']
|
|
105
|
-
cluster_size = cluster.
|
|
105
|
+
cluster_size = cluster.page_size_in_blocks
|
|
106
106
|
num_allocated_clusters = snap_bdev[0]["driver_specific"]["lvol"]["num_allocated_clusters"]
|
|
107
107
|
used_size = int(num_allocated_clusters*cluster_size)
|
|
108
108
|
else:
|
|
@@ -153,7 +153,7 @@ def add(lvol_id, snapshot_name):
|
|
|
153
153
|
if snap_bdev:
|
|
154
154
|
snap_uuid = snap_bdev[0]['uuid']
|
|
155
155
|
blobid = snap_bdev[0]['driver_specific']['lvol']['blobid']
|
|
156
|
-
cluster_size = cluster.
|
|
156
|
+
cluster_size = cluster.page_size_in_blocks
|
|
157
157
|
num_allocated_clusters = snap_bdev[0]["driver_specific"]["lvol"]["num_allocated_clusters"]
|
|
158
158
|
used_size = int(num_allocated_clusters*cluster_size)
|
|
159
159
|
else:
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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
|
|
@@ -4,11 +4,12 @@ global:
|
|
|
4
4
|
monitor: 'codelab-monitor'
|
|
5
5
|
|
|
6
6
|
scrape_configs:
|
|
7
|
+
|
|
7
8
|
- job_name: 'cluster_metrics'
|
|
8
9
|
static_configs:
|
|
9
10
|
- targets: ['HAProxy:80']
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
honor_labels: true
|
|
12
|
+
metrics_path: '/cluster/metrics'
|
|
12
13
|
|
|
13
14
|
- job_name: 'node'
|
|
14
15
|
dns_sd_configs:
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/services/capacity_and_stats_collector.py
RENAMED
|
@@ -92,11 +92,11 @@ def add_device_stats(cl, device, capacity_dict, stats_dict):
|
|
|
92
92
|
for g in ng:
|
|
93
93
|
v = g.replace("device_", "")
|
|
94
94
|
if v in data:
|
|
95
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(),
|
|
95
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(data[v])
|
|
96
96
|
elif v == "status_code":
|
|
97
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(),
|
|
97
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(device.get_status_code())
|
|
98
98
|
elif v == "health_check":
|
|
99
|
-
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(),
|
|
99
|
+
ng[g].labels(cluster=cl.get_id(), snode=node.get_id(), device=device.get_id()).set(device.health_check)
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
return stat_obj
|
|
@@ -228,7 +228,7 @@ dg = {}
|
|
|
228
228
|
def get_device_metrics():
|
|
229
229
|
global dg
|
|
230
230
|
if not dg:
|
|
231
|
-
labels = ['cluster', "snode", "
|
|
231
|
+
labels = ['cluster', "snode", "device"]
|
|
232
232
|
for k in io_stats_keys + ["status_code", "health_check"]:
|
|
233
233
|
dg["device_" + k] = Gauge("device_" + k, "device_" + k, labelnames=labels, registry=registry)
|
|
234
234
|
return dg
|
|
@@ -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
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/simplyblock_core/scripts/alerting/alert_resources.yaml.j2
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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.8 → sbcli_dev-17.3.0}/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
|
|
File without changes
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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
|
|
File without changes
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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.8 → sbcli_dev-17.3.0}/simplyblock_core/services/tasks_runner_failed_migration.py
RENAMED
|
File without changes
|
|
File without changes
|
{sbcli_dev-17.2.8 → sbcli_dev-17.3.0}/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.8 → sbcli_dev-17.3.0}/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
|