Greetings,
With the new Host Profiles going into 1.1, I started working to capture some of the information to populate the various fields. At first, I was doing this by hand, but I decided to let Zabbix do it for me. The three bits of data I was most concerned with were MAC Address (Zabbix should really support up to 4 BTW), Linux Distribution, and Linux Kernel Version. To that end, I created the following UserParameter checks that I thought I would share;
With the new Host Profiles going into 1.1, I started working to capture some of the information to populate the various fields. At first, I was doing this by hand, but I decided to let Zabbix do it for me. The three bits of data I was most concerned with were MAC Address (Zabbix should really support up to 4 BTW), Linux Distribution, and Linux Kernel Version. To that end, I created the following UserParameter checks that I thought I would share;
Code:
UserParameter=custom[oscheck],/usr/bin/head -n1 /etc/redhat-release
UserParameter=custom[kerncheck],/bin/uname -r
UserParameter=custom[macaddr0],/sbin/ifconfig eth0 | /usr/bin/head -n1 | awk '{print $5}'
UserParameter=custom[macaddr1],/sbin/ifconfig eth1 | /usr/bin/head -n1 | awk '{print $5}'
UserParameter=custom[macaddr2],/sbin/ifconfig eth2 | /usr/bin/head -n1 | awk '{print $5}'
UserParameter=custom[macaddr3],/sbin/ifconfig eth3 | /usr/bin/head -n1 | awk '{print $5}'
Comment