Why does "cli>queue reload all" reset queue stats?

When I execute “queue reload all” I’m loosing the Queue Stats that I can see with "queue show ".

Documentation on “queue reload all” says:
" ‘all’ - reload queue rules, parameters, and members "
…but no stats.

Looking into the code I found that executing queue reload all includes these lines:

9163    if (ast_test_flag(mask, QUEUE_RESET_STATS)) {
9164       res |= clear_stats(queuename);

Is this intended?

We already have a queue reset stats. Why do stats get reset in this point? I think that “reload” should only affect configurations, and not stats.

reset stats is newer than queue reload, and is, basically, a lighter way of doing the reset.

I’ve been reading and, if I got it right, there was this scenario:

  • No “queue reset stats”. There was an option “keepstats=yes/no” on queue.conf, which sets if stats were going to be reset by reload.

But then, the option “keepstats” was removed because 1) New queue reset command and 2) Reload won’t reset stats. But the thing is, it does reset stats.

BTW, I’m using “queue reload all” because I found that after one reload, the next one won’t work if queues file hasn’t change. For example, I add one member to Queue1 and change policy on Queue2 and perform “queue reload members Queue1” and “queue reload parameters Queue2”, only first reload applies. I think this is caused by the use of the flag “CONFIG_FLAG_FILEUNCHANGED” on reload_queues(int reload, stuct ast_flags* mask const char* queuename), app_queue.c

1 Like

have you found some working solution for this? i really need that asterisk do not reload the stats of the queues because i want to reset the stats every day after saving it to the DB

Did u find a solution for this ?

I’m also experiencing the same problem.


I found a solution.
On Asterisk 13 instead of doing Queue reload all i did:

config reload /etc/asterisk/queues.conf
And now when i do that, the new queues created are appearing for me…
And the stats aren’t resetting !