If you're having the problem with default Elasticsearch index template/mapping which converts the fields in the report index to a different type and causing errors.
Example: message: '[illegal_argument_exception] Expected numeric type on field [triggerDate], but got [keyword]',
Here's how you can find the Elasticsearch index template for the indexes so you can import.
Troubleshooting
CASE 1
If you have problem in viewing report history and If you have disabled Automatic index creation in Elasticsearch
To resolve this issue allow the conditional auto creation of the index for Skedler Reports History index as shown below,
curl -XPUT "<elasticsearch-url>:<port>/_cluster/settings" -H 'Content-Type: application/json' -d'
{
"persistent" : {
"action.auto_create_index": "+.skedler_reporthistory*"
}
}'
CASE 2
1. Run the following curl command in your terminal and double check the mapping details output.
curl <elasticsearch-url>:<port>/.skedlerreport_reporthistory*/_mapping
2. You can also use Kibana dev tool to obtain the mapping details by using the following command
GET .skedler_reporthistory*/_mapping
3. Now check the mapping templates and identify the field which is inheriting the default index mapping settings.
4. After identifying the inheriting field run the following curl command template in the terminal.
Note: ${skedler_index}_history is configured in reporting.yml
curl -X PUT "http://localhost:9200/_template/reporttemplate" -H 'Content-Type:application/json' -d '{
"index_patterns": ["${skedler_index}_reporthistory*"],
"mappings": {
"reportdata": {
"properties": {
"cron": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"csvError": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"data": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"email_error": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"email_status": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"excelError": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"format": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"fromTime": {
"type": "date"
},
"generate_status": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"notificationDetails": {
"properties": {
"bcc": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"cc": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"message": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"subject": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"to": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"type": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"warningMail": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
"pathValue": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"pdfError": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"recipients": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"reportGenerationStatus": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"reportId": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"reportname": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"slack_error": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"slack_status": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"source": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"toTime": {
"type": "date"
},
"triggerDate": {
"type": "date"
},
"username": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
'
This solves the index mapping issue.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article