Zabbix Monitoring Message Queuing activemq

Source: Internet
Author: User

    1. The monitoring script is as follows: zabbix_monitor_amq.sh

#!/bin/sh# #Description:  get activemq dataip=192.168.0.139port=8161queuename=q.virtual.charge# Warn_queuename= "Dlq.q.virtual.charge" warn_queuename= "dlq.*" warn_pending= ' curl -uadmin:admin http://$ IP: $PORT/admin/queues.jsp | grep -a 5  "${warn_queuename}</a></td>" |awk  -F  ' < '   ' {print $2} ' |sed  ' s/td>//g ' |grep  ' ^[0-9] ' |head -1 ' pending= ' curl -uadmin:admin http://$IP: $PORT/admin/queues.jsp | grep -a 5  "${ Queuename}</a></td> "|awk -f  ' < '   ' {print $2} ' |sed  ' s/td>//g ' |grep   ' ^[0-9] ' |head -1 ' consumers= ' curl -uadmin:admin http://$IP: $PORT/admin/queues.jsp |  grep -A 5  "${queuename}</a></td>" |awk -f  ' < '   ' {print $ 2} ' |sed  ' s/td>//g ' |grep  ' ^[0-9] ' |head -2|tail -1 ' enqueued= ' curl -uadmin:admin  http://$IP: $PORT/admin/queues.jsp | grep -a 5  "${queuename}</a></td>" |awk -F  ' < '   ' { print $2} ' |sed  ' s/td>//g ' |grep  ' ^[0-9] ' |head -3|tail -1 ' Dequeued= ' curl - uadmin:admin http://$IP: $PORT/admin/queues.jsp | grep -a 5  "${QUEUENAME}</a ></td> "|awk -f  ' < '   ' {print $2} ' |sed  ' s/td>//g ' |grep  ' ^[0-9] ' |head  -3|tail -1 ' Case $1 in warn_pending| warn_pending)  echo  "$Warn _pending";;  pending|pending)  echo  "$Pending"  ;;  consumers|consumers)  echo  $Consumers  ;;  enqueued|enqueued)  echo  $Enqueued  ;;  dequeued|dequeued)  echo  $Dequeued  ;;  *)  echo  "Usage: $0 pending| consumers| enqueued| dequeued| Warn_pending "Esac

2. Edit zabbix_agentd.conf

#Monitor activemquserparameter=activemq.pending,/etc/zabbix/scripts/check_activemq.sh PendingUserParameter= Activemq.consumers,/etc/zabbix/scripts/check_activemq.sh consumersuserparameter=activemq.enqueued,/etc/zabbix/ Scripts/check_activemq.sh enqueueduserparameter=activemq.dequeued,/etc/zabbix/scripts/check_activemq.sh Dequeueduserparameter=activemq.warn_pending,/etc/zabbix/scripts/check_activemq.sh warn_pending

3. Write the item

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/80/23/wKiom1c5OAjBsX3HAAa7niyuysE321.jpg "title=" Amq.jpg "alt=" Wkiom1c5oajbsx3haaa7niyuyse321.jpg "/>

4. Or upload the Attachment monitor template

This article from the "Do not ask for the best, only better" blog, please be sure to keep this source http://yujianglei.blog.51cto.com/7215578/1773826

Zabbix Monitoring Message Queuing activemq

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.