Questions about Zabbix custom monitoring items, insufficient user rights

Source: Internet
Author: User
Tags rabbitmq

Zabbix needs to be customized to add RABBITMQ monitoring to respond to RABBITMQ problems in a timely manner, so a zabbix_agented.conf is added

#UserParameter =rabbitmq,rabbitmqctl status &>/dev/null && echo ' 0 ' | | Echo ' 1 '

Then restart the agent test

#/usr/local/zabbix/sbin/zabbix_agentd-t RABBITMQ

Show results as

RABBITMQ [T|0]

However in the server break test

#./zabbix_get-s "IP"-K RABBITMQ

The resulting return value is

1

The results of the agent-side and server-side tests are different.

After analysis, the server side in obtaining the agent return value, using the Zabbix user, and the rabbitmqctl command only root and RABBITMQ user can execute, so, regardless of how the server side gets the value is "1". Therefore, the other Zabbix user can execute the command to monitor, then the agent side and server side test results are normal.

Conclusion: In the future, when adding custom monitoring items to Zabbix, whether you add a command directly or add a script, it is important to note that all commands Zabbix the user must have execute permissions.


This article is from the "Bole Lemon" blog, please be sure to keep this source http://bolemon.blog.51cto.com/10275874/1834298

Questions about Zabbix custom monitoring items, insufficient user rights

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.