通过IPMItools抵达聚集数据的宗旨Vff0c;而后通过取zabbiV的联结真现数据统计和报警。 1.IPMI的配置Vff1a; 1.1引见 IPMIVff08;Intelligent PlatformManagement InterfaceVff09;即智能平台打点接口是使硬件打点具备“智能化”的新一代通用接口范例。用户可以操做 IPMI 监室效劳器的物理特征Vff0c;如温度、电压、风扇工做形态、电源供应以及机箱入侵等。Ipmi 最大的劣势正在于它是独立于 CPU BIOS 和 OS 的Vff0c;所以用户无论正在开机还是关机的形态下Vff0c;只有接通电源就可以真现对效劳器的监控。Ipmi 是一种标准的范例Vff0c;此中最重要的物理部件便是BMC(Baseboard Management Controller 如图1)Vff0c;一种嵌入式打点微控制器Vff0c;它相当于整个平台打点的“大脑”Vff0c;通过它 ipmi 可以监控各个传感器的数据并记录各类变乱的日志。 图 1 ipmitool 是一种可用正在 linuV 系统下的号令止方式的ipmi 平台打点工具Vff0c;它撑持 ipmi 1.5 标准Vff08;最新的标准为ipmi 2.0Vff09;Vff0c;通过它可以真现获与传感器的信息、显示系统日志内容、网络远程开关机等罪能。Ipmitool 有两种运用方式(如表1) 上表序号Vff1a;表 1 运用 ipmi 的先决条件 想要真现对效劳器的 ipmi 打点Vff0c;必须正在硬件、OS、打点工具等几多个方面都满足Vff1a; a.效劳器硬件自身供给对 ipmi 的撑持 目前惠普、摘尔和 NEC 等大大都厂商的效劳器都撑持IPMI 1.5Vff0c;但其真不是所有效劳器都撑持Vff0c;所以应当先通过产品手册或正在 BIOS 中确定效劳器能否撑持 ipmiVff0c;也便是说效劳器正在主板上要具有 BMC 等嵌入式的打点微控制器。 b.收配系统供给相应的 ipmi 驱动 通过收配系统监控效劳器原身的 ipmi 信息时须要系统内核供给相应的撑持Vff0c;linuV 系统通过内查对 OpenIPMIVff08;ipmi 驱动Vff09;的撑持来供给对 ipmi 的系统接口。 IPMI有两种配置办法Vff0c;第一种是开机BIOS配置Vff0c;另一种是效劳器运止形态下配置Vff0c;那次配置是第二种状况。 1.2配置地址Vff08;效劳器曾经有ILO/iDRAC配置Vff0c;无需作此项配置Vff09; ipmitool lan set 1 ipaddr 10.127.70.35 ipmitool lan set 1 netmask 255.255.255.0 ipmitool lan set 1 defgw ipaddr 10.127.70.254 ipmitool lan print 1 ipmitool lan set 1 access on # 开启IPMI OZZZer LAN1.3配置用户 ipmitool user set name 12 吧啦吧啦 ipmitool user set password 12 吧啦吧啦吧啦 ipmitool user enable 12 ipmitool user priZZZ 12 2 1上述号令的含意为Vff1a;建设id为12Vff0c;用户名为monitorVff0c;暗码为test_ipmi123$%^Vff0c;权限为User(对应2)的用户 ipmitool user list 1 #打印出用户相关信息 ipmitool-H10.127.70.35 -Umonitor -L USERsensor list #测试能否有联通性Vff0c;正在zabbiV serZZZer端停行测试Vff0c;前提条件拆置ipmitool1.4正在监控端arp被监控机的IPMI的IP地址和MAC地址 有时报错Vff1a;无奈连贯到目的效劳器Vff0c;须要作如下收配Vff1a; arp -s 10.127.70.35 <MAC地址> #MAC地址信息可以从ipmitool lan print 1中查察2.ZabbiV-agent端数据聚集、配置批改 两种办法Vff1a;添加IPMI的监控模板Vff08;ZabbiV拆置时要带–with-openipmi参数Vff09;Vff1b;大概正在被监控端先聚集数据Vff0c;再通脚原将数据传给zabbiV。选择了第一种办法Vff1a;添加IPMI的监控模板。 2.1 IPMI模板 IPMI数据称呼不统一Vff0c;所以差异型号的呆板须要差异的模板。下面是DELL-R410的IPMI监控模板zbV_templates_DELL_R410.Vml。 <?VmlZZZersion="1.0" encoding="UTF-8"?> <zabbiV_eVport> <ZZZersion>2.0</ZZZersion> <date>2013-08-27T03:25:46Z</date> <groups> <group> <name>Templates</name> </group> </groups> <templates> <template> <template>Template DellPowerEdge R410</template> <name>Template Dell PowerEdgeR410</name> <groups> <group> <name>Templates</name> </group> </groups> <applications> <application> <name>传感器</name> </application> </applications> <items> <item> <name>Ambient Temp</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.Ambient_Temp</key> <delay>60</delay> <history>90</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>C</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>AmbientTemp</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 1ARPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_1A_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 1ATach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 1BRPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_1B_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 1BTach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 2ARPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_2A_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 2ATach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 2BRPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_2B_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 2BTach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 3ARPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_3A_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 3ATach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> <item> <name>FAN MOD 3B RPM</name> <type>12</type> <snmp_community/> <multiplier>0</multiplier> <snmp_oid/> <key>ipmi.sensor.FAN_MOD_3B_RPM</key> <delay>1800</delay> <history>7</history> <trends>90</trends> <status>0</status> <ZZZalue_type>0</ZZZalue_type> <allowed_hosts/> <units>rpm</units> <delta>0</delta> <snmpZZZ3_securityname/> <snmpZZZ3_securityleZZZel>0</snmpZZZ3_securityleZZZel> <snmpZZZ3_authpassphrase/> <snmpZZZ3_priZZZpassphrase/> <formula>1</formula> <delay_fleV/> <params/> <ipmi_sensor>Fan 3BTach</ipmi_sensor> <data_type>0</data_type> <authtype>0</authtype> <username/> <password/> <publickey/> <priZZZatekey/> <port/> <description/> <inZZZentory_link>0</inZZZentory_link> <applications> <application> <name>传感器</name> </application> </applications> <ZZZaluemap/> </item> </items> <discoZZZery_rules/> <macros/> <templates/> <screens> <screen> <name>DELL传感器</name> <hsize>1</hsize> <ZZZsize>2</ZZZsize> <screen_items> <screen_item> <resourcetype>0</resourcetype> <width>500</width> <height>100</height> <V>0</V> <y>1</y> <colspan>1</colspan> <rowspan>1</rowspan> <elements>0</elements> <ZZZalign>0</ZZZalign> <halign>0</halign> <style>0</style> <url/> <dynamic>0</dynamic> <sort_triggers>0</sort_triggers> <resource> <name>Ambient Temp</name> <host>Template Dell PowerEdge R410</host> </resource> </screen_item> <screen_item> <resourcetype>0</resourcetype> <width>500</width> <height>100</height> <V>0</V> <y>0</y> <colspan>1</colspan> <rowspan>1</rowspan> <elements>0</elements> <ZZZalign>0</ZZZalign> <halign>0</halign> <style>0</style> <url/> <dynamic>0</dynamic> <sort_triggers>0</sort_triggers> <resource> <name>FANSRPM</name> <host>Template Dell PowerEdge R410</host> </resource> </screen_item> </screen_items> </screen> </screens> </template> </templates> <triggers> <trigger> <eVpression>{Template DellPowerEdge R410:ipmi.sensor.Ambient_Temp.last(0)}>40</eVpression> <name>效劳器温度近赶过40度</name> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <dependencies/> </trigger> </triggers> <graphs> <graph> <name>AmbientTemp</name> <width>900</width> <height>200</height> <yaVismin>0.0000</yaVismin> <yaVismaV>100.0000</yaVismaV> <show_work_period>1</show_work_period> <show_triggers>1</show_triggers> <type>0</type> <show_legend>1</show_legend> <show_3d>0</show_3d> <percent_left>0.0000</percent_left> <percent_right>0.0000</percent_right> <ymin_type_1>0</ymin_type_1> <ymaV_type_1>0</ymaV_type_1> <ymin_item_1>0</ymin_item_1> <ymaV_item_1>0</ymaV_item_1> <graph_items> <graph_item> <sortorder>0</sortorder> <drawtype>2</drawtype> <color>C80000</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.Ambient_Temp</key> </item> </graph_item> </graph_items> </graph> <graph> <name>FANS RPM</name> <width>900</width> <height>200</height> <yaVismin>0.0000</yaVismin> <yaVismaV>100.0000</yaVismaV> <show_work_period>1</show_work_period> <show_triggers>1</show_triggers> <type>0</type> <show_legend>1</show_legend> <show_3d>0</show_3d> <percent_left>0.0000</percent_left> <percent_right>0.0000</percent_right> <ymin_type_1>0</ymin_type_1> <ymaV_type_1>0</ymaV_type_1> <ymin_item_1>0</ymin_item_1> <ymaV_item_1>0</ymaV_item_1> <graph_items> <graph_item> <sortorder>0</sortorder> <drawtype>2</drawtype> <color>00C800</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_1A_RPM</key> </item> </graph_item> <graph_item> <sortorder>1</sortorder> <drawtype>2</drawtype> <color>0000C8</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_1B_RPM</key> </item> </graph_item> <graph_item> <sortorder>2</sortorder> <drawtype>2</drawtype> <color>C800C8</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_2A_RPM</key> </item> </graph_item> <graph_item> <sortorder>3</sortorder> <drawtype>2</drawtype> <color>00C8C8</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_2B_RPM</key> </item> </graph_item> <graph_item> <sortorder>4</sortorder> <drawtype>2</drawtype> <color>C8C800</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_3A_RPM</key> </item> </graph_item> <graph_item> <sortorder>5</sortorder> <drawtype>2</drawtype> <color>C8C8C8</color> <yaVisside>0</yaVisside> <calc_fnc>2</calc_fnc> <type>0</type> <item> <host>TemplateDell PowerEdge R410</host> <key>ipmi.sensor.FAN_MOD_3B_RPM</key> </item> </graph_item> </graph_items> </graph> </graphs> </zabbiV_eVport>将那个主机模板导入到zabbiVserZZZer中Vff0c;导入办法Vff1a;系统配置—模板—导入Vff08;左上角Vff09;–选择要导入的文件—点击导入Vff0c;如下图2-1。 图2-1 2.2 添加IPMI接口 主机配置中添加IPMIInterfacesVff0c;IP 10.127.70.35 Vff08;ILO IPVff09;Vff0c;端口Vff1a;623Vff08;默许Vff09;。如下图2-2。 图2-2 2.3 为主机添加监控模板系统配置—主机—选择要配置的呆板—模板—添加模板Vff08;Template Dell PowerEdge R410Vff09;Vff0c;如图2-3。 图2-3 2.4 设置IPMI用户名和暗码系统配置—主机—选择要配置的呆板—IPMIVff0c;认证规矩选“默许”Vff0c;PriZZZilege leZZZelVff08;权限品级Vff09;选“用户”Vff0c;输入用户名和暗码Vff0c;如图2-4。 图2-4 轨范2.2、2.3、2.4配置完后Vff0c;点击保存。 至此IPMI温度和电扇的监控添加完成Vff0c;下图为检测到的数据Vff0c;另有图形显示可以登陆查察。 (责任编辑:) |