Using MID Server and getting No Sensors Defined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 11:32 AM
Hi folks,
We have a scoped application that requires us to send a REST Message to an appliance in our network that will return a resource queried for in XML that we will then parse. This is driven by a business rule. It's not a Discovery task per-se.
We are using RestMessageV2 on Geneva to achieve this and we are executing our appliance REST APIs on the end point.
Often times we are receiving a no sensors defined error back from the response in the form of an error.
I'm not sure what Probe and Sensor the REST Message V2 uses by default.
We are using the exact examples of how to execute a REST message through the MID Server as per the ServiceNow documentation (hence I have not yet provided any code for you to view).
It doesn't seem to make sense to me as we are using what the platform has given us with no extra programming or magic on our side.
Any ideas why this behavior would be exhibited?
Best regards and thanks in advance, GraemeK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 12:08 PM
This is similiar to an issue we had with Rest via midserver after Geneva, but our issue reported version mismatches.
There was a sensor in our instance that was orphaned, so the sensors reacts to 'null' (Which it seems to be searching for because it's not discovery), and the version on the sensor being 1, probe being null mismatched. Our fix was to clear out the version #'s on the sensor (was not ready to delete the orphaned sensor record)
In your case, crazy thought. Create a blank sensor record, and do the same thing, clear out version fields(note, you will have to modify the XML directly, and then import the record)
Yes, it makes no sense that for a non-discovery related item it is trying to check probe/sensor versions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2016 12:30 PM
Hey Chris,
Thanks for your reply. Interestingly enough I found a single mention by another guy related to SOAP calls and getting the same problem. I thought I would try his recommendation - no idea why, but this got rid of the problem entirely:
restMessage.setEccParameter('skip_sensor', true);
Best regards, GraemeK

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2016 01:00 PM
You can also add the parameter to the REST Parameters "skip_sensor" and set the value to true. This stops you from having to add it to every script calling that REST message.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2017 09:03 AM