understanding patterns on service mapping

Deepika54
Tera Contributor

Hello ITOM Experts,

 

I am leaning service mapping from now learning and in the section where they teach about creating your own patterns, i am unable to understand any of it. Can anyone tell me what should i learn to understand them. Like the commands shows are in the form of example: $process.commandLine, like what is this programming language, like do i need to learn powershell or what do i need to learn to understand patterns. Please help me.

Thanks in advance.

7 REPLIES 7

Carolyn Rast
Tera Guru

Patterns, like probes and sensors, are a series of operations that also collect data on a host, process it, and update the CMDB. Patterns differ from probes and sensors in that they are written in Neebula Discovery Language (NDL) rather than JavaScript, and they are called into action in the later stages of the horizontal discovery process. Default patterns are provided, but you can also customize or create patterns using the Pattern Designer.

 

from: https://www.servicenow.com/community/itom-forum/what-is-the-discovery-pattern-text-script-type-is-it....

 

orons
ServiceNow Employee
ServiceNow Employee

I will add to the previous note that when you do write a pattern then yes, you need to know what you are aiming for

Depends on what you are trying to discover, you will have to know the "language" required to communicate with that device

It looks like the earlier post has a broken link, so I found this instead:

https://docs.servicenow.com/bundle/utah-it-operations-management/page/product/service-mapping/task/t...

 

That seems to be a good start

I can only speak for patterns in Discovery context, but not for Service Mapping

The pattern itself has the same structure and rules, however the high level flows are different

While the main goal of Discovery is to populate data, Service Mapping to my knowledge is mainly focused on creating connections the different layers of a business service

 

If you want to practice patterns, I recommend putting Service Mapping aside for a sec and just have a grasp on how to communicate with devices, grab information and populate tables in CMDB

 

Just a tip:

The Pattern Designer tool is used to create and debug patterns

However, it needs to have the CI in CMDB in order to debug [not fully accurate..i'm simplifying]

I don't want to explain the entire thing here, but if you choose to discover whatever and you want to play around with the relevant pattern, just create a dummy\empty CI in CMDB setting the IP Address attribute to the IP you want to discover and then use the debugger

Deepika54
Tera Contributor

thank you so much. So the commands for example $process.executable or $install_directory or  $process.executablePath+" -V,, like these commands , like is this powershell or how to understand the meaning of these commands or lets say suppose i am creating a new step in the identification section, like how does someone know which command to use to get some specific information.. What are the pre-requisites u think one should know to understand the above syntaxes?

orons
ServiceNow Employee
ServiceNow Employee

Sure no problem!

It is actually in the doc I shared. On one of the steps: Define discovery steps as described in Define discovery steps.

 

The $ sign in the pattern designer is a way to access variables

When you gather information, it is saved into variables [values, lists, tables] and you access them through $ sign

Behind the scenes these will translate into their values, so for example if $process.executablePath is "/bin/cat" and the step is a run command step that runs $process.executablePath + " -b", it will execute "/bin/cat -b"

 

Just take it slowly...read existing patterns..try to run and debug them