rename shield audit indices to keep naming consistent

This change renames the shield audit indices to keep naming consistent with other plugins.
The name of the index uses '_' to separate words, a '-' to separate the prefix from the time
portion, and '.'s to separate the different portions of the date.

Closes elastic/elasticsearch#925

Original commit: elastic/x-pack-elasticsearch@8ca6856e4a
This commit is contained in:
jaymode 2015-06-18 15:53:51 -04:00
parent bf9a8024ca
commit d302b04256
3 changed files with 6 additions and 6 deletions

View File

@ -73,7 +73,7 @@ public class IndexAuditTrail extends AbstractComponent implements AuditTrail {
public static final TimeValue DEFAULT_FLUSH_INTERVAL = TimeValue.timeValueSeconds(1);
public static final IndexNameResolver.Rollover DEFAULT_ROLLOVER = IndexNameResolver.Rollover.DAILY;
public static final String NAME = "index";
public static final String INDEX_NAME_PREFIX = ".shield-audit-log";
public static final String INDEX_NAME_PREFIX = ".shield_audit_log";
public static final String DOC_TYPE = "event";
public static final String ROLLOVER_SETTING = "shield.audit.index.rollover";

View File

@ -12,10 +12,10 @@ import org.joda.time.format.DateTimeFormatter;
public class IndexNameResolver {
public enum Rollover {
HOURLY ("-yyyy-MM-dd-HH"),
DAILY ("-yyyy-MM-dd"),
WEEKLY ("-yyyy-w"),
MONTHLY ("-yyyy-MM");
HOURLY ("-yyyy.MM.dd.HH"),
DAILY ("-yyyy.MM.dd"),
WEEKLY ("-yyyy.w"),
MONTHLY ("-yyyy.MM");
private final DateTimeFormatter formatter;

View File

@ -1,5 +1,5 @@
{
"template": ".shield-audit-log*",
"template": ".shield_audit_log*",
"order": 2147483647,
"settings": {
"index.mapper.dynamic" : false