Using MID Server and getting No Sensors Defined

graemek
Kilo Contributor

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

5 REPLIES 5

Chris M3
Tera Guru

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.


graemek
Kilo Contributor

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


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.


can you explain this some more.   Are you talking about using the below screen shot from within the REST message?   The name being 'skip_sensor' value = true or are you talking about putting it down in the content of the message?:



find_real_file.png