Testing a new Probe and parsing the results for Discovery Storage
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 04:38 AM
Hi everyone, I need to discover some IBM SVC (I'm reading this doc Storage Discovery via SMI-S and CIM) and I've created some probes since the OOTB CIM probes won't work, with these parameters:
Class = Probe, ECC queue topic = sshcommand, ECC queue name = lsvdisk (an example of command I need) and allow_unsupported_shells is setted as true in probe parameters.
If I run the Test Probe I can see in the ECC queue that the response is positive, I can access the machine in question, but if I run Discover Now I get these errors:
Sensor error when processing [probe name]: No sensors defined
As I can read in this doc Create or modify a probe the post processing script can be used as
"Define an optional post-processing script that runs on the MID Server. The script accepts probe results as an input and outputs a JSON string that is sent back to the instance for a sensor to use as input. Use this type of script to accomplish tasks like parsing data."
So I don't need to create a sensor for my custom probes? How can I parse the ecc queue data into table records?
I hope my request is clear and without misunderstandings

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 11:43 AM
Hey,
Post-processor is different to a sensor. Your probe is currently missing a sensor (related list on the probe) so SN doesn't know what to do with the returned data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 11:57 AM
I've created a new custom sensor and wrote a code in the script but it enters in a loop and never stops so if don't cancel the discovery it will continue adding the same records in the table again and again
new DiscoverySensor({
output = output.replace(/\(Shell is not in supported shell list\)/g, "").trim();
var rows = output.match(/\d+ [^\n]+/g);}
// Loop su ogni riga estratta
rows.forEach(function(row) {
var values = row.trim().split(/\s+/);
var gr = new GlideRecord(cmdb_ci_storage_node);
gr.initialize();
gr.setValue("name", values[1]);
gr.insert();
});},
type: "DiscoverySensor"
});

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:26 PM
You need to wrap your logic in a process function which SN then calls
new DiscoverySensor({
process: function(sensorResult){
var commandResult = sensorResult['@result'];
//do work here
},
type: "DiscoverySensor"
});
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2025 12:31 PM - edited 03-10-2025 12:31 PM
I suppose I lost it in the copy and paste, sorry
new DiscoverySensor({
process: function(result) {
var output = result.output.trim();
output = output.replace(/\(Shell is not in supported shell list\)/g, "").trim();
var rows = output.match(/\d+ [^\n]+/g);
rows.forEach(function(row) {
var values = row.trim().split(/\s+/);
var gr = new GlideRecord('cmdb_ci_storage_node');
gr.initialize();
gr.setValue("name", values[1]);
gr.insert();
});
},
type: "DiscoverySensor"
});