Monitor a directory size with Zabbix

Source: Internet
Author: User

Recently, because of the JMS message accumulation caused APACHEMQ frequency failure (the message has not been consumed, causing its database to reach 1.2G,JMS at this time directly hanging off), it is depressed! I was just studying Zabbix. Since Zabbix is so powerful, can it monitor my directory size? After searching the internet for a long time, there was no result. At this time, think of this before the import of other templates, so decided to modify the template, changed to change the problem! But the idea is already there. So I have the article.
With the demand, you can start directly! For the convenience of memory, I will write detailed steps.

Requirements: To monitor/usr/local/activemq5.5/data/kahadb This directory, when this directory space reached 100M, immediately alarm!

This identity is identified when the data is sent by defining the appropriate key on the client side. When the server collects the data, it takes the key and puts it into the corresponding graph.

The first step: Modify the Client configuration file and add the following line!

# vim/etc/zabbix/zabbix_agentd.conf

Userparameter=disk.kahadb,/etc/zabbix/scripts/disk-kahadb

Step Two: Add the disk-kahadb script

# CAT/ETC/ZABBIX/SCRIPTS/DISK-KAHADB
#!/bin/bash

est= ' Sudo/usr/bin/du-m/usr/local/activemq5.5/data/kahadb/| Cut-f1 | Cut-d "M"-f1 '
Echo $est

Step three: Authorize this script

chmod 777/etc/zabbix/scripts/disk-kahadb

Restarting the Zabbix client

Server-side------------>
Fourth step, start the graphical operation

A, add a template group apachemq-kahadb, at this time you can also add a few hosts in!

B, after the addition of the finished.

C, the next step is to add applications,items,triggers three-step song!

D, add Iteams in applictions, please note the red

E, add Tigers

Added after success!

F, click on the graphs can add graphics

G, connect this template on a host!

H, Success! I don't write about Tigger, it's too much trouble.

Monitor a directory size with Zabbix

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.