hgconcept-cmdb-integration methods
TRANSCRIPT
1HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODSINTEGRATING INTO… AND POPULATING YOUR #CMDB
USING DISCOVERY & OPERATIONAL SOLUTIONS
Hichem GuemiriSERVICENOW [email protected]+1 (514) 247-0825
Maxime CarrierSERVICENOW IMPLEMENTATION [email protected]+1 (514) 962-6136
2HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
AGENDA
• Introduction
• Architecture
• Integration use cases
• Methods & Interfaces
• Other Resources…
3HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SERVICE
DEPENDENCY
FINANCIAL
MANAGEMENTSOFTWARE
LICENSING
VENDOR
MANAGEMENT
PROCUREMENT
CLIENT
MANAGEMENT
SERVICE
CATALOG
PROBLEM
MANAGEMENT
INCIDENT
MANAGEMENT
CHANGE
MANAGEMENT
CONFIGURATION
MANAGEMENT
REQUEST
FULFILLMENT
ORCHESTRATION
CONFIGURATION
AUTOMATION
SYSTEMS
INTEGRATION
DATABASE
MANAGEMENT
DISCOVERY
DATA CENTER
AUTOMATION
EVENT
MANAGEMENT
BUSINESS
STRATEGY
ENTERPRISE
ARCHITECTURE
PROCESS
DESIGN
PROCESS
ASSESSMENT
CLOUD
MANAGEMENT SERVICE
MAPPING &
DESIGN
SERVICE
DESIGN
SYSTEMS &
NETWORK
MANAGEMENT
RISKS &
COMPLIANCE
I.T GOVERNANCE
CMDB
HR
LEGALGRC
APPLICATION
DEVELOPMENTDATA
MIGRATION
WORKFLOWS
CUSTOM
INTEGRATION
ASSET
MANAGEMENT
OPERATIONS
MANAGEMENT
APPLICATION
MANAGEMENT
PROCESS
AUTOMATION
BUSINESS
MANAGEMENT
SERVICE
MANAGEMENT
I.T
PLANNING
SERVICE
PORTFOLIO
FACILITIES SDLC
SERVICE
MAPPING
VIRTUALIZATION
MANAGEMENT
PROVISIONING
STORAGE
MANAGEMENT
EMPLOYEE
PORTAL
BACKUP
MANAGEMENT
SECURITY
ALERTS
TRAINING
CAPACITY
MANAGEMENT
AVAILABILITY
MANAGEMENT
BUSINESS
CONTINUITY
ROADMAP
STRATEGY
ACQUISITION
AT THE HEART OF YOUR SERVICE MANAGEMENT! THE CMDB…
4HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SERVICENOW… A SHARED ARCHITECTURE
STORAGE
BACKUP
NETWORK
TELECOM
DATA CENTER
VIRTUALIZATION
SERVERS
INCIDENT
MANAGEMENT
RESPOND TO INCIDENTS / RESTORE SERVICE
SERVICE
CATALOG MANAGEMENT
SERVICE ASSET &
CONFIGURATION
MANAGEMENT
Identify CI s & Dependencies
Manage Service Models
REPORT
MANAGEMENT
PROBLEM
MANAGEMENT
REQUEST
FULFILLMENT
CHANGE
MANAGEMENT
SUPPORTSSUPPORTS SUPPORTS
EVENT
MANAGEMENT
EVENT PROCESSING
EVENT RESPONSE
EVENT INTEGRATIONS
EVENT CORRELATION
EVENT ANALYTICS
SUPPORTS
INTEGRATES WITH
SERVICE LEVEL
MANAGEMENT
KNOWLEDGE
MANAGEMENT
NETWORK
FLOW
DATABASE
APPLICATIONS
SNMP
TRAPS
WMISYSLOGSWEB
SERVICESSCRIPTS
SERVICENOW
CMDB
STAFF
IT ANALYSTS
SYSTEMS
ADMINISTRATORS
CUSTOMERS
DATA
PROVIDED BY
SERVICE DESK
FUNCTION
SERVICE
CATALOG
SERVICE
ADMINISTRATION
SERVICE
DELIVERY
SERVICE
PRODUCING
SYSTEMS
SERVICE
CONSUMERS
SERVICE
REQUEST
SERVICE
SUPPORT
WEB PORTAL
SERVICE PORTAL
WEB ACCESS BASED ON ROLE
SERVICE
RECEIVING END POINT
SERVICE
PROVIDERS
SERVICE
SUPPORT
SERVICES
5HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
POPULATING THE CMDB
DISCOVERYINTEGRATIONS
CONSOLIDATED
CMDBASSETS & CONFIGURATION ITEMS
INVENTORY
DATA
CENTER
NETWORK
TELECOM
SERVERS
STORAGE
DBMS
APPLICATIONS
POPU
LATI
NG
TH
E C
MD
B
BUSINESS
SERVICE
APPLICATION
SERVICE
TECHNOLOGY
SERVICE
BUILDING
LOCATION
ORGANIZATION
PEOPLE
ANALYST
GROUP
OWNERSHIP
SLA
CI R
ELA
TIO
NSH
IPS
CUSTOMERS
SERVICES
6HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
CMDB POPULATION APPROACH
7HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION USE CASES• AUTHENTICATION
• BULK DATA IMPORT
• BULK DATA EXPORT
• TRANSACTIONAL DATA EXCHANGE
8HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
USE CASE 1: AUTHENTICATION
WHAT HOW
• Leverage external system for authentication
• Leverage authentication of other systems
• Multiple authentication stores
• LDAP Listener Import via MID Server Authentication (LDAPS and not via MID Server)
• Digest Token w/ nonce
• SAML (2.0)
• Multi-Provider SSO
9HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
USE CASE 2: BULK DATA IMPORT
WHAT HOW
• Importing bulk data from 3rd party systems
• One time import
• Scheduled import at regular intervals from multiple locations
• Load Import Sets FILE
o Tabular data retrievalo FTPo SFTPo SCPo FTPS
o POST (HTTPS) to instanceo CSVo Excelo XML
o MID Server - Scheduled File Importer JDBC LDAP
• Transform into target Field maps / scripts Transform Maps
10HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
USE CASE 3: BULK DATA EXPORT
WHAT HOW
• Exporting bulk data to 3rd party systems
• One time export
• Scheduled export at regular intervals
• Data Archiving / Warehousing
• 3rd party reporting
• Sharing data across multiple instances
• ODBC Driver
• Email as attachment
• Data Processors via HTTP Request XML CSV XLS
• Web Service batching SOAP REST JSON
11HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
USE CASE 4: TRANSACTIONAL DATA EXCHANGE
WHAT HOW
• Send and receive data based on event triggers Ticket, Incident, Problem integrations...
• Building remote client to interact w/ ServiceNow
• Custom Web UI
• Orchestration
• Inbound Web Services Direct Web Services (REST/SOAP) Import Set Web Services (REST/SOAP) Scripted Web Services (SOAP) Custom Processor (HTTPS/REST)
• Inbound Email Actions (Event Management)
• Outbound Web Services RESTMessageV2 SOAPMessageV2
12HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATIONS BEST-PRACTICE Tables vs. File For Import Sets
SOAP & REST APIs provide complete access to instance data
Export based web services allows for fast, easy pull of data
1. Inventory all data sources for each CI Class
2. Review Documents provided by Project Team• Integration methods and data sources
• CI Classifications and table structure
• Common Attributes security related attributes
• Data Dictionary
3. Extract Data from operational toolsets
4. Enable integrations
13HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS• MID SERVER
• IMPORT SETS
• TRANSFORM MAPS
• REST API EXPLORER
• REST MESSAGES
• PROCESSOR
• WEB SERVICE
14HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATIONS METHODS
SNOW
INTEGRATIONS
MID SERVER
IMPORT SETS
TRANSFORM MAPS
REST API EXPLORER
REST MESSAGES
PROCESSOR
WEB SERVICE
15HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: MID SERVER
• Discovery
• Orchestration
• Import Sets
– JDBC
– File
– LDAP
• Microsoft SCCM
• Microsoft System Center Operations Manager
Integration with monitoring tools, for receiving messages (traps, soap calls, web services) internally to ServiceNow
16HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: IMPORT SETS
GOOD FOR CONSIDERATIONS
• Importing bulk data from external files
• Application-specific web services
• Web service import sets allow you to restrict direct web service
access to an application table.
• Web service import sets automatically apply transform maps
17HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: TRANSFORM MAPS
GOOD FOR CONSIDERATIONS
• Data transformation and clean up
• Identification of and updates to existing records
• Identify the fields that make a record unique and use them to
coalesce.
• There are several existing transform maps you can use as
templates.
• Filter out first – Do not import data that has not changed
• Coalescing on non-indexed fields
18HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: REST API EXPLORER
GOOD FOR CONSIDERATIONS
• Proper formatting of REST requests• Table API
• Retrieve records from a table (GET)• Create a record (POST)• Retrieve a record (GET)• Modify a record (PUT)• Delete a record (DELETE)• Update a record (PATCH)
• Aggregate API• Retrieve statistical calculations for a table (GET)
• Import Set API• Create a record in an Import Set staging table (POST)• Retrieve an Import Set record (GET)
• Testing inbound REST requests
• Generating sample code
• Can eliminate the need for web service client tools.
• Use to reduce the complexity of scripting REST calls.
• Calls bypass application access settings.
19HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: REST MESSAGES
GOOD FOR CONSIDERATIONS
• Communicating with external applications
• Automatically including record values by using variables
• Use Preview Script Usage to see how to code a REST message.
• REST messages require asynchronous business rules.
20HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHODS: PROCESSORS
GOOD FOR CONSIDERATIONS
• Running arbitrary code from a URL
• Applying an operation to multiple tables
• Creating processors requires using the application scope’s
namespace identifier in the URL.
• Consider whether web services can accomplish the same goal.
• There are many existing processors to use.
21HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION METHOD: WEB SERVICES
• INBOUND: Inbound web services allow you to access and modify ServiceNow data using a client application.
– Direct Web Services: query tables and records directly using SOAP, REST, or other web service formats.
– ODBC Driver: report on ServiceNow data using an ODBC client, such as Microsoft Excel.
– Import Set: access the import set tables and import data through a web service interface.
– Scripted Web Services: define custom web service endpoints using JavaScript.
• OUTBOUND: Outbound web services allow you to send SOAP and REST messages to external web service providers.
– Outbound REST
– Outbound SOAP
• EXPORT WEB SERVICES
• Excel
• RSS
22HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SOAP COMMUNICATION FLOW
23HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
WEB SERVICES: DIRECT vs. IMPORT SET
Direct: Query Import Set: Create, Update, Delete
ServiceNow supports multiple APIs for direct web services.
SOAP https://en.wikipedia.org/wiki/SOAP
REST https://en.wikipedia.org/wiki/REST#Applied_to_web_services
CSV https://en.wikipedia.org/wiki/Comma-separated_values
EXCEL https://en.wikipedia.org/wiki/Microsoft_Excel_file_format#File_formats
JSONv2 http://json.org/
PDF https://en.wikipedia.org/wiki/Portable_Document_Format
RSS https://en.wikipedia.org/wiki/RSS
XML https://en.wikipedia.org/wiki/XML
ODBC https://en.wikipedia.org/wiki/Open_Database_Connectivity
24HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTEGRATION INTERFACES
• JDBC
• ODBC
• SOAP
• REST
• DATA EXPORT
25HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SUPPORTED INTEGRATIONS INTERFACES
INTEGRATION INTERFACES
JDBC
JSON
SOAPREST
ODBC
DATA EXPORT
26HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: EMAIL
Inbound email actions enable an administrator to define the actions ServiceNow takes when receiving email
27HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: JDBC
• A JDBC probe runs on the MID Server to query an external database via [JDBC] and returns results to ServiceNow. Probes
interact with the MID Server via the ECC Queue.
• To query a table using a direct JDBC probe, requires the following parameters
• JDBC driver class name
• JDBC connection string
• Database server
• Database name
• User name
• User password
• You can configure a JDBC data source to use the ID of the user configured for the Windows MID Server service for SQL Server
authentication.
28HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: SOAP
• ServiceNow publishes its underlying table structures and associated data with the following Web Service methods:• Direct Web Services: Use a URL query to request a ServiceNow table's WSDL.• Web Service Import Sets: Use import tables and transform maps to automate Web Service requests to ServiceNow
tables.• Scripted Web Services: Use custom JavaScript to execute Web Services requests.
• You can get a WSDL format by issuing a URL targeting a ServiceNow table with the WSDL parameter, for example: https://myinstance.service-now.com/incident.do?WSDL
29HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: JSON
• JSON format is a natural extension to the JavaScript language.• JSON web service is triggered by a standalone JSONv2 URL parameter
https://<instance name>.service-now.com/mytable.do?JSONv2
• Data Retrieval
• Data Modification
METHOD DESCRIPTION
getKeys Query the targeted table using an encoded query string and return a comma delimited list of sys_id values.
getRecords Query the targeted table using an encoded query string and return all matching records and their fields.
get Query a single record from the targeted table by specifying the sys_id in the sysparm_sys_id URL parameter, and return the record and its fields.
METHOD DESCRIPTION
insert Create one or more new records for the table targeted in the URL.
insertMultiple Create multiple new records for the table targeted in the URL.
update Update existing records in the targeted table in the URL, filtered by an encoded query string.
deleteRecord Delete a record from the table targeted in the URL by specifying its sys_id in the sysparm_sys_id URL parameter.
deleteMultiple Delete multiple records from the table targeted in the URL, filtered by an encoded query string.
30HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: REST
• Outbound REST functionality allows to retrieve, create, update, or delete data on a web server
• Send REST messages from a MID Server, which allows access an internal network
• ServiceNow sends requests to a REST endpoint using a REST message.
• A REST message contains the following elements:
• ENDPOINT: The URL of the data to be retrieved, updated, or deleted.
• HEADERS: The HTTP headers in REST messages carry the information about the data format. They apply to all methods
in that message unless the header is overridden in the method definitions.
• METHODS: The HTTP methods — PUT, POST, GET, DELETE — interact with the data at the endpoint.
31HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: ODBC
• The ServiceNow ODBC driver allows an ODBC client to connect to the ServiceNow platform for reporting
• The ODBC driver supports only SELECT statements or read-only functions, and does not modify the instance data.
• There is no supported way to use the ODBC driver with a Java client application or with a Java JDBC-ODBC bridge
32HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
INTERFACE: DATA EXPORT
ServiceNow offers a variety of ways for administrators and users with the itil role to export data:
• Form export: Export an individual record from the user interface. Choose PDF or XML format directly from a form.
• List export: Export multiple records from the user interface. Choose CSV, Excel, PDF, or XML format directly from a list.
• Scheduled export with reports: Automatically export multiple records from a table on a set schedule. Create a scheduled job to
regularly export data as a report.
• Direct URL access: Export multiple records from a table using the ServiceNow CSV, Excel, PDF, or XML processor. Specify the table
form or list you want to export in the URL.
• Web services/SOAP: Export multiple records from a table when an external client makes a web services request. Create an external
application or process to automate the retrieval of data from an instance via web services or SOAP.
33HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
WEB SERVICE: INTEGRATION TESTING TOOLS
• cURL
– Command line tool for making HTTP requests. Allows complete configuration of HTTP requests and verbose logging of request and response.
• Runscope
– Web based API testing tool that allow for capturing HTTP requests to debug as well as acts as a proxy for requests to APIs that allows you to
see both the HTTP request and response. Also provides ability to use script automated API test cases via Javascript and schedule them to run.
• ReadyAPI (formerly known as SOAPUI):
– Web service testing tool (SOAP & REST) providing the ability to generate sample requests by parsing WSDL.
• Hurl.it(hurl.it)
– Web based testing tool providing ability to make simple HTTP requests against an API from web and see response.
• Httpbin (httpbin.org)
– Web based HTTP client testing service. Allows you to make HTTP requests against httpbin and see the response in the browser.
• Google DevTools
34HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SERVICENOW INTEGRATION RESOURCES
ServiceNow Developer Portal
ServiceNow Developer Community
StackOverflow
ServiceNow Integration Video Series
• Integration Interfaces Overview
• Outbound Web Service
• Inbound Web Service
• Import Sets
• The Application Menu
35HGCONCEPTIT Service Management | IT Asset Management | IT Service Operations | IT Process Automation
© 2016 HGConcept All Rights Reserved
SERVICENOW BOOKS BY HGCONCEPT
Hichem GuemiriSERVICENOW [email protected]+1 (514) 247-0825
Maxime CarrierSERVICENOW IMPLEMENTATION [email protected]+1 (514) 962-6136