Increase server information statistics for Zabbix (server brand, model, SN number, etc.)

Source: Internet
Author: User
Tags egrep

Recent re-statistics of some of the server's basic information, initially wanted to use the Excle form. But since Zabbix has the function of asset management, it is better to use this function directly.

Do as you say. Add the appropriate item for the server Agent

Userparameter=get.factory.info,echo "'/usr/sbin/dmidecode |egrep-a2 ' System information ' |egrep manufacturer|awk-f: ' { Print $NF} ' "Userparameter=get.product.info,echo" '/usr/sbin/dmidecode |egrep-a2 ' System information ' |egrep Product| Awk-f: ' {print $NF} ' ' "Userparameter=get.sn.info,echo" '/usr/sbin/dmidecode |egrep-a4 ' System information ' |egrep ' Serial number ' |awk-f: ' {print $NF} ' "Userparameter=get.num.physiclal.cpu.info,egrep ' physical ID '/proc/cpuinfo |sort |uniq-c|wc-luserparameter=get.num.processor.cpu.info,egrep ' processor '/proc/cpuinfo |wc-luserparameter= Get.model.cpu.info,egrep ' model name '/proc/cpuinfo |uniq|awk-f: ' {print $NF} '

Add the appropriate templates and items to the server side. (Download below)

Look at the above content, you can know the main statistics are the server's brand, model, SN number and the model of the CPU and so on. There's a little hole here, and that's the right thing to do dmidecode. Because Zabbix-agent executes the command is Zabbix user, so will certainly error. The error is as follows:

/dev/mem-operation not permitted
enable the Allowroot on the agent side (set allowroot=1)

You can then look at the effect:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/70/FD/wKiom1XCy9ixT_wmAAi9_2K7Ag4111.jpg "title=" Change.png "alt=" wkiom1xcy9ixt_wmaai9_2k7ag4111.jpg "/> Of course can also add a lot of, this online has a lot of articles, you can increase according to their own needs. Later check server brand, model, SN number is so.

This article from "Good Life, happy work!" "Blog, be sure to keep this provenance http://yjw1983.blog.51cto.com/265702/1682172

Increase server information statistics for Zabbix (server brand, model, SN number, etc.)

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.