【RabbitMQ】12 日志监控 & 消息追踪https://www.cnblogs.com/mindzone/p/15388821.html
一、日志和监控
RabbitMQ日志存放目录
[root@localhost ~]# ll /var/log/rabbitmq/
总用量 176
-rw-r-----. 1 rabbitmq rabbitmq 177947 10月 10 10:21 rabbit@localhost.log
-rw-r-----. 1 rabbitmq rabbitmq 0 10月 6 11:35 rabbit@localhost_upgrade.log
[root@localhost ~]#
其中 rabbit@localhost.log 是默认日志
就是跑了视频的一些案例,查看下这个日志大小:
[root@localhost ~]# ll -h /var/log/rabbitmq/rabbit@localhost.log -rw-r-----. 1 rabbitmq rabbitmq 174K 10月 10 10:21 /var/log/rabbitmq/rabbit@localhost.log [root@localhost ~]#
查看日志:
[root@localhost ~]# cat /var/log/rabbitmq/rabbit@localhost.log
一部分日志信息:
2021-10-10 09:14:29.123085+08:00 [info] <0.1360.0> accepting AMQP connection <0.1360.0> (192.168.2.209:59929 -> 192.168.2.121:5672)
2021-10-10 09:14:29.158177+08:00 [info] <0.1360.0> Connection <0.1360.0> (192.168.2.209:59929 -> 192.168.2.121:5672) has a client-provided name: connectionFactory#1fe41ea:0
2021-10-10 09:14:29.162086+08:00 [info] <0.1360.0> connection <0.1360.0> (192.168.2.209:59929 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0): user 'test' authenticated and granted access to vhost '/dzz'
2021-10-10 09:14:29.208515+08:00 [erro] <0.1369.0> Channel error on connection <0.1360.0> (192.168.2.209:59929 -> 192.168.2.121:5672, vhost: '/dzz', user: 'test'), channel 1:
2021-10-10 09:14:29.208515+08:00 [erro] <0.1369.0> operation basic.publish caused a channel exception not_found: no exchange 'test-dlx-normal-exchange' in vhost '/dzz'
2021-10-10 09:14:29.226656+08:00 [info] <0.1360.0> closing AMQP connection <0.1360.0> (192.168.2.209:59929 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0, vhost: '/dzz', user: 'test')
2021-10-10 09:15:33.293469+08:00 [info] <0.1460.0> accepting AMQP connection <0.1460.0> (192.168.2.209:59974 -> 192.168.2.121:5672)
2021-10-10 09:15:33.325804+08:00 [info] <0.1460.0> Connection <0.1460.0> (192.168.2.209:59974 -> 192.168.2.121:5672) has a client-provided name: connectionFactory#1fe41ea:0
2021-10-10 09:15:33.330105+08:00 [info] <0.1460.0> connection <0.1460.0> (192.168.2.209:59974 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0): user 'test' authenticated and granted access to vhost '/dzz'
2021-10-10 09:15:33.383151+08:00 [info] <0.1460.0> closing AMQP connection <0.1460.0> (192.168.2.209:59974 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0, vhost: '/dzz', user: 'test')
2021-10-10 09:23:32.352291+08:00 [info] <0.3080.0> accepting AMQP connection <0.3080.0> (192.168.2.209:49457 -> 192.168.2.121:5672)
2021-10-10 09:23:32.390842+08:00 [info] <0.3080.0> Connection <0.3080.0> (192.168.2.209:49457 -> 192.168.2.121:5672) has a client-provided name: connectionFactory#1fe41ea:0
2021-10-10 09:23:32.396644+08:00 [info] <0.3080.0> connection <0.3080.0> (192.168.2.209:49457 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0): user 'test' authenticated and granted access to vhost '/dzz'
2021-10-10 09:23:32.472165+08:00 [info] <0.3080.0> closing AMQP connection <0.3080.0> (192.168.2.209:49457 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0, vhost: '/dzz', user: 'test')
2021-10-10 09:28:56.310092+08:00 [info] <0.4273.0> accepting AMQP connection <0.4273.0> (192.168.2.209:63817 -> 192.168.2.121:5672)
2021-10-10 09:28:56.344023+08:00 [info] <0.4273.0> Connection <0.4273.0> (192.168.2.209:63817 -> 192.168.2.121:5672) has a client-provided name: connectionFactory#1fe41ea:0
2021-10-10 09:28:56.349675+08:00 [info] <0.4273.0> connection <0.4273.0> (192.168.2.209:63817 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0): user 'test' authenticated and granted access to vhost '/dzz'
2021-10-10 09:28:56.402577+08:00 [info] <0.4273.0> closing AMQP connection <0.4273.0> (192.168.2.209:63817 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0, vhost: '/dzz', user: 'test')
2021-10-10 10:08:57.351330+08:00 [info] <0.6109.0> accepting AMQP connection <0.6109.0> (192.168.2.209:60038 -> 192.168.2.121:5672)
2021-10-10 10:08:57.386253+08:00 [info] <0.6109.0> Connection <0.6109.0> (192.168.2.209:60038 -> 192.168.2.121:5672) has a client-provided name: connectionFactory#1fe41ea:0
2021-10-10 10:08:57.390659+08:00 [info] <0.6109.0> connection <0.6109.0> (192.168.2.209:60038 -> 192.168.2.121:5672 - connectionFactory#1fe41ea:0):