turbot/servicenow
steampipe plugin install servicenow

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 frequency
from
servicenow_cmdb_ci_service
group by
name
order by
frequency desc
limit
10;
select
name,
count(name) as frequency
from
servicenow_cmdb_ci_service
group by
name
order by
frequency desc
limit
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,
name
from
servicenow_cmdb_ci_service
order by
category,
name;
select
category,
name
from
servicenow_cmdb_ci_service
order 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_status
from
servicenow_cmdb_ci_service;
select
name,
operational_status
from
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_on
from
servicenow_cmdb_ci_service
where
sys_created_on >= now() - interval '30 days';
select
name,
sys_created_on
from
servicenow_cmdb_ci_service
where
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.name
from
servicenow_cmdb_ci_service s
left join servicenow_sys_user u on u.sys_id = s.assigned_to ->> 'value'
select
s.name,
u.name
from
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

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
aliasestextAlternative names or aliases for the service.
assetjsonbAsset associated with the service.
asset_tagtextTag or label associated with the asset.
assignedtimestamp with time zoneFlag indicating if the service is assigned.
assigned_tojsonbUser or group assigned to the service.
assignment_groupjsonbGroup responsible for the assignment of the service.
attestation_scorebigintScore indicating the level of attestation for the service.
attestation_statustextStatus of attestation for the service.
attestedbooleanFlag indicating if the service is attested.
attested_byjsonbUser who attested the service.
attested_datetimestamp with time zoneDate when the service was attested.
attributestextAdditional attributes or properties of the service.
busines_criticalitytextCriticality level or importance of the service to the business.
business_contactjsonbContact person or group for business-related matters.
business_needtextBusiness need or purpose for the service.
business_relation_managerjsonbManager responsible for the business relationship with the service.
business_unitjsonbBusiness unit associated with the service.
can_printbooleanFlag indicating if the service can be printed.
categorytextCategory or classification of the service.
change_controljsonbChange control process or requirements for the service.
checked_intimestamp with time zoneFlag indicating if the service is checked in.
checked_outtimestamp with time zoneFlag indicating if the service is checked out.
checkouttextCheckout status or details of the service.
commentstextAdditional comments or notes about the service.
companyjsonbCompany associated with the service.
compatibility_dependenciestextDependencies or requirements for compatibility with other services.
consumer_typetextType of consumer or user of the service.
correlation_idtextID for correlating related services or records.
costdouble precisionCost or financial details of the service.
cost_cctextCost center associated with the service.
cost_centerjsonbCost center associated with the service.
delivery_datetimestamp with time zoneDate when the service is expected to be delivered.
delivery_managerjsonbManager responsible for the delivery of the service.
departmentjsonbDepartment associated with the service.
discovery_sourcetextSource or method of service discovery.
dns_domaintextDNS domain associated with the service.
duetimestamp with time zoneDue date or deadline for the service.
due_intextTime or duration until the service is due.
duplicate_ofjsonbReference to a duplicate service.
end_datetimestamp with time zoneDate when the service ends or expires.
environmenttextEnvironment or context in which the service operates.
fault_countbigintNumber of faults or issues associated with the service.
first_discoveredtimestamp with time zoneDate when the service was first discovered.
fqdntextFully qualified domain name (FQDN) associated with the service.
gl_accounttextGeneral ledger (GL) account associated with the service.
install_datetimestamp with time zoneDate when the service was installed.
install_statusbigintStatus or details of the installation of the service.
instance_urltextThe ServiceNow instance URL.
invoice_numbertextNumber of the invoice related to the service.
ip_addresstextIP address associated with the service.
justificationtextReason or justification for the service.
last_discoveredtimestamp with time zoneDate when the service was last discovered.
last_review_datetimestamp with time zoneDate of the last review or assessment of the service.
lease_idtextID of the lease associated with the service.
life_cycle_stagejsonbStage or phase in the life cycle of the service.
life_cycle_stage_statusjsonbStatus of the life cycle stage of the service.
locationjsonbLocation or physical placement of the service.
mac_addresstextMAC address associated with the service.
maintenance_schedulejsonbSchedule or plan for maintenance activities of the service.
managed_byjsonbUser or group responsible for managing the service.
managed_by_groupjsonbGroup responsible for managing the service.
manufacturerjsonbManufacturer or creator of the service.
model_idjsonbID or reference to the model associated with the service.
model_numbertextModel number or identifier of the service.
monitorbooleanFlag indicating if the service is monitored.
monitoring_requirementstextRequirements or specifications for monitoring the service.
nametextName or title of the service.
numbertextUnique number or identifier of the service.
operational_statusbigintCurrent operational status of the service.
order_datetimestamp with time zoneDate when the service was ordered or requested.
owned_byjsonbUser or group who owns or is responsible for the service.
parentjsonbParent service associated with the service.
po_numbertextPurchase order number related to the service.
portfolio_statustextStatus or categorization of the service within a portfolio.
prerequisitestextPre-requisites or requirements for the service.
price_modeltextPricing model or strategy for the service.
price_unittextUnit of measurement or currency for the price of the service.
published_refjsonbReference or link to published information about the service.
purchase_datetextDate when the service was purchased.
schedulejsonbSchedule or timeline associated with the service.
serial_numbertextSerial number or unique identifier of the service.
service_classificationtextClassification or categorization of the service.
service_level_requirementtextService level requirement or agreement for the service.
service_owner_delegatejsonbDelegate or representative of the service owner.
service_statustextCurrent status or state of the service.
short_descriptiontextBrief description or summary of the service.
skip_syncbooleanFlag indicating if synchronization should be skipped for the service.
slajsonbService Level Agreement (SLA) associated with the service.
sp_connection_nametextSteampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
spm_service_portfoliojsonbService Portfolio Management (SPM) portfolio associated with the service.
spm_taxonomy_nodejsonbTaxonomy node associated with the service in SPM.
stakeholderstextIndividuals or groups with an interest in the service.
start_datetimestamp with time zoneDate when the service starts or becomes active.
statetextCurrent state or status of the service.
subcategorytextSubcategory or sub-classification of the service.
support_groupjsonbGroup responsible for providing support for the service.
supported_byjsonbUser or group responsible for supporting the service.
sys_class_nametextName of the service's system class.
sys_class_pathtextPath or hierarchy of the service's system class.
sys_created_bytextUser who created the service record.
sys_created_ontimestamp with time zoneDate and time when the service record was created.
sys_domainjsonbDomain associated with the service.
sys_domain_pathtextPath or hierarchy of the service's system domain.
sys_idtextUnique identifier of the service record.
sys_mod_countbigintNumber of times the service record has been modified.
sys_updated_bytextUser who last updated the service record.
sys_updated_ontimestamp with time zoneDate and time when the service record was last updated.
unit_descriptiontextDescription or details of the service unit.
unverifiedbooleanFlag indicating if the service is unverified or not confirmed.
used_fortextPurpose or use of the service.
user_groupjsonbUser group associated with the service.
vendorjsonbVendor or supplier of the service.
versiontextVersion or release of the service.
warranty_expirationtextExpiration 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