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, osfrom servicenow_cmdb_ci_serverorder by name;
select name, ip_address, osfrom servicenow_cmdb_ci_serverorder 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_servergroup by os;
select os, count(*)from servicenow_cmdb_ci_servergroup 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_onfrom servicenow_cmdb_ci_serverwhere sys_created_on <= now() - interval '3 years' and install_status = 1;
select name, sys_updated_onfrom servicenow_cmdb_ci_serverwhere 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_addressfrom servicenow_cmdb_ci_serverwhere serial_number = '478933-e78-8823';
select name, serial_number, ip_addressfrom servicenow_cmdb_ci_serverwhere serial_number = '478933-e78-8823';
Schema for servicenow_cmdb_ci_server
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
asset | jsonb | Server asset information. | |
asset_tag | text | Tag or identifier associated with the server asset. | |
assigned | timestamp with time zone | Flag indicating if the server is assigned. | |
assigned_to | jsonb | User or group assigned to the server. | |
assignment_group | jsonb | Group responsible for managing the server assignment. | |
attestation_score | bigint | Score representing the level of attestation for the server. | |
attestation_status | text | Status of attestation for the server. | |
attested | boolean | Flag indicating if the server is attested or confirmed. | |
attested_by | jsonb | User who attested or confirmed the server. | |
attested_date | timestamp with time zone | Date when the server was attested or confirmed. | |
attributes | text | Additional attributes or details of the server. | |
business_unit | jsonb | Business unit associated with the server. | |
can_print | boolean | Flag indicating if printing is allowed for the server. | |
category | text | Categorization or classification of the server. | |
cd_rom | boolean | CD-ROM information associated with the server. | |
cd_speed | bigint | Speed of the CD-ROM drive. | |
change_control | jsonb | Change control process or record related to the server. | |
chassis_type | text | Type or form factor of the server chassis. | |
checked_in | timestamp with time zone | Flag indicating if the server is checked in. | |
checked_out | timestamp with time zone | Flag indicating if the server is checked out. | |
classification | text | Classification or categorization of the server. | |
comments | text | Comments or additional notes about the server. | |
company | jsonb | Company or organization associated with the server. | |
correlation_id | text | ID or reference used for correlation purposes. | |
cost | double precision | Cost or financial information related to the server. | |
cost_cc | text | Cost center associated with the server. | |
cost_center | jsonb | Cost center associated with the server. | |
cpu_core_count | bigint | Number of CPU cores in the server. | |
cpu_core_thread | bigint | Number of threads per CPU core. | |
cpu_count | bigint | Number of CPUs in the server. | |
cpu_manufacturer | jsonb | Manufacturer of the CPU. | |
cpu_name | text | Name or model of the CPU. | |
cpu_speed | double precision | Speed of the CPU in GHz. | |
cpu_type | text | Type or architecture of the CPU. | |
default_gateway | text | Default gateway configuration for the server. | |
delivery_date | timestamp with time zone | Date when the server was delivered or received. | |
department | jsonb | Department or organizational unit associated with the server. | |
discovery_source | text | Source or method of server discovery. | |
disk_space | double precision | Available disk space on the server. | |
dns_domain | text | DNS domain associated with the server. | |
dr_backup | jsonb | Flag indicating if the server is a backup for disaster recovery. | |
due | timestamp with time zone | Due date or deadline for the server. | |
due_in | text | Remaining time until the server is due. | |
duplicate_of | jsonb | Reference to a duplicate server record. | |
environment | text | Environment or deployment stage of the server. | |
fault_count | bigint | Number of faults or issues associated with the server. | |
firewall_status | text | Status of the firewall configuration for the server. | |
first_discovered | timestamp with time zone | Date when the server was first discovered. | |
floppy | text | Floppy drive information associated with the server. | |
form_factor | text | Form factor or physical size of the server. | |
fqdn | text | Fully Qualified Domain Name (FQDN) of the server. | |
gl_account | text | General ledger account associated with the server. | |
hardware_status | text | Status of the hardware components of the server. | |
hardware_substatus | text | Substatus or additional status information for hardware components. | |
host_name | text | Host name or identifier of the server. | |
install_date | timestamp with time zone | Date when the server was installed. | |
install_status | bigint | Status of the server installation. | |
instance_url | text | The ServiceNow instance URL. | |
internet_facing | boolean | Flag indicating if the server is internet-facing. | |
invoice_number | text | Invoice number related to the server. | |
ip_address | text | IP address assigned to the server. | |
justification | text | Reason or justification for the server. | |
last_discovered | timestamp with time zone | Date when the server | |
lease_id | text | Identifier or reference for the server lease. | |
life_cycle_stage | jsonb | Current stage in the life cycle of the server. | |
life_cycle_stage_status | jsonb | Status of the life cycle stage for the server. | |
location | jsonb | Location or physical placement of the server. | |
mac_address | text | MAC address of the server's network interface. | |
maintenance_schedule | jsonb | Schedule or plan for server maintenance activities. | |
managed_by | jsonb | User or entity responsible for managing the server. | |
managed_by_group | jsonb | Group responsible for managing the server. | |
manufacturer | jsonb | Manufacturer of the server. | |
model_id | jsonb | Identifier or reference for the server model. | |
model_number | text | Model number or identifier of the server. | |
monitor | boolean | Flag indicating if the server is monitored. | |
most_frequent_user | jsonb | User who frequently uses the server. | |
name | text | Name or identifier of the server. | |
object_id | text | Identifier or reference for the server object. | |
operational_status | bigint | Operational status or condition of the server. | |
order_date | timestamp with time zone | Date when the server was ordered. | |
os | text | Operating system installed on the server. | |
os_address_width | bigint | Address width or architecture of the server's operating system. | |
os_domain | text | Domain or network domain associated with the server's operating system. | |
os_service_pack | text | Service pack version of the server's operating system. | |
os_version | text | Version or release of the server's operating system. | |
owned_by | jsonb | User or entity that owns or possesses the server. | |
po_number | text | Purchase order number related to the server. | |
purchase_date | text | Date when the server was purchased. | |
ram | bigint | Amount of RAM (Random Access Memory) in the server. | |
schedule | jsonb | Schedule or plan associated with the server. | |
serial_number | text | Serial number or unique identifier of the server. | |
short_description | text | Brief description or summary of the server. | |
skip_sync | boolean | Flag indicating if synchronization is skipped for the server. | |
sp_connection_name | text | Steampipe connection name. | |
sp_ctx | jsonb | Steampipe context in JSON form. | |
start_date | timestamp with time zone | Date when the server was started or activated. | |
subcategory | text | Subcategory or further classification of the server. | |
support_group | jsonb | Group responsible for providing support for the server. | |
supported_by | jsonb | User or entity responsible for supporting the server. | |
sys_class_name | text | Name of the system class associated with the server. | |
sys_class_path | text | Path or location of the system class associated with the server. | |
sys_created_by | text | User who created the server record. | |
sys_created_on | timestamp with time zone | Date and time when the server record was created. | |
sys_domain | jsonb | System domain associated with the server. | |
sys_domain_path | text | Path or location of the system domain associated with the server. | |
sys_id | text | Unique identifier of the server record. | |
sys_mod_count | bigint | Number of modifications or updates made to the server record. | |
sys_updated_by | text | User who last updated the server record. | |
sys_updated_on | timestamp with time zone | Date and time when the server record was last updated. | |
unverified | boolean | Flag indicating if the server is unverified or not confirmed. | |
used_for | text | Purpose or function for which the server is used. | |
vendor | jsonb | Vendor or supplier of the server. | |
virtual | boolean | Flag indicating if the server is a virtual machine. | |
warranty_expiration | text | Expiration 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