We moved this page to our Documentation Portal. You can find the latest updates here. |
Question
How to use a command-line tool for monitoring RabbitMQ server?
Answer
To use a command-line tool for monitoring RabbitMQ server:
-
Run the special service:
service onapp-mq-trace status / start / stop / restart / log
Where:
- status - show the running service status
- start / stop - start or stop
- restart - stop (if stopped) and start again
- log - show log of tracer in tail -f mode(the service must be running)
-
/onapp/utilities/mq-tracer/trace.log file will be truncated every time during service start .
Before starting to use this service, set up connection credentials for RabbitMQ in /onapp/utilities/mq-tracer/config.yml (copy from /onapp/interface/config/on_app.yml) :
rabbitmq_login: guest rabbitmq_password: guest rabbitmq_vhost: "/" rabbitmq_host: 127.0.0.1 rabbitmq_port: 5662 log_verbosity_level: 2
Where:
log_verbosity_level - can be 1(minimal), 2(most informative) or 3(debug)
1 - message body
2 - body + properties
3 - body + properties + delivery_infoYou can find log files in /onapp/utilities/mq-tracer/ :
trace.log - the trace log (same info that service onapp-mq-trace log gives)
util.log - error logs of the tool itselfThe following step is no longer needed if you have the 4.2.0-127 (or higher) OnApp update installed. -
If RabbitMQ server runs on a separate host, enable debug mode on it manually using the following command in that host:
rabbitmqctl trace_on