Tim,
I've determined that the proper config should be that, given your mappings, to use queue.raw
and qmgr.raw
as the fields to use for by_field_name
, partition_field_name
, and influencers - because those fields are of type keyword
.
Additionally, if you're still having problems, check the "use dedicated index" option as this also prevents a situation where other jobs have defined fields in the .ml-anomalies-shared
results index having competing mapping types.
The JSON below both uses the .raw
version of the field and specifies the dedicated results index for the job.
{
"job_id": "mqgw_queue_stats",
"job_type": "anomaly_detector",
"description": "IBM MQ All queue stats",
"analysis_config": {
"bucket_span": "5m",
"detectors": [
{
"detector_description": "mean(curdepth) (ibmmq_all_queues_stats)",
"function": "mean",
"field_name": "curdepth",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
},
{
"detector_description": "mean(dequeue) (ibmmq_all_queues_stats)",
"function": "mean",
"field_name": "dequeue",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
},
{
"detector_description": "mean(enqueue) (ibmmq_all_queues_stats)",
"function": "mean",
"field_name": "enqueue",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
},
{
"detector_description": "mean(ipprocs) (ibmmq_all_queues_stats)",
"function": "mean",
"field_name": "ipprocs",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
},
{
"detector_description": "mean(opprocs) (ibmmq_all_queues_stats)",
"function": "mean",
"field_name": "opprocs",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
},
{
"detector_description": "mean(uncommit)",
"function": "mean",
"field_name": "uncommit",
"partition_field_name": "qmgr.raw",
"detector_rules": [],
"by_field_name": "queue.raw"
}
],
"influencers": [
"qmgr.raw",
"queue.raw"
]
},
"data_description": {
"time_field": "@timestamp"
},
"model_snapshot_retention_days": 1,
"results_index_name": "custom-mqgw_queue_stats",
"datafeed_config": {
"query_delay": "60s",
"frequency": "150s",
"indexes": [
"logstash-mq-*"
],
"types": [
"mq-queue-stats"
],
"query": {
"match_all": {
"boost": 1
}
},
"scroll_size": 1000,
"chunking_config": {
"mode": "auto"
}
}
}