Table: servicenow_cmdb_ci_service - Query ServiceNow Configuration Management Database (CMDB) Services using SQL
ServiceNow Configuration Management Database (CMDB) is a service that acts as a data warehouse for IT installations. It holds data relating to a collection of IT assets (commonly referred to as configuration items (CI)), as well as to descriptive relationships between such assets. A key functionality of CMDB is to support the IT department's configuration management process.
Table Usage Guide
The servicenow_cmdb_ci_service
table provides insights into services within ServiceNow Configuration Management Database (CMDB). As an IT administrator or a DevOps engineer, explore service-specific details through this table, including operational status, version, and associated business services. Utilize it to uncover information about services, such as those that are currently active, the versions of the services, and the business services associated with them.
Examples
What are the top 10 most frequently used services?
Explore the most commonly used services in your organization to help prioritize resource allocation and streamline operations. This query can be particularly useful in identifying areas that may benefit from increased investment or optimization.
select name, count(name) as frequencyfrom servicenow_cmdb_ci_servicegroup by nameorder by frequency desclimit 10;
select name, count(name) as frequencyfrom servicenow_cmdb_ci_servicegroup by nameorder by frequency desclimit 10;
List services by category
Explore which services fall under each category to better understand the organization and classification of your services. This can help in managing resources and planning future developments.
select category, namefrom servicenow_cmdb_ci_serviceorder by category, name;
select category, namefrom servicenow_cmdb_ci_serviceorder by category, name;
List services by status
Explore which services are currently operational by assessing their status. This can help in identifying any services that might be experiencing issues, thereby allowing for timely troubleshooting and maintenance.
select name, operational_statusfrom servicenow_cmdb_ci_service;
select name, operational_statusfrom servicenow_cmdb_ci_service;
List services created in the last 30 days
Explore which services have been recently added by identifying those created within the past month. This can help in tracking the growth and evolution of your service catalog over time.
select name, sys_created_onfrom servicenow_cmdb_ci_servicewhere sys_created_on >= now() - interval '30 days';
select name, sys_created_onfrom servicenow_cmdb_ci_servicewhere sys_created_on >= datetime('now', '-30 days');
List services by the assigned user
Explore which services are assigned to which users, helping to manage workload distribution and responsibility tracking. This is beneficial for understanding the current state of task allocation within your team.
select s.name, u.namefrom servicenow_cmdb_ci_service s left join servicenow_sys_user u on u.sys_id = s.assigned_to ->> 'value'
select s.name, u.namefrom servicenow_cmdb_ci_service s left join servicenow_sys_user u on u.sys_id = json_extract(s.assigned_to, '$.value')
Schema for servicenow_cmdb_ci_service
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
aliases | text | Alternative names or aliases for the service. | |
asset | jsonb | Asset associated with the service. | |
asset_tag | text | Tag or label associated with the asset. | |
assigned | timestamp with time zone | Flag indicating if the service is assigned. | |
assigned_to | jsonb | User or group assigned to the service. | |
assignment_group | jsonb | Group responsible for the assignment of the service. | |
attestation_score | bigint | Score indicating the level of attestation for the service. | |
attestation_status | text | Status of attestation for the service. | |
attested | boolean | Flag indicating if the service is attested. | |
attested_by | jsonb | User who attested the service. | |
attested_date | timestamp with time zone | Date when the service was attested. | |
attributes | text | Additional attributes or properties of the service. | |
busines_criticality | text | Criticality level or importance of the service to the business. | |
business_contact | jsonb | Contact person or group for business-related matters. | |
business_need | text | Business need or purpose for the service. | |
business_relation_manager | jsonb | Manager responsible for the business relationship with the service. | |
business_unit | jsonb | Business unit associated with the service. | |
can_print | boolean | Flag indicating if the service can be printed. | |
category | text | Category or classification of the service. | |
change_control | jsonb | Change control process or requirements for the service. | |
checked_in | timestamp with time zone | Flag indicating if the service is checked in. | |
checked_out | timestamp with time zone | Flag indicating if the service is checked out. | |
checkout | text | Checkout status or details of the service. | |
comments | text | Additional comments or notes about the service. | |
company | jsonb | Company associated with the service. | |
compatibility_dependencies | text | Dependencies or requirements for compatibility with other services. | |
consumer_type | text | Type of consumer or user of the service. | |
correlation_id | text | ID for correlating related services or records. | |
cost | double precision | Cost or financial details of the service. | |
cost_cc | text | Cost center associated with the service. | |
cost_center | jsonb | Cost center associated with the service. | |
delivery_date | timestamp with time zone | Date when the service is expected to be delivered. | |
delivery_manager | jsonb | Manager responsible for the delivery of the service. | |
department | jsonb | Department associated with the service. | |
discovery_source | text | Source or method of service discovery. | |
dns_domain | text | DNS domain associated with the service. | |
due | timestamp with time zone | Due date or deadline for the service. | |
due_in | text | Time or duration until the service is due. | |
duplicate_of | jsonb | Reference to a duplicate service. | |
end_date | timestamp with time zone | Date when the service ends or expires. | |
environment | text | Environment or context in which the service operates. | |
fault_count | bigint | Number of faults or issues associated with the service. | |
first_discovered | timestamp with time zone | Date when the service was first discovered. | |
fqdn | text | Fully qualified domain name (FQDN) associated with the service. | |
gl_account | text | General ledger (GL) account associated with the service. | |
install_date | timestamp with time zone | Date when the service was installed. | |
install_status | bigint | Status or details of the installation of the service. | |
instance_url | text | The ServiceNow instance URL. | |
invoice_number | text | Number of the invoice related to the service. | |
ip_address | text | IP address associated with the service. | |
justification | text | Reason or justification for the service. | |
last_discovered | timestamp with time zone | Date when the service was last discovered. | |
last_review_date | timestamp with time zone | Date of the last review or assessment of the service. | |
lease_id | text | ID of the lease associated with the service. | |
life_cycle_stage | jsonb | Stage or phase in the life cycle of the service. | |
life_cycle_stage_status | jsonb | Status of the life cycle stage of the service. | |
location | jsonb | Location or physical placement of the service. | |
mac_address | text | MAC address associated with the service. | |
maintenance_schedule | jsonb | Schedule or plan for maintenance activities of the service. | |
managed_by | jsonb | User or group responsible for managing the service. | |
managed_by_group | jsonb | Group responsible for managing the service. | |
manufacturer | jsonb | Manufacturer or creator of the service. | |
model_id | jsonb | ID or reference to the model associated with the service. | |
model_number | text | Model number or identifier of the service. | |
monitor | boolean | Flag indicating if the service is monitored. | |
monitoring_requirements | text | Requirements or specifications for monitoring the service. | |
name | text | Name or title of the service. | |
number | text | Unique number or identifier of the service. | |
operational_status | bigint | Current operational status of the service. | |
order_date | timestamp with time zone | Date when the service was ordered or requested. | |
owned_by | jsonb | User or group who owns or is responsible for the service. | |
parent | jsonb | Parent service associated with the service. | |
po_number | text | Purchase order number related to the service. | |
portfolio_status | text | Status or categorization of the service within a portfolio. | |
prerequisites | text | Pre-requisites or requirements for the service. | |
price_model | text | Pricing model or strategy for the service. | |
price_unit | text | Unit of measurement or currency for the price of the service. | |
published_ref | jsonb | Reference or link to published information about the service. | |
purchase_date | text | Date when the service was purchased. | |
schedule | jsonb | Schedule or timeline associated with the service. | |
serial_number | text | Serial number or unique identifier of the service. | |
service_classification | text | Classification or categorization of the service. | |
service_level_requirement | text | Service level requirement or agreement for the service. | |
service_owner_delegate | jsonb | Delegate or representative of the service owner. | |
service_status | text | Current status or state of the service. | |
short_description | text | Brief description or summary of the service. | |
skip_sync | boolean | Flag indicating if synchronization should be skipped for the service. | |
sla | jsonb | Service Level Agreement (SLA) associated with the service. | |
sp_connection_name | text | Steampipe connection name. | |
sp_ctx | jsonb | Steampipe context in JSON form. | |
spm_service_portfolio | jsonb | Service Portfolio Management (SPM) portfolio associated with the service. | |
spm_taxonomy_node | jsonb | Taxonomy node associated with the service in SPM. | |
stakeholders | text | Individuals or groups with an interest in the service. | |
start_date | timestamp with time zone | Date when the service starts or becomes active. | |
state | text | Current state or status of the service. | |
subcategory | text | Subcategory or sub-classification of the service. | |
support_group | jsonb | Group responsible for providing support for the service. | |
supported_by | jsonb | User or group responsible for supporting the service. | |
sys_class_name | text | Name of the service's system class. | |
sys_class_path | text | Path or hierarchy of the service's system class. | |
sys_created_by | text | User who created the service record. | |
sys_created_on | timestamp with time zone | Date and time when the service record was created. | |
sys_domain | jsonb | Domain associated with the service. | |
sys_domain_path | text | Path or hierarchy of the service's system domain. | |
sys_id | text | Unique identifier of the service record. | |
sys_mod_count | bigint | Number of times the service record has been modified. | |
sys_updated_by | text | User who last updated the service record. | |
sys_updated_on | timestamp with time zone | Date and time when the service record was last updated. | |
unit_description | text | Description or details of the service unit. | |
unverified | boolean | Flag indicating if the service is unverified or not confirmed. | |
used_for | text | Purpose or use of the service. | |
user_group | jsonb | User group associated with the service. | |
vendor | jsonb | Vendor or supplier of the service. | |
version | text | Version or release of the service. | |
warranty_expiration | text | Expiration date of the warranty for the service. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- servicenow
You can pass the configuration to the command with the --config
argument:
steampipe_export_servicenow --config '<your_config>' servicenow_cmdb_ci_service