The problem here is that the get_stats_cron_schedule() function in check_rabbitmq_queues splits the cron entry on 'root' [0], which is the user which is used to run the command here. In the provided traceback, the user is 'rabbitmq'. The charm has used the 'root' user since the 16.04 release of the charms so this charm must have some local modifications which break this.
A better option here would be to strip out the cron schedule by splitting the string and grabbing only the schedule pieces definition pieces (the first 5 entries).
The problem here is that the get_stats_ cron_schedule( ) function in check_rabbitmq_ queues splits the cron entry on 'root' [0], which is the user which is used to run the command here. In the provided traceback, the user is 'rabbitmq'. The charm has used the 'root' user since the 16.04 release of the charms so this charm must have some local modifications which break this.
A better option here would be to strip out the cron schedule by splitting the string and grabbing only the schedule pieces definition pieces (the first 5 entries).
[0] https:/ /github. com/openstack/ charm-rabbitmq- server/ blob/stable/ 21.04/files/ check_rabbitmq_ queues. py#L108