Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
100 changes: 100 additions & 0 deletions content/response_integrations/google/observe_it/actions/Ping.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from __future__ import annotations
from soar_sdk.SiemplifyUtils import output_handler
from soar_sdk.ScriptResult import EXECUTION_STATE_COMPLETED, EXECUTION_STATE_FAILED
from soar_sdk.SiemplifyAction import SiemplifyAction
from TIPCommon import extract_configuration_param

from ..core.ObserveITManager import ObserveITManager
from ..core.ObserveITConstants import PROVIDER_NAME, PING_SCRIPT_NAME
from ..core.ObserveITExceptions import ObserveITException


@output_handler
def main():
siemplify = SiemplifyAction()
siemplify.script_name = PING_SCRIPT_NAME
siemplify.LOGGER.info("=" * 20 + " Main - Params Init " + "=" * 20)

api_root = extract_configuration_param(
siemplify,
provider_name=PROVIDER_NAME,
param_name="API Root",
input_type=str,
is_mandatory=True,
print_value=True,
)

client_id = extract_configuration_param(
siemplify,
provider_name=PROVIDER_NAME,
param_name="Client ID",
input_type=str,
is_mandatory=True,
print_value=False,
)

client_secret = extract_configuration_param(
siemplify,
provider_name=PROVIDER_NAME,
param_name="Client Secret",
input_type=str,
is_mandatory=True,
print_value=False,
)

verify_ssl = extract_configuration_param(
siemplify,
provider_name=PROVIDER_NAME,
param_name="Verify SSL",
input_type=bool,
is_mandatory=True,
print_value=True,
)

siemplify.LOGGER.info("=" * 20 + " Main - Started " + "=" * 20)

try:
manager = ObserveITManager(
api_root=api_root,
client_id=client_id,
client_secret=client_secret,
verify_ssl=verify_ssl,
)

manager.test_connectivity()

output_message = "Successfully connected to the ObserveIT server with the provided connection parameters!"
result = "true"
status = EXECUTION_STATE_COMPLETED

except ObserveITException as e:
output_message = f"Failed to connect to the ObserveIT server! Error is {e}"
result = "false"
status = EXECUTION_STATE_FAILED
siemplify.LOGGER.error(output_message)
siemplify.LOGGER.exception(e)

siemplify.LOGGER.info("=" * 20 + " Main - Finished " + "=" * 20)
siemplify.LOGGER.info(f"Status: {status}")
siemplify.LOGGER.info(f"Result: {result}")
siemplify.LOGGER.info(f"Output Message: {output_message}")

siemplify.end(output_message, result, status)


if __name__ == "__main__":
main()
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Ping
description: Test connectivity to the ObserveIT with parameters provided at the integration
configuration page on the Marketplace tab.
documentation_link: https://cloud.google.com/chronicle/docs/soar/marketplace-integrations/observeit#ping
integration_identifier: ObserveIT
parameters: []
dynamic_results_metadata: []
creator: klim.lyapin@siemplify.co
simulation_data_json: '{"Entities":[]}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

Loading
Loading