http://localhost:9200/_cat/indices/.kibana*?v=true&s=index
And delete kibana related indexes one by one
curl -XDELETE http://localhost:9200/.kibana_8.7.1_001
And resart kibana server
http://localhost:9200/_cat/indices/.kibana*?v=true&s=index
And delete kibana related indexes one by one
curl -XDELETE http://localhost:9200/.kibana_8.7.1_001
And resart kibana server
journalctl -u <service_name> [-e] [-f]
-f
specifies that you'd like to follow the log as it changes
Question 1
Javascript function indexOf
returns -1 if there is no match in the string, not a falsy value. The following code can resolve the issue.
function validateString(str) {
if (str.toLowerCase().indexOf('superman') === -1) {
throw new Error('String does not contain superman');
}
}