Hi!
I made small changes to a couple of rules, changing severity from ALERT to WARN.
I tried to test these in the KDLab but got an error that does not seem to be in the scope of what I changed.
The code(with my JH suffix...)
package com.indeni.server.rules.library.templatebased.crossvendor.compliance
import com.indeni.server.rules.RuleContext
import com.indeni.server.rules.library.{ConditionalRemediationSteps, SingleSnapshotComplianceCheckTemplateRule}
import com.indeni.server.sensor.models.managementprocess.alerts.dto.AlertSeverity
case class crossvendor_compliance_check_core_dump_enabledJH(context: RuleContext) extends SingleSnapshotComplianceCheckTemplateRule(context,
ruleName = "crossvendor_compliance_check_core_dump_enabledJH",
ruleFriendlyName = "Compliance Check: Coredumping enablement does not match requirementJH",
ruleDescription = "Indeni can verify that coredumping is enabled, or not, on a specific device.",
metricName = "coredumping-enabled",
baseRemediationText = "Refer to the vendor's documentation on how to enable/disable core dumping.",
parameterName = "Should Core Dumping Be Enabled",
parameterDescription = "If this is set to on or ticked, indeni will alert when a device that supports core dumping does not have core dumping enabled.",
severity = AlertSeverity.WARN,
expectedValue = true
)(ConditionalRemediationSteps.VENDOR_CP -> "Follow SK53363.",
ConditionalRemediationSteps.VENDOR_CISCO -> "Use the \"coredump enable\" command.")
And the dump log:
! not found: type crossvendor
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal.throwIfErrors(ToolBoxFactory.scala:316)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal.wrapInPackageAndCompile(ToolBoxFactory.scala:198)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$ToolBoxGlobal.compile(ToolBoxFactory.scala:252)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$$anonfun$compile$2.apply(ToolBoxFactory.scala:429)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$$anonfun$compile$2.apply(ToolBoxFactory.scala:422)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.liftedTree2$1(ToolBoxFactory.scala:355)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl$withCompilerApi$.apply(ToolBoxFactory.scala:355)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl.compile(ToolBoxFactory.scala:422)
! at scala.tools.reflect.ToolBoxFactory$ToolBoxImpl.eval(ToolBoxFactory.scala:444)
! at com.indeni.server.rules.manager.factory.RuntimeRuleCompiler.compileAndGetRuleClass(RuntimeRuleCompiler.scala:107)
! at com.indeni.server.rules.manager.factory.RuntimeRuleCompiler.compileAndInstantiate(RuntimeRuleCompiler.scala:80)
! ... 17 common frames omitted
! Causing: com.indeni.server.rules.manager.factory.RuleCompilationException: Failed to compile rule. Code:
! import com.indeni.server.rules.RuleContext
! import com.indeni.server.rules.library.{ConditionalRemediationSteps, SingleSnapshotComplianceCheckTemplateRule}
! import com.indeni.server.sensor.models.managementprocess.alerts.dto.AlertSeverity
!
Is this something you have run in to
?