-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[servicenow_cmdb] Initial release of ServiceNow CMDB #11521
base: main
Are you sure you want to change the base?
[servicenow_cmdb] Initial release of ServiceNow CMDB #11521
Conversation
/test |
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
packages/servicenow_cmdb/data_stream/event/agent/stream/cel.yml.hbs
Outdated
Show resolved
Hide resolved
packages/servicenow_cmdb/data_stream/event/agent/stream/cel.yml.hbs
Outdated
Show resolved
Hide resolved
packages/servicenow_cmdb/data_stream/event/agent/stream/cel.yml.hbs
Outdated
Show resolved
Hide resolved
1. Implemented changes. 2. Added package inside codeowners.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is too big to be safely reviewed in one sitting. I've done the best that I can, but I will take another look later.
The ServiceNow CMDB integration can be used in three different modes to collect logs: | ||
- AWS S3 polling mode: ServiceNow CMDB writes data to S3, and Elastic Agent polls the S3 bucket by listing its contents and reading new files. Refer this [link](https://www.servicenow.com/community/now-platform-forum/aws-s3-integration-with-servicenow/td-p/1121852) to integrate AWS S3 with ServiceNow for retrieving logs into an S3 bucket. | ||
- AWS S3 SQS mode: ServiceNow CMDB writes data to S3, S3 sends a notification of a new object to SQS, the Elastic Agent receives the notification from SQS, and then reads the S3 object. Multiple agents can be used in this mode. | ||
- REST API mode: ServiceNow CMDB offers table APIs to retrieve data from its tables, the Elastic Agent polls these APIs to list their contents and read any new data. Visit this [link](https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/rest/c_TableAPI#table-GET) for additional information about REST APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- REST API mode: ServiceNow CMDB offers table APIs to retrieve data from its tables, the Elastic Agent polls these APIs to list their contents and read any new data. Visit this [link](https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/rest/c_TableAPI#table-GET) for additional information about REST APIs. | |
- REST API mode: ServiceNow CMDB offers table APIs to retrieve data from its tables; the Elastic Agent polls these APIs to list their contents and read any new data. Visit this [link](https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/rest/c_TableAPI#table-GET) for additional information about REST APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, also Visit this [page](https://developer.servicenow.com/dev.do#!/reference/api/washingtondc/rest/c_TableAPI#table-GET) for additional information about REST APIs.
field: event.kind | ||
tag: set_event_kind_to_event | ||
value: event | ||
if: ctx.servicenow_cmdb?.event?.table_name != null && ['cmdb_ci_service','change_task','cmdb_rel_ci','cmdb_ci_infra_service','cmdb_ci','cmdb','cmdb_ci_vm','cmdb_ci_db_instance','cmdb_ci_appl','cmdb_ci_esx_server'].contains(ctx.servicenow_cmdb.event.table_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These allocate each time they are executed. They can be expressed as a set of disjunctions in a condition.
if: ctx.servicenow_cmdb?.event?.table_name != null && ['cmdb_ci_service','change_task','cmdb_rel_ci','cmdb_ci_infra_service','cmdb_ci','cmdb','cmdb_ci_vm','cmdb_ci_db_instance','cmdb_ci_appl','cmdb_ci_esx_server'].contains(ctx.servicenow_cmdb.event.table_name) | |
if: >- | |
ctx.servicenow_cmdb?.event?.table_name != null && ( | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_service' || | |
ctx.servicenow_cmdb.event.table_name == 'change_task' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_rel_ci' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_infra_service' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_vm' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_db_instance' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_appl' || | |
ctx.servicenow_cmdb.event.table_name == 'cmdb_ci_esx_server' | |
) |
- name: url | ||
type: url | ||
title: URL | ||
description: URL of ServiceNow instance. It should follow the given format, https://<instance_id>.service-now.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: URL of ServiceNow instance. It should follow the given format, https://<instance_id>.service-now.com. | |
description: URL of ServiceNow instance. It should follow the given format, https://\<instance_id\>.service-now.com. |
(please check whether this is necessary)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar question as asked in the readme
- name: table_name | ||
type: text | ||
title: Table Name | ||
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example- cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example- cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. | |
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example, cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. |
Note that the link will be broken. Please find another way to communicate to the user what it is that you are trying to get across.
- name: table_name | ||
type: text | ||
title: Table Name | ||
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example- cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example- cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. | |
description: Table name to fetch logs for. Please enter the table name in lowercase with underscores. For example, cmdb_ci_infra_service for the Infrastructure Service table. Refer this [link](https://<your_instance_id>.service-now.com/now/nav/ui/classic/params/target/sys_db_object_list.do) for the exact table names. |
Note issue with broken link.
1. Readme suggestions. 2. Changed the contains stmt in pipeline. 3. Added rule in config as suggested. 4. Removed the link of this page from dashboard. 5. Updated description for table_name in manifest.
/test |
🚀 Benchmarks reportTo see the full report comment with |
Quality Gate passedIssues Measures |
💚 Build Succeeded
History
|
"id": "", | ||
"params": { | ||
"fontSize": 12, | ||
"markdown": "**Navigation**\n\n**ServiceNow CMDB**\n\n- [Incident](#/dashboard/servicenow_cmdb-d929c3a1-7af8-428e-8357-8b2e8d3e3050)\n- [Problem](#/dashboard/servicenow_cmdb-d8977587-d9b4-4487-b321-a8402da07d48)\n- [Change Task and Request](#/dashboard/servicenow_cmdb-d2eb3f0c-4ddb-4683-afab-2820d2616ca2)\n- [User and Group](#/dashboard/servicenow_cmdb-b4795d3e-8c8b-48b2-900e-edc89db4d336)\n- [CMDB CI Servers](#/dashboard/servicenow_cmdb-22d413b7-ffb5-450f-b5f8-7dcd54fab22f)\n- [CMDB CI Services and CMN Location](#/dashboard/servicenow_cmdb-648308f9-ebdf-46fe-b6ce-b90dfcf2d1dd)\n- [CMDB CI, REL and DB Instance Overview](#/dashboard/servicenow_cmdb-0305f883-12a8-4021-af73-fbe05e797c3f)\n- [Knowledge](#/dashboard/servicenow_cmdb-e6093b0d-38a6-4b05-8354-4bbaef28b667)\n- [ALM and CMDB CI Hardware and Computer](#/dashboard/servicenow_cmdb-b182c6a6-3b4e-413f-899d-dd255b1a3623)\n- [Service Catalog](#/dashboard/servicenow_cmdb-488772bc-4ce5-48c6-9e8a-d948439dbf39)\n- [Business Application](#/dashboard/servicenow_cmdb-297414cc-3b65-40b1-b15b-e33cf676b3bf)\n- **ESX and Hyper-V Server (This Page)**\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations for ESX and Hyper-V Server Table, including ESX server distribution by attestation status, connected state, hardware status, and power state, as well as highlighting top ESX server support groups and providing insights into Hyper-V server firewall status, pool names, and Windows hosts.\n\n[**Integrations Page**](/app/integrations/detail/servicenow_cmdb/overview)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"markdown": "**Navigation**\n\n**ServiceNow CMDB**\n\n- [Incident](#/dashboard/servicenow_cmdb-d929c3a1-7af8-428e-8357-8b2e8d3e3050)\n- [Problem](#/dashboard/servicenow_cmdb-d8977587-d9b4-4487-b321-a8402da07d48)\n- [Change Task and Request](#/dashboard/servicenow_cmdb-d2eb3f0c-4ddb-4683-afab-2820d2616ca2)\n- [User and Group](#/dashboard/servicenow_cmdb-b4795d3e-8c8b-48b2-900e-edc89db4d336)\n- [CMDB CI Servers](#/dashboard/servicenow_cmdb-22d413b7-ffb5-450f-b5f8-7dcd54fab22f)\n- [CMDB CI Services and CMN Location](#/dashboard/servicenow_cmdb-648308f9-ebdf-46fe-b6ce-b90dfcf2d1dd)\n- [CMDB CI, REL and DB Instance Overview](#/dashboard/servicenow_cmdb-0305f883-12a8-4021-af73-fbe05e797c3f)\n- [Knowledge](#/dashboard/servicenow_cmdb-e6093b0d-38a6-4b05-8354-4bbaef28b667)\n- [ALM and CMDB CI Hardware and Computer](#/dashboard/servicenow_cmdb-b182c6a6-3b4e-413f-899d-dd255b1a3623)\n- [Service Catalog](#/dashboard/servicenow_cmdb-488772bc-4ce5-48c6-9e8a-d948439dbf39)\n- [Business Application](#/dashboard/servicenow_cmdb-297414cc-3b65-40b1-b15b-e33cf676b3bf)\n- **ESX and Hyper-V Server (This Page)**\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations for ESX and Hyper-V Server Table, including ESX server distribution by attestation status, connected state, hardware status, and power state, as well as highlighting top ESX server support groups and providing insights into Hyper-V server firewall status, pool names, and Windows hosts.\n\n[**Integrations Page**](/app/integrations/detail/servicenow_cmdb/overview)", | |
"markdown": "**Navigation**\n\n**ServiceNow CMDB**\n\n- [Incident](#/dashboard/servicenow_cmdb-d929c3a1-7af8-428e-8357-8b2e8d3e3050)\n- [Problem](#/dashboard/servicenow_cmdb-d8977587-d9b4-4487-b321-a8402da07d48)\n- [Change Task and Request](#/dashboard/servicenow_cmdb-d2eb3f0c-4ddb-4683-afab-2820d2616ca2)\n- [User and Group](#/dashboard/servicenow_cmdb-b4795d3e-8c8b-48b2-900e-edc89db4d336)\n- [CMDB CI Servers](#/dashboard/servicenow_cmdb-22d413b7-ffb5-450f-b5f8-7dcd54fab22f)\n- [CMDB CI Services and CMN Location](#/dashboard/servicenow_cmdb-648308f9-ebdf-46fe-b6ce-b90dfcf2d1dd)\n- [CMDB CI, REL and DB Instance Overview](#/dashboard/servicenow_cmdb-0305f883-12a8-4021-af73-fbe05e797c3f)\n- [Knowledge](#/dashboard/servicenow_cmdb-e6093b0d-38a6-4b05-8354-4bbaef28b667)\n- [ALM and CMDB CI Hardware and Computer](#/dashboard/servicenow_cmdb-b182c6a6-3b4e-413f-899d-dd255b1a3623)\n- [Service Catalog](#/dashboard/servicenow_cmdb-488772bc-4ce5-48c6-9e8a-d948439dbf39)\n- [Business Application](#/dashboard/servicenow_cmdb-297414cc-3b65-40b1-b15b-e33cf676b3bf)\n- **ESX and Hyper-V Server**\n\n**Overview**\n\nThis dashboard displays key statistics and visualizations for ESX and Hyper-V Server Table, including ESX server distribution by attestation status, connected state, hardware status, and power state, as well as highlighting top ESX server support groups and providing insights into Hyper-V server firewall status, pool names, and Windows hosts.\n\n[**Integrations Page**](/app/integrations/detail/servicenow_cmdb/overview)", |
Same change for the other pages.
ctx.servicenow_cmdb?.event?.table_name != null && ( | ||
ctx.servicenow_cmdb.event.table_name == 'cmdb' || | ||
ctx.servicenow_cmdb.event.table_name == 'cmdb_rel_ci' | ||
) || ctx.servicenow_cmdb?.event?.table_name.contains("cmdb_ci") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this outside the parens?
- set: | ||
field: event.kind | ||
tag: set_pipeline_error_to_event_kind | ||
value: pipeline_error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Final new line.
Proposed commit message
Create New integration package servicenow_cmdb.
Checklist
changelog.yml
file.How to test this PR locally
Screenshots