Generate monthly report from elastic index

Hi, I want to generate a monthly report from my elastic index
Currently, I have an index which contains time series data from July to now(Sep)

after September, I want to generate the summary report of July, Aug And Sep respectively.

The doc in index look like this,

{
"userName": "Martin",
"key": "213adadasdas2131",
"userID": "101",
"function_id": "99",
},

{
"userName": "Tom",
"key": "sadqewq12321",
"userID": "102",
"function_id": "49",
}

I want to know the total number of function id each user called in a month?
how many times each function has been called in each month?

I wonder to generate a monthly report like this, using Elastic watcher with custom aggreation query is the best way?