Nagios 监控 DELL 硬件

check_openmanage插件依赖于DELL服务器管理工具OMSA(Dell OpenManage Server Administrator)的安装。

插件下载 http://folk.uio.no/trondham/software/check_openmanage.html

OMSA安装

NRPE配置文件

 

$ vim nrpe.d/dell.cfg 
command[check_dell_hardware]=/usr/local/nagios/libexec/check_openmanage 
command[check_dell_cpu]=/usr/local/nagios/libexec/check_openmanage --only cpu 
command[check_dell_voltage]=/usr/local/nagios/libexec/check_openmanage --only voltage 
command[check_dell_battery]=/usr/local/nagios/libexec/check_openmanage --only batteries 
command[check_dell_temp]=/usr/local/nagios/libexec/check_openmanage --only temp -w $ARG1$ -c $ARG2$ -p
command[check_dell_fans]=/usr/local/nagios/libexec/check_openmanage --only fans -w $ARG1$ -c $ARG2$ -p


配置命令文件

 

$ vim checkcommands.cfg 
define command{         
command_name                    check_remote_dell_battery         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$  }   

define command{         
command_name                    check_remote_dell_cpu         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$  }   

define command{         
command_name                    check_remote_dell_fans         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$  }    define command{         
command_name                    check_remote_dell_hardware         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$  }   

define command{         
command_name                    check_remote_dell_temp         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$  }    define command{         
command_name                    check_remote_dell_voltage         
command_line                    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$  }


主机模板文件

 

$ vim hostTemplates.cfg 
define host{         
name                            server-dell         
use                             generic-host         
alias                           server-dell         
register                                0 
}


服务模板文件

 

$ vim serviceTemplates.cfg 
define service{         
name                            dell_battery         
service_description             dell_battery         
use                             generic-service         
check_command                   check_remote_dell_battery!check_dell_battery         
register                                0          ;TEMPLATE-HOST-LINK             server-dell
}   

define service{        
 name                            dell_cpu         
service_description             dell_cpu         
use                             generic-service         
check_command                   check_remote_dell_cpu!check_dell_cpu         
register                                0          ;TEMPLATE-HOST-LINK             server-dell 
}   

define service{         
name                            dell_fans         
service_description             dell_fans         
use                             generic-service         
check_command                   check_remote_dell_fans!check_dell_fans!2000!1000         
register                                0          ;TEMPLATE-HOST-LINK             server-dell 
}   

define service{         
name                            dell_hardware         
service_description             dell_hardware         
use                             generic-service         
check_command                   check_remote_dell_hardware!check_dell_hardware        
 register                                0 
}  
 
define service{         
name                            dell_temp         
service_description             dell_temp         
use                             generic-service         
check_command                   check_remote_dell_temp!check_dell_temp!0=40!0=50         
register                                0          ;TEMPLATE-HOST-LINK             server-dell 
}
  
define service{         
name                            dell_voltage         
service_description             dell_voltage         
use                             generic-service         
check_command                   check_remote_dell_voltage!check_dell_voltage         
register                                0          ;TEMPLATE-HOST-LINK             server-dell 
}


验证

 

$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_hardware 
OK - System: 'PowerEdge R410', SN: 'XXXXXXX', 24 GB ram (6 dimms), 1 logical drives, 2 physical drives  
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_cpu 
PROCESSORS OK - 1 processors checked   
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_voltage 
VOLTAGE OK - 14 voltage probes checked   
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_battery 
BATTERIES OK - 1 batteries checked   
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_temp -a 60 80 
TEMPERATURES OK - 1 temperature probes checked|temp_0_system_board_ambient=18;42;47   
$ /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1 -c check_dell_fans -a 3000 2000 
FANS OK - 8 fan probes checked|fan_0_system_board_fan_mod_1a_rpm=5520;0;0 fan_1_sy
 

你可能感兴趣的:(dell,nagios,nagios,oma)