|
环境:centos6.7 | zabbix3.2.4 | hadoop2.6.0
主要监控进程:journalnode | namenode | zkfc | datanode
监控脚本:hadoop.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| #!/bin/bash
server=$1
case $server in
journalnode)
/etc/init.d/hadoop-hdfs-journalnode status >> /dev/null 2>&1
echo $?
;;
namenode)
/etc/init.d/hadoop-hdfs-namenode status >> /dev/null 2>&1
echo $?
;;
zkfc)
/etc/init.d/zookeeper-server status >> /dev/null 2>&1
echo $?
;;
datanode)
/etc/init.d/hadoop-hdfs-datanode status >> /dev/null 2>&1
echo $?
;;
esac
|
zabbix客户端增加配置文件
1
| /usr/local/zabbix/etc/zabbix_agentd.conf.d/hadoop.conf
|
1
| UserParameter=hadoop.server,/usr/local/sbin/zabbix/hadoop.sh $1
|
添加hadoop.sh可执行权限和zabbix用户组
zabbix WEB页面配置主机
添加监控项
映射值添加
触发器添加
|
|
|
|
|
|
|