The Call for Presentations (CfP) for OpenSearchCon Europe is now open—go here to learn more and propose your ideas. We’ll close the CfP on March 25, so be sure to submit your proposals by this date.
Join us May 6 and 7 at Cafe Moskau in Berlin for OpenSearchCon Europe 2024. You can reserve your seat here: Register Now.
Describe the issue:
When I set a high value for my trigger threshold opensearch throws a java error.
Configuration:
Screenshot 2024-04-09 at 11.21.03 AM
Screenshot 2024-04-09 at 11.21.03 AM
3188×1504 230 KB
Relevant Logs or Screenshots:
[2024-04-09T11:12:05,321][INFO ][o.o.a.MonitorRunnerService] [Billys-Box] Executing scheduled monitor - id: nA5Bw44BmRcx_dzGXyrP, type: QUERY_LEVEL_MONITOR, periodStart: 2024-04-09T14:57:05.293Z, periodEnd: 2024-04-09T15:12:05.293Z, dryrun: false, executionId: nA5Bw44BmRcx_dzGXyrP_2024-04-09T15:12:05.320981549_6bafc633-cf2f-4e2e-965d-051a07251e7c
[2024-04-09T11:12:05,341][INFO ][o.o.a.TriggerService ] [Billys-Box] Error running script for monitor nA5Bw44BmRcx_dzGXyrP, trigger: mg5Bw44BmRcx_dzGXyrN
org.opensearch.script.ScriptException: compile error
at org.opensearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:553) ~[?:?]
at org.opensearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:464) ~[?:?]
at org.opensearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:154) ~[?:?]
at org.opensearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:125) ~[opensearch-2.13.0.jar:2.13.0]
at org.opensearch.common.cache.Cache.compute(Cache.java:470) ~[opensearch-2.13.0.jar:2.13.0]
at org.opensearch.common.cache.Cache.computeIfAbsent(Cache.java:427) ~[opensearch-2.13.0.jar:2.13.0]
at org.opensearch.script.ScriptCache.compile(ScriptCache.java:109) ~[opensearch-2.13.0.jar:2.13.0]
at org.opensearch.script.ScriptService.compile(ScriptService.java:498) ~[opensearch-2.13.0.jar:2.13.0]
at org.opensearch.alerting.TriggerService.runQueryLevelTrigger(TriggerService.kt:75) [opensearch-alerting-2.13.0.0.jar:2.13.0.0]
at org.opensearch.alerting.QueryLevelMonitorRunner.runMonitor(QueryLevelMonitorRunner.kt:71) [opensearch-alerting-2.13.0.0.jar:2.13.0.0]
at org.opensearch.alerting.QueryLevelMonitorRunner$runMonitor$1.invokeSuspend(QueryLevelMonitorRunner.kt) [opensearch-alerting-2.13.0.0.jar:2.13.0.0]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.21.jar:1.8.21-release-380(1.8.21)]
at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:46) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.internal.ScopeCoroutine.onCompletionInternal$kotlinx_coroutines_core(Scopes.kt:28) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:264) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:762) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [kotlin-stdlib-1.8.21.jar:1.8.21-release-380(1.8.21)]
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?]
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?]
Caused by: java.lang.IllegalArgumentException: Invalid int constant [4000000000]. If you want a long constant then change it to [4000000000L].
at org.opensearch.painless.PainlessScript$Script.compile(return ctx.results[0].aggregations.metric.value == null ? false : ctx.results[0].aggregations.metric.value > 4000000000:110) ~[?:?]
at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitNumeric(DefaultSemanticAnalysisPhase.java:2128) ~[?:?]
at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitNumeric(DefaultSemanticAnalysisPhase.java:174) ~[?:?]
at org.opensearch.painless.node.ENumeric.visit(ENumeric.java:65) ~[?:?]
at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.checkedVisit(DefaultSemanticAnalysisPhase.java:209) ~[?:?]
at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitComp(DefaultSemanticAnalysisPhase.java:1408) ~[?:?]
When I define a larger integer to monitor and trigger on I see the following error in the log and the UI says error for the monitor as well.
rigger with high integers OpenSearch troubleshoot
profile, messages, bookmarks and preferences OSC_Berlin_BlogBanner-01
Come join the OpenSearch community May 6 and 7 in Berlin!
Read the full announcement here.
The Call for Presentations (CfP) for OpenSearchCon Europe is now open—go here to learn more and propose your ideas. We’ll close the CfP on March 25, so be sure to submit your proposals by this date.
Join us May 6 and 7 at Cafe Moskau in Berlin for OpenSearchCon Europe 2024. You can reserve your seat here: Register Now.
Error with monitors that use a trigger with high integers OpenSearch troubleshoot Apr 9 4h
egraham 21h Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.13
Describe the issue: When I set a high value for my trigger threshold opensearch throws a java error.
Configuration:
Screenshot 2024-04-09 at 11.21.03 AM Screenshot 2024-04-09 at 11.21.03 AM 3188×1504 230 KB Relevant Logs or Screenshots:
[2024-04-09T11:12:05,321][INFO ][o.o.a.MonitorRunnerService] [Billys-Box] Executing scheduled monitor - id: nA5Bw44BmRcx_dzGXyrP, type: QUERY_LEVEL_MONITOR, periodStart: 2024-04-09T14:57:05.293Z, periodEnd: 2024-04-09T15:12:05.293Z, dryrun: false, executionId: nA5Bw44BmRcx_dzGXyrP_2024-04-09T15:12:05.320981549_6bafc633-cf2f-4e2e-965d-051a07251e7c [2024-04-09T11:12:05,341][INFO ][o.o.a.TriggerService ] [Billys-Box] Error running script for monitor nA5Bw44BmRcx_dzGXyrP, trigger: mg5Bw44BmRcx_dzGXyrN org.opensearch.script.ScriptException: compile error at org.opensearch.painless.PainlessScriptEngine.convertToScriptException(PainlessScriptEngine.java:553) ~[?:?] at org.opensearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:464) ~[?:?] at org.opensearch.painless.PainlessScriptEngine.compile(PainlessScriptEngine.java:154) ~[?:?] at org.opensearch.script.ScriptCache.lambda$compile$0(ScriptCache.java:125) ~[opensearch-2.13.0.jar:2.13.0] at org.opensearch.common.cache.Cache.compute(Cache.java:470) ~[opensearch-2.13.0.jar:2.13.0] at org.opensearch.common.cache.Cache.computeIfAbsent(Cache.java:427) ~[opensearch-2.13.0.jar:2.13.0] at org.opensearch.script.ScriptCache.compile(ScriptCache.java:109) ~[opensearch-2.13.0.jar:2.13.0] at org.opensearch.script.ScriptService.compile(ScriptService.java:498) ~[opensearch-2.13.0.jar:2.13.0] at org.opensearch.alerting.TriggerService.runQueryLevelTrigger(TriggerService.kt:75) [opensearch-alerting-2.13.0.0.jar:2.13.0.0] at org.opensearch.alerting.QueryLevelMonitorRunner.runMonitor(QueryLevelMonitorRunner.kt:71) [opensearch-alerting-2.13.0.0.jar:2.13.0.0] at org.opensearch.alerting.QueryLevelMonitorRunner$runMonitor$1.invokeSuspend(QueryLevelMonitorRunner.kt) [opensearch-alerting-2.13.0.0.jar:2.13.0.0] at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) [kotlin-stdlib-1.8.21.jar:1.8.21-release-380(1.8.21)] at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:46) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.internal.ScopeCoroutine.onCompletionInternal$kotlinx_coroutines_core(Scopes.kt:28) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:305) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.JobSupport.tryFinalizeSimpleState(JobSupport.kt:264) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:762) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:117) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46) [kotlin-stdlib-1.8.21.jar:1.8.21-release-380(1.8.21)] at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:233) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60) [kotlinx-coroutines-core-1.1.1.jar:?] at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742) [kotlinx-coroutines-core-1.1.1.jar:?] Caused by: java.lang.IllegalArgumentException: Invalid int constant [4000000000]. If you want a long constant then change it to [4000000000L]. at org.opensearch.painless.PainlessScript$Script.compile(return ctx.results[0].aggregations.metric.value == null ? false : ctx.results[0].aggregations.metric.value > 4000000000:110) ~[?:?] at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitNumeric(DefaultSemanticAnalysisPhase.java:2128) ~[?:?] at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitNumeric(DefaultSemanticAnalysisPhase.java:174) ~[?:?] at org.opensearch.painless.node.ENumeric.visit(ENumeric.java:65) ~[?:?] at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.checkedVisit(DefaultSemanticAnalysisPhase.java:209) ~[?:?] at org.opensearch.painless.phase.DefaultSemanticAnalysisPhase.visitComp(DefaultSemanticAnalysisPhase.java:1408) ~[?:?]