Discovery - Evaluating the sensor error messageDescription<!-- div.margin{ padding: 10px 40px 40px 30px; } table.tocTable{ border: 1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); padding-top: .6em; padding-bottom: .6em; padding-left: .9em; padding-right: .6em; } table.noteTable{ border:1px solid; border-color:#E0E0E0; background-color: rgb(245, 245, 245); width: 100%; border-spacing:2; } table.internaltable { white-space:nowrap; text-align:left; border-width: 1px; border-collapse: collapse; font-size:14px; width: 85%; } table.internaltable th { border-width: 1px; padding: 5px; border-style: solid; border-color: rgb(245, 245, 245); background-color: rgb(245, 245, 245); } table.internaltable td { border-width: 1px; padding: 5px; border-style: solid; border-color: #E0E0E0; color: #000000; } .title { color: #D1232B; font-weight:normal; font-size:28px; } h1{ color: #D1232B; font-weight:normal; font-size:21px; margin-bottom:-5px } h2{ color: #646464; font-weight:bold; font-size:18px; } h3{ color: #000000; font-weight:BOLD; font-size:16px; text-decoration:underline; } h4{ color: #646464; font-weight:BOLD; font-size:15px; text-decoration:; } h5{ color: #000000; font-weight:BOLD; font-size:13px; text-decoration:; } h6{ color: #000000; font-weight:BOLD; font-size:14px; text-decoration:; } --> Evaluating the sensor error message Overview The Sensor error message occurs when the sensor cannot process the data that is sent back by the probe. Different versions of the sensor error message indicate different processing errors. Types of sensor error messages The type of sensor error message is related to one of the error constructors in JavaScript. The following error constructors may contribute to the sensor error message. Error: The generic constructor that indicates the sensor can not process the data.EvalError: Indicates that an error has occurred in the global eval() function.InternalError: Indicates that an internal error in the Javascript engine has occurred, such as for too much recursion.RangeError: Indicates that a numeric variable or parameter is outside of its valid range in the sensor.ReferenceError: Indicates an error occurs when the sensor processing attempts to dereference a variable that has not been declared.SyntaxError: Indicates a syntax error in the sensor.TypeError: Indicates that an operand or argument that is passed to a sensor function is incompatible with the type expected by that operator or function.URIError: Indicates that encodeURI() or decodeURI() are passed invalid parameters in the sensor. Finding the cause of the sensor error message To find the cause of this error, you identify the following: The errorThe name of the sensor where the error occurredThe datestamp of the errorThe associated stack trace of the error To identify the error, the name of the sensor, and the datestamp of the error: Navigate to Discovery > Discovery LogTo find the error, filter on the Level name of Error. You can also view the error and the datestamp in the Error Gauge on the Discovery dashboard. Note the Created field of the error record. This timestamp is used to find the proper stack trace. Note the Short Message field of the error record This field shows the name of the sensor where the error has occurred. In the following example, a generic sensor error occurred at in the SMI – Fiber Channel Switch sensor at 4:03 on 10-24-2014. In the following example, a sensor TypeError occurred in the Windows – Installed Software sensor. To find the stack trace: Navigate to System Logs > Errors.Search for the date and time that matches the value in the 'Created field of the error record in the discovery log.The Message field of that entry contains the full stack trace of the error. The stack trace contains the error message, the sys_id of the script, and the line number where the error occurred. In the following example, the stack trace shows the following: Line 1 and 2: There was a JavaScript evaluation error on new DiscoverySmiFcSwitchSensor().Line 3: The Ci.controller variable is undefined.Line 4: This script_includes line indicates the sysid 7780111 ... d768 and the error occurred at approximately line 26 of the JavaScript file. After you have determined these details, you can fix the JavaScript file. Fixing the sensor error message To fix the Sensor Error Message, you must fix the JavaScript file that contains the code that generated the error. To fix the JavaScript file: Navigate to the module in Discovery that the error occurred. In the example, you navigate to Discovery Definition > Script Includes. Fix the error. In the example, you search for DiscoverySmiFcSwitchSensor in the Name field. Click on the link to go to the details page for that Script Include.Modify the JavaScript script on that page to fix the error indicated.Click Update.