Probe and Sensor Development
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2015 07:10 AM
HI Folks,
I would like to develop some probes and sensors to get more information regarding servers and networks that
is not available in oob in Snow Discovery.So request your help in how i need to start and what is the language that
i need to learn and where to start exactly to get this requirement done.
Request your support folks.
Thanks for the help.
Best regards
Satya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2015 12:17 PM
I've made a handful of custom probe/sensors. You're best off finding an out of box probe/sensor that is somewhat close to what you need. At least make sure it's the platform (windows, linux, network gear, etc). Look at the command they're running. This will give you an idea how to create your own. Then look at the sensor. They all extend the DiscoverySensor class. The 'parseOutput' function is what you'll want to rewrite for your needs.
http://wiki.servicenow.com/index.php?title=Discovery_Probes_and_Sensors#gsc.tab=0
This article is a good reference. I'd recommend having two windows open, one with your new record and one with an out of box record so you can reference syntax, etc.
First start with a Discovery Probe (discovery_probes) record. Navigate to Discovery Definition > Probes.
You can copy most of the fields from the OOB probe. Give it a unique ECC queue name. Save the record
Next create a new Probe Parameter using the related list at the bottom of the Probe record that will hold the command you're going to execute. (I copied the Linux software installs probe, and it has the command in a Probe Parameter).
Once that is done, go back to the Probe record and click Test probe under related links. Pick a MID server and an IP address to scan. Look at the input record and make sure you're getting the data you expect.
Next go to Discovery Definition > Sensors and create a new Sensor. I would again copy most of the fields from an existing OOB sensor. result.output is the payload your probe returns. Depending on the data I usually use something like this:
var lines = result.split('\n');
for ( var i = 0; i < lines.length; i++ ) {
// logic to parse each line
}
Something to be aware of, running 'Test probe' may not actually execute your sensor. Since it's a test, I don't think it write to the database. So if you're creating records they might not happen until you run a real discovery on the target device.
The last step is to make this probe run when you discover a device. Go to Discovery Definition > CI Classification > <device class, unix, Windows, SNMP, etc>. Pick the one you want (example: Windows 2012 Server). On the 'Triggers Probes' list, add your new probe. Then when your device is classified, it will run the new probe and sensor.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2017 01:46 PM
The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Discovery Probes and Sensors
Visit http://docs.servicenow.com for the latest product documentation