@cryptotaxi247 / CoPilot / commits / 9c181497

precommit fixes

Taylor committed Apr 18, 2024 at 08:59 UTC 9c181497b5c3099a63423f3616f91775b10fba6e
3 files changed +11 -4
backend/app/connectors/wazuh_indexer/routes/monitoring.py
+4 -2
@@ -14,8 +14,10 @@ from app.connectors.wazuh_indexer.schema.monitoring import ShardsResponse
14 from app.connectors.wazuh_indexer.services.monitoring import cluster_healthcheck
15 from app.connectors.wazuh_indexer.services.monitoring import indices_stats
16 from app.connectors.wazuh_indexer.services.monitoring import node_allocation
17 +from app.connectors.wazuh_indexer.services.monitoring import (
18 + output_shard_number_to_be_set_based_on_nodes,
19 +)
20 from app.connectors.wazuh_indexer.services.monitoring import shards
18 -from app.connectors.wazuh_indexer.services.monitoring import output_shard_number_to_be_set_based_on_nodes
21
22 wazuh_indexer_router = APIRouter()
23
@@ -122,6 +124,7 @@ async def get_shards() -> Union[ShardsResponse, HTTPException]:
124 else:
125 raise HTTPException(status_code=500, detail="Failed to retrieve shards.")
126
127 +
128 @wazuh_indexer_router.get(
129 "/output_shard_number_to_be_set_based_on_nodes",
130 description="Fetch Wazuh Indexer output_shard_number_to_be_set_based_on_nodes",
@@ -144,4 +147,3 @@ async def get_output_shard_number_to_be_set_based_on_nodes_route() -> int:
147 return output_shard_number_to_be_set_based_on_nodes_response
148 else:
149 raise HTTPException(status_code=500, detail="Failed to retrieve output_shard_number_to_be_set_based_on_nodes.")
147 -
backend/app/integrations/carbonblack/services/provision.py
+3 -1
@@ -12,6 +12,9 @@ from app.connectors.grafana.services.dashboards import provision_dashboards
12 from app.connectors.grafana.utils.universal import create_grafana_client
13 from app.connectors.graylog.services.management import start_stream
14 from app.connectors.graylog.utils.universal import send_post_request
15 +from app.connectors.wazuh_indexer.services.monitoring import (
16 + output_shard_number_to_be_set_based_on_nodes,
17 +)
18 from app.customer_provisioning.schema.grafana import GrafanaDatasource
19 from app.customer_provisioning.schema.grafana import GrafanaDataSourceCreationResponse
20 from app.customer_provisioning.schema.graylog import GraylogIndexSetCreationResponse
@@ -28,7 +31,6 @@ from app.integrations.models.customer_integration_settings import CustomerIntegr
31 from app.integrations.routes import create_integration_meta
32 from app.integrations.schema import CustomerIntegrationsMetaSchema
33 from app.utils import get_connector_attribute
31 -from app.connectors.wazuh_indexer.services.monitoring import output_shard_number_to_be_set_based_on_nodes
34
35
36 ################## ! GRAYLOG ! ##################
backend/app/integrations/huntress/services/provision.py
+4 -1
@@ -12,6 +12,9 @@ from app.connectors.grafana.services.dashboards import provision_dashboards
12 from app.connectors.grafana.utils.universal import create_grafana_client
13 from app.connectors.graylog.services.management import start_stream
14 from app.connectors.graylog.utils.universal import send_post_request
15 +from app.connectors.wazuh_indexer.services.monitoring import (
16 + output_shard_number_to_be_set_based_on_nodes,
17 +)
18 from app.customer_provisioning.schema.grafana import GrafanaDatasource
19 from app.customer_provisioning.schema.grafana import GrafanaDataSourceCreationResponse
20 from app.customer_provisioning.schema.graylog import GraylogIndexSetCreationResponse
@@ -28,7 +31,7 @@ from app.integrations.models.customer_integration_settings import CustomerIntegr
31 from app.integrations.routes import create_integration_meta
32 from app.integrations.schema import CustomerIntegrationsMetaSchema
33 from app.utils import get_connector_attribute
31 -from app.connectors.wazuh_indexer.services.monitoring import output_shard_number_to_be_set_based_on_nodes
34 +
35
36 ################## ! GRAYLOG ! ##################
37 async def build_index_set_config(