Discovery Performance Metrics tables are missing and Properties showing old version after upgrade, causing lots of DiscoveryPerformanceMetricsAggregator errors in syslogDescriptionAfter upgrade from Madrid to Paris/Quebec, the following tables (from Discovery Core plugin) are dropped and not added back:discovery_perf_metric_probe_sensordiscovery_perf_metric_probe_sensor_rollup_by_builddiscovery_perf_metric_probe_sensor_rollup_by_statusdiscovery_perf_metric_probe_sensor_rollup_by_target The data in these tables will be lost.The following Application Modules (from Discovery plugin) are not added back even with plugin install/repair:Probe/Sensor (Rollup-By-Build)Probe/Sensor (Rollup-By-Status)Probe/Sensor (Rollup-By-Target) The symptom is thousands of errors for DiscoveryPerformanceMetricsAggregator in syslog. If system property glide.discovery.perf.metrics.rollup_by_target=true, then each discovery.device.complete event will trigger the error.Steps to Reproduce Upgrade a Madrid instance with all the Discovery plugins to ParisEnable system property glide.discovery.perf.metrics.rollup_by_target=trueRun a discovery schedule Many Error syslog records for exceptions will be seen. The source of those can be seen in the app node logs, with "loadRow failure" errors similar to this: 2021-09-03 07:25:00 (342) worker.4 worker.4 txid=943bc5fe1b1a Starting: Aggregate Discovery Probe and Sensor Metrics by Target for Target IP Address 'No.9c3b01761bdef814a49720a6bb4bcbca, Trigger Type: Once, Priority: 100, Upgrade Safe: false, Repeat:"2021-09-03 07:25:00 (342) worker.4 worker.4 txid=943bc5fe1b1a Name: Aggregate Discovery Probe and Sensor Metrics by Target for Target IP Address 'NoJob Context:Script:SNC.DiscoveryPerformanceMetricsAggregator.rollupProbeAndSensorMetricsByTarget('No Source');""2021-09-03 07:25:00 (345) worker.4 worker.4 txid=943bc5fe1b1a SEVERE *** ERROR *** loadRow failurejava.lang.NullPointerException"2021-09-03 07:25:00 (346) worker.4 worker.4 txid=943bc5fe1b1a Couldn't decipher the stack trace resulting from the following JavaScriptException:"2021-09-03 07:25:00 (346) worker.4 worker.4 txid=943bc5fe1b1a SEVERE *** ERROR *** java.lang.NullPointerExceptionorg.mozilla.javascript.JavaScriptException: java.lang.NullPointerExceptionat org.mozilla.javascript.Context.makeJavaScriptException(Context.java:1935)at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1921)at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:143)at org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:670)at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:614)at org.mozilla.javascript.ScriptRuntime.doCall(ScriptRuntime.java:2609)at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1501)at script(sys_trigger.df5945f6db56b814dd6753cad396193d:1)at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:829)at org.mozilla.javascript.InterpretedFunction.lambda$call$0(InterpretedFunction.java:152)at org.mozilla.javascript.Context$ScriptCaller.call(Context.java:2939)at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:151)at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:563)at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3459)at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:164)at com.glide.script.ScriptEvaluator.execute(ScriptEvaluator.java:279)at com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:118)at com.glide.script.ScriptEvaluator.evaluateString(ScriptEvaluator.java:82)at com.glide.script.Evaluator.evaluatePossiblePrefixedString(Evaluator.java:210)at com.glide.job.RunScriptJob.evaluateScript(RunScriptJob.java:173)at com.glide.job.RunScriptJob.evaluateScript(RunScriptJob.java:155)at com.glide.job.RunScriptJob.execute(RunScriptJob.java:87)at com.glide.schedule.JobExecutor.lambda$executeJob$0(JobExecutor.java:113)at com.glide.schedule.JobExecutor.executeJob(JobExecutor.java:116)at com.glide.schedule.JobExecutor.execute(JobExecutor.java:100)at com.glide.schedule_v2.SchedulerWorkerThread.executeJob(SchedulerWorkerThread.java:300)at com.glide.schedule_v2.SchedulerWorkerThread.lambda$process$0(SchedulerWorkerThread.java:188)at com.glide.worker.TransactionalWorkerThread.executeInTransaction(TransactionalWorkerThread.java:35)at com.glide.schedule_v2.SchedulerWorkerThread.process(SchedulerWorkerThread.java:188)at com.glide.schedule_v2.SchedulerWorkerThread.run(SchedulerWorkerThread.java:102)""2021-09-03 07:25:00 (346) worker.4 worker.4 txid=943bc5fe1b1a SEVERE *** ERROR *** JavaScript evaluation error on:SNC.DiscoveryPerformanceMetricsAggregator.rollupProbeAndSensorMetricsByTarget('No Source');Root cause of JavaScriptException: java.lang.NullPointerExceptionjava.lang.NullPointerException"2021-09-03 07:25:00 (352) worker.4 worker.4 txid=943bc5fe1b1a Completed: Aggregate Discovery Probe and Sensor Metrics by Target for Target IP Address 'No in 0:00:00.004, next occurrence is null WorkaroundThis problem is currently under review. You can contact ServiceNow Technical Support or subscribe to this Known Error article by clicking the Subscribe button at the top right of this article to be notified when more information becomes available. To attempt to reinstall the tables, In System Applications - All, open Discovery Core (com.snc.discovery.core) plugin and click on "Activate/Repair", then "Repair". (Note: you must repair com.snc.discovery.core. Repairing com.snc.discovery won't create the tables.) To get the following Application Modules (from Discovery plugin) are not added back even with plugin install/repair please import the attached xml file - sys_app_module (GOTOtitleSTARTSWITHProbe_Sensor (Rollup).xml Probe/Sensor (Rollup-By-Build)Probe/Sensor (Rollup-By-Status)Probe/Sensor (Rollup-By-Target)Related Problem: PRB1519025