Creating dynamic rollup indexes

Hi Team,

I am working on rollup indices for the first time and don't have much idea about its capabilities.

I want to rollup my data every month and can have all the visualization/scripts/dashboards in the current indices.

Is there way to automatically create an monthly index like below and also i want at-least last week data in current index at any point of time

I am getting error which executing rollup indice creation
"index_pattern": "logstash-*",
"rollup_index": "logstasgh-hourly-%{+YYYY.MM.dd}",

Error : Invalid index name [logstasgh-hourly-%{+YYYY.MM.dd}], must be lowercase"

Can you post your rollup job please?

@warkolm : I am using below request

PUT _rollup/job/java_rollup
{
  "id": "java_rollup",
  "index_pattern": "java_visualization",
  "rollup_index": "java_rollup_visua",
  "cron": "0 0 0 1 * ?",
  "page_size": "1000000",
  "groups": {
    "date_histogram": {
      "interval": "20m",
      "delay": "1w",
      "time_zone": "UTC",
      "field": "@timestamp"
    },
    "terms": {
      "fields": [
        "APPLNAME.keyword",
        "CIRCLE_NUM.keyword",
        "SERVICE_NAME.keyword"
      ]
    }
  }
}

Where is that error from?