Discovery Pattern Error: does formatting matter in the pattern text?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-22-2023 08:08 AM
I am trying to troubleshoot a persistent error with regards to our discovery process.
Failed Exploring CI Pattern, Pattern name: {product name redacted}
2023-12-21 22:06:55: Identification Engine: Discovery status is FAILURE, Identification sections in pattern failed: section: Identification, error: null java.lang.ClassCastException
In this particular pattern, this is what I am noticing:
operation {
set_field {
field_name = "name"
value = get_attr {"cluster_nodes[].lnn"}
}
set_field {
field_name = "cluster"
value = get_attr {"cluster_nodes[].cluster_name"}
}
set_field {
field_name = "operational_status"
value = eval {"javascript: var rtrn = '';
var currentNodeStatus = ${cluster_nodes[].operational_status};
currentNodeStatus = currentNodeStatus.toLowerCase();
if(currentNodeStatus == 'true'){
rtrn = \"1\";
}
else {
rtrn = \"2\";
}"} // This is where I think the problem is.
}
set_field {
field_name = "server"
value = get_attr {"cluster_nodes[].lnn"}
}
}
I wrote a comment where I believe the problem is. When testing the pattern against a formatter, I notice that while the line technically is correct, the formatter seems to have an issue with the quotation mark on the same line.
Wondering if this is triggering the java.lang.ClassCastException error that I am getting.
0 REPLIES 0