turbot/servicenow
steampipe plugin install servicenow

Table: servicenow_cmdb_ci_server - Query ServiceNow CMDB CI Servers using SQL

ServiceNow's Configuration Management Database (CMDB) is a service that stores information about all technical services. The CMDB includes CI Servers, which represent logical entities or instances that are part of an IT infrastructure. These servers are used to store and manage data, run applications, and provide services.

Table Usage Guide

The servicenow_cmdb_ci_server table provides insights into Configuration Item (CI) Servers within ServiceNow's Configuration Management Database (CMDB). As an IT administrator or manager, explore server-specific details through this table, including server names, statuses, classes, and other related attributes. Utilize it to manage and monitor your IT infrastructure effectively, ensuring optimal performance and availability of services.

Examples

List servers with their IP addresses and OS versions

Explore which servers are associated with specific IP addresses and operating systems. This is useful for maintaining an organized inventory of your servers and understanding their configurations.

select
name,
ip_address,
os
from
servicenow_cmdb_ci_server
order by
name;
select
name,
ip_address,
os
from
servicenow_cmdb_ci_server
order by
name;

Number of servers running each OS version

Gain insights into the distribution of operating systems across your servers. This query helps in understanding the spread of different OS versions, enabling strategic decisions for software compatibility and updates.

select
os,
count(*)
from
servicenow_cmdb_ci_server
group by
os;
select
os,
count(*)
from
servicenow_cmdb_ci_server
group by
os;

List all servers that have been in running for more than 3 years

Explore servers that have been operating for an extended period, specifically those running for over three years. This can aid in identifying potential maintenance needs or assessing the longevity and reliability of your server infrastructure.

select
name,
sys_updated_on
from
servicenow_cmdb_ci_server
where
sys_created_on <= now() - interval '3 years'
and install_status = 1;
select
name,
sys_updated_on
from
servicenow_cmdb_ci_server
where
sys_created_on <= datetime('now', '-3 years')
and install_status = 1;

List the servers with a specific serial number

Discover the servers that have a specific serial number. This can be beneficial for understanding the distribution and usage of a particular server model within your infrastructure.

select
name,
serial_number,
ip_address
from
servicenow_cmdb_ci_server
where
serial_number = '478933-e78-8823';
select
name,
serial_number,
ip_address
from
servicenow_cmdb_ci_server
where
serial_number = '478933-e78-8823';

Schema for servicenow_cmdb_ci_server

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
assetjsonbServer asset information.
asset_tagtextTag or identifier associated with the server asset.
assignedtimestamp with time zoneFlag indicating if the server is assigned.
assigned_tojsonbUser or group assigned to the server.
assignment_groupjsonbGroup responsible for managing the server assignment.
attestation_scorebigintScore representing the level of attestation for the server.
attestation_statustextStatus of attestation for the server.
attestedbooleanFlag indicating if the server is attested or confirmed.
attested_byjsonbUser who attested or confirmed the server.
attested_datetimestamp with time zoneDate when the server was attested or confirmed.
attributestextAdditional attributes or details of the server.
business_unitjsonbBusiness unit associated with the server.
can_printbooleanFlag indicating if printing is allowed for the server.
categorytextCategorization or classification of the server.
cd_rombooleanCD-ROM information associated with the server.
cd_speedbigintSpeed of the CD-ROM drive.
change_controljsonbChange control process or record related to the server.
chassis_typetextType or form factor of the server chassis.
checked_intimestamp with time zoneFlag indicating if the server is checked in.
checked_outtimestamp with time zoneFlag indicating if the server is checked out.
classificationtextClassification or categorization of the server.
commentstextComments or additional notes about the server.
companyjsonbCompany or organization associated with the server.
correlation_idtextID or reference used for correlation purposes.
costdouble precisionCost or financial information related to the server.
cost_cctextCost center associated with the server.
cost_centerjsonbCost center associated with the server.
cpu_core_countbigintNumber of CPU cores in the server.
cpu_core_threadbigintNumber of threads per CPU core.
cpu_countbigintNumber of CPUs in the server.
cpu_manufacturerjsonbManufacturer of the CPU.
cpu_nametextName or model of the CPU.
cpu_speeddouble precisionSpeed of the CPU in GHz.
cpu_typetextType or architecture of the CPU.
default_gatewaytextDefault gateway configuration for the server.
delivery_datetimestamp with time zoneDate when the server was delivered or received.
departmentjsonbDepartment or organizational unit associated with the server.
discovery_sourcetextSource or method of server discovery.
disk_spacedouble precisionAvailable disk space on the server.
dns_domaintextDNS domain associated with the server.
dr_backupjsonbFlag indicating if the server is a backup for disaster recovery.
duetimestamp with time zoneDue date or deadline for the server.
due_intextRemaining time until the server is due.
duplicate_ofjsonbReference to a duplicate server record.
environmenttextEnvironment or deployment stage of the server.
fault_countbigintNumber of faults or issues associated with the server.
firewall_statustextStatus of the firewall configuration for the server.
first_discoveredtimestamp with time zoneDate when the server was first discovered.
floppytextFloppy drive information associated with the server.
form_factortextForm factor or physical size of the server.
fqdntextFully Qualified Domain Name (FQDN) of the server.
gl_accounttextGeneral ledger account associated with the server.
hardware_statustextStatus of the hardware components of the server.
hardware_substatustextSubstatus or additional status information for hardware components.
host_nametextHost name or identifier of the server.
install_datetimestamp with time zoneDate when the server was installed.
install_statusbigintStatus of the server installation.
internet_facingbooleanFlag indicating if the server is internet-facing.
invoice_numbertextInvoice number related to the server.
ip_addresstextIP address assigned to the server.
justificationtextReason or justification for the server.
last_discoveredtimestamp with time zoneDate when the server
lease_idtextIdentifier or reference for the server lease.
life_cycle_stagejsonbCurrent stage in the life cycle of the server.
life_cycle_stage_statusjsonbStatus of the life cycle stage for the server.
locationjsonbLocation or physical placement of the server.
mac_addresstextMAC address of the server's network interface.
maintenance_schedulejsonbSchedule or plan for server maintenance activities.
managed_byjsonbUser or entity responsible for managing the server.
managed_by_groupjsonbGroup responsible for managing the server.
manufacturerjsonbManufacturer of the server.
model_idjsonbIdentifier or reference for the server model.
model_numbertextModel number or identifier of the server.
monitorbooleanFlag indicating if the server is monitored.
most_frequent_userjsonbUser who frequently uses the server.
nametextName or identifier of the server.
object_idtextIdentifier or reference for the server object.
operational_statusbigintOperational status or condition of the server.
order_datetimestamp with time zoneDate when the server was ordered.
ostextOperating system installed on the server.
os_address_widthbigintAddress width or architecture of the server's operating system.
os_domaintextDomain or network domain associated with the server's operating system.
os_service_packtextService pack version of the server's operating system.
os_versiontextVersion or release of the server's operating system.
owned_byjsonbUser or entity that owns or possesses the server.
po_numbertextPurchase order number related to the server.
purchase_datetextDate when the server was purchased.
rambigintAmount of RAM (Random Access Memory) in the server.
schedulejsonbSchedule or plan associated with the server.
serial_numbertextSerial number or unique identifier of the server.
short_descriptiontextBrief description or summary of the server.
skip_syncbooleanFlag indicating if synchronization is skipped for the server.
start_datetimestamp with time zoneDate when the server was started or activated.
subcategorytextSubcategory or further classification of the server.
support_groupjsonbGroup responsible for providing support for the server.
supported_byjsonbUser or entity responsible for supporting the server.
sys_class_nametextName of the system class associated with the server.
sys_class_pathtextPath or location of the system class associated with the server.
sys_created_bytextUser who created the server record.
sys_created_ontimestamp with time zoneDate and time when the server record was created.
sys_domainjsonbSystem domain associated with the server.
sys_domain_pathtextPath or location of the system domain associated with the server.
sys_idtextUnique identifier of the server record.
sys_mod_countbigintNumber of modifications or updates made to the server record.
sys_updated_bytextUser who last updated the server record.
sys_updated_ontimestamp with time zoneDate and time when the server record was last updated.
unverifiedbooleanFlag indicating if the server is unverified or not confirmed.
used_fortextPurpose or function for which the server is used.
vendorjsonbVendor or supplier of the server.
virtualbooleanFlag indicating if the server is a virtual machine.
warranty_expirationtextExpiration date of the server warranty.

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_server