Ad Widget

Collapse

HP servers monitoring via iLO

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vengant
    started a topic HP servers monitoring via iLO

    HP servers monitoring via iLO

    Hi all,

    I attached archive with scripts and template for auto-discovery and monitor hardware status parameters and more other information on HP Proliant servers via iLO IPMI interface.

    Overview

    Template allows to collect this types of data:
    - Temperatures, FANs, power supplies for Proliants G5 and above,
    - Disks and memory status for Proliants G7 and above,
    - General inventory information such as serial and model numbers, firmware versions etc.

    This solution requires FreeIPMI package to be installed.

    Archive contains template and two perl scripts:

    ilo_discovery.pl - querying iLO for items and generating standard JSON output for LLD,
    ipmi_proliant.pl - querying all data for specified ipmi section (sensors, chassis, fru etc). Data will be cached in temporary file to prevent iLO to be overloaded by IPMI requests. Then specified value retrieving from cache.

    Installation

    1. Download archive and import template into Zabbix,

    2. Place scripts to "externalscripts" directory path as configured in zabbix_server.conf, and make them executable,

    3. Download and compile FreeIPMI (FAQ for installation can be found there):
    Code:
    # wget http://ftp.gnu.org/gnu/freeipmi/freeipmi-1.2.1.tar.gz 
    # tar -xvzf freeipmi-1.2.1.tar.gz
    # cd freeipmi-1.2.1
    # ./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man
    # make install
    For 64-bit systems configure string will be:
    Code:
    ./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --libdir=/usr/lib64
    4. Create account with "user" rights for Zabbix in your iLO. This account not required administrative privilegies. Then replace values of $user and $pass variables in scripts to login and password of this account, that will be used to collect data from iLO.

    5. Check FreeIPMI to success connect with iLO (replace IP, login and password to yours):
    Code:
    # /usr/sbin/ipmi-sensors -D LAN2_0 -h 192.168.0.1 -u monitor -p [email protected]$$w0rd -l USER -W discretereading --no-header-output --quiet-cache --sdr-cache-recreate --comma-separated-output --entity-sensor-names
    We should get something like this output:
    Code:
    0,System Chassis 1 UID Light,OEM Reserved,N/A,N/A,'OEM Event = 0000h'
    1,System Chassis 2 Health LED,OEM Reserved,N/A,N/A,'OEM Event = 0000h'
    2,Processor Module VRM 1,Power Unit,N/A,N/A,'Device Inserted/Device Present'
    3,Power Supply Power Supply 1,Power Supply,N/A,N/A,'Presence detected'
    6. Check discovery script to success parsing IPMI data (replace IP to yours):
    Code:
    # /usr/lib/zabbix/externalscripts/ilo_discovery.pl 192.168.0.1 sensor temp numeric
    We should get something like this output:
    Code:
    {
            "data":[
                    {
                            "{#CLASS}":"sensor",
                            "{#KEY}":"Air Inlet 01-Inlet Ambient",
                            "{#SECTION}":"Temperature",
                            "{#TYPE}":"numeric",
                            "{#MEASURE}":"C"},
                    {
                            "{#CLASS}":"sensor",
                            "{#KEY}":"Processor 02-CPU",
                            "{#SECTION}":"Temperature",
                            "{#TYPE}":"numeric",
                            "{#MEASURE}":"C"},
    7. In Zabbix web interface, go to our host that we want to monitor via iLO and create macros {$ILO} with address of our iLO. "IPMI interface" host field not used.

    8. Attach template "Template IPMI Script iLO Discovery" to host,

    9. Wait for discovery will be complete. At the end of it, we should get something like this in "lastest data":


    And in "graphs":


    That's all. This solution was tested with Zabbix 2.0 and 2.2 on CentOS 5 and CentOS6 (x86 and x64), for Proliants DL, ML and BL generation 5, 6, 7 and 8. For servers with lo100 it will also work, but the data will be less beacuse of lo100 restrictions.

    General recomendaion: upgrade your iLO firmware to lastest version before using this.
    Attached Files
    Last edited by Vengant; 10-04-2014, 17:57.

  • kolele
    commented on 's reply
    I have the same situation... anybody ?

  • bearpuh
    replied
    Hi folks.

    Tested on HP Proliant 380 Gen9 + Zabbix 3.0 (Centos7 x86_64)
    Zabbix template IPMI DL380 Gen9 (Gen5,7,8) as per link below.

    Steps to install.

    1. HP iLO web interface: Administration -> User Administration
    - create user Zabbix with Administrator privileges
    - Access Settings:
    IPMI/DCMI over LAN Access -> Enable
    IPMI/DCMI over LAN Port -> 623

    2. Zabbix web interface: Administration-> General -> Value mapping.
    Create value map as follows:

    1) Server HP Fan
    0 ⇒ Failure
    1 ⇒ OK

    2) Server HP Health
    0 ⇒ OK
    1 ⇒ Error

    Click image for larger version

Name:	zabbix_screen.png
Views:	1
Size:	6.1 KB
ID:	355586


    3. Configuration -> Templates
    - import template HP_DL380_g9.xml.

    4. Zabbix server. Install the following apps if not installed.
    - freeipmi
    - openipmi
    IMPORTANT: openipmi should be with openssl support.
    Centos7 openipmi already precompiled with openssl.

    5. vim /etc/zabbix/zabbix_server.conf
    StartIPMIPollers=5
    service zabbix-server restart

    6. Zabbix web interface. Configuration -> hosts
    - Create host -> interface IPMI
    - type IP of iLO interface.
    - add template above
    - IPMI:
    Authentication algorithm: RMCP+
    Privilege level: Admin
    - type Username/password (Zabbix/Password).

    Leave a comment:


  • neo32
    replied
    Syntax error:Unterminated quoted string

    Hello all
    Tell me, can anyone come across. With a local account, this scheme works fine. But it is necessary to specify there domain record, through which it is also possible to go to ILO, Perl gives an error:

    Code:
    sh: 1: Syntax error: Unterminated quoted string
    
    {
    
            "data":[
    
    ]}


    what could be the problem? or information about the domain as it should be in the script shove or perl it to specify?

    Leave a comment:


  • michael.weber
    replied
    What ILO version are you using?
    i recommend to reset the ilo via webinterface and give it a other try.

    Leave a comment:


  • Nikolay_Baranenko
    replied
    Monitoring ILOM. ipmi_ctx_open_outofband_2_0: internal error

    Hello,

    I tried to conf monitoring ILOM in Zabbix 3.4

    OS

    Linux zabbixapp01 4.1.12-103.3.8.el7uek.x86_64 #2 SMP Mon Aug 21 17:27:54 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux

    I installed freeipmi-1.5.7 and tried test connection

    /usr/sbin/ipmi-sensors -D LAN2_0 -h 192.168.0.21 -u username -p password -l USER -W discretereading --no-header-output --quiet-cache --sdr-cache-recreate --comma-separated-output --entity-sensor-names
    returned error

    ipmi_ctx_open_outofband_2_0: internal error

    How solve this problem?

    Leave a comment:


  • CDieringer
    replied
    ilo_discovery.pl.

    Hello I am fairly new to Perl and I do not know where to place this "no if ($] >= 5.01, 'warnings' => 'experimental' in the ilo_discovery.pl file, any help would be greatly appreciated.

    Thanks,

    Leave a comment:


  • akincer
    replied
    Here's an immediate example of the disconnect.

    The discovery item

    Code:
    <key>ilo_discovery.pl[{$ILO},{$ILO_USER},{$ILO_PASS},sensor,&quot;disk&quot;,discrete]</key>
    Returns this kind of data for a key value:

    Code:
    "{#KEY}":"Disk 5 Cntlr 2 Bay 5",
    But the actual IPMI command in ipmi_proliant.pl returns this corresponding data:

    Code:
    46 | Cntlr 2 Bay 5   | Drive Slot   | N/A        | N/A   | 'OK'
    Ignoring the vertical pipe delimiter that is different from the code, notice the key value doesn't actually contain "Disk 5". This will cause the data acquisition to fail.

    Leave a comment:


  • akincer
    replied
    If it's working for you as expected, then sure. There are definite logic errors that cause it to crash and burn for data acquisition for an iLo 3 on a DL380 G7.

    Like I said -- manually adding a single key at a time using the built-in IPMI data acquisition works fine, so the problem is definitely in the perl scripts. For the number of servers I have to add, this is way too much work to do manually.

    Leave a comment:


  • nasomers
    replied
    Originally posted by akincer View Post
    I've noticed the problem as well on an iLo 3. I've verified adding IPMI values one at a time manually with built-in parsing works as expected, but this isn't convenient to do on multiple servers.

    There are some logic/parsing errors at work it would seem. If I sort them out, I'll upload the fixed code.
    I proceeded with setup anyway and it does work, I'm able to pull all the iLO data I'd expect from my hosts in Zabbix, so I guess it's cool?

    Leave a comment:


  • akincer
    replied
    I've noticed the problem as well on an iLo 3. I've verified adding IPMI values one at a time manually with built-in parsing works as expected, but this isn't convenient to do on multiple servers.

    There are some logic/parsing errors at work it would seem. If I sort them out, I'll upload the fixed code.

    Leave a comment:


  • nasomers
    replied
    Originally posted by mahdiafa View Post
    Hi All
    I also have same problem on zabbix 3 installed on Debian 8

    Regards
    Same problem - iLO2 on a DL360 G6, Zabbix 3 and Debian 7.11

    Leave a comment:


  • nasomers
    replied
    Hey guys, great thread. Just having one issue with the implementation of this so far. What if this works...
    Originally posted by Vengant View Post
    5. Check FreeIPMI to success connect with iLO (replace IP, login and password to yours):
    Code:
    # /usr/sbin/ipmi-sensors -D LAN2_0 -h 192.168.0.1 -u monitor -p [email protected]$$w0rd -l USER -W discretereading --no-header-output --quiet-cache --sdr-cache-recreate --comma-separated-output --entity-sensor-names
    We should get something like this output:
    Code:
    0,System Chassis 1 UID Light,OEM Reserved,N/A,N/A,'OEM Event = 0000h'
    1,System Chassis 2 Health LED,OEM Reserved,N/A,N/A,'OEM Event = 0000h'
    2,Processor Module VRM 1,Power Unit,N/A,N/A,'Device Inserted/Device Present'
    3,Power Supply Power Supply 1,Power Supply,N/A,N/A,'Presence detected'
    But this doesn't return any data... what could that be an issue with?
    Originally posted by Vengant View Post
    6. Check discovery script to success parsing IPMI data (replace IP to yours):
    Code:
    # /usr/lib/zabbix/externalscripts/ilo_discovery.pl 192.168.0.1 sensor temp numeric
    We should get something like this output:
    Code:
    {
            "data":[
                    {
                            "{#CLASS}":"sensor",
                            "{#KEY}":"Air Inlet 01-Inlet Ambient",
                            "{#SECTION}":"Temperature",
                            "{#TYPE}":"numeric",
                            "{#MEASURE}":"C"},
                    {
                            "{#CLASS}":"sensor",
                            "{#KEY}":"Processor 02-CPU",
                            "{#SECTION}":"Temperature",
                            "{#TYPE}":"numeric",
                            "{#MEASURE}":"C"},
    Thanks so much!

    Leave a comment:


  • michael.weber
    replied
    Hint for G8 and later:
    https://share.zabbix.com/cat-server-...overy-template

    use the SNMP Template. More robust and no need to Setup external script. Configure SNMP Community and set snmp passthrough to "no" on ILO. so the internal SNMP Agent will answer the request.
    Since G8 there is a internal SNMP Server that can answer the request.

    For the older HP Server. please be sure that the "Timeout" value in the zabbix Agent config is higher than the Default 3 sek. The IPMI script requires ~10 seks. so please adjust this. and come back

    Leave a comment:


  • mahdiafa
    replied
    Originally posted by michael.weber View Post
    What Generation of HP Server are you using? What ILO Version is installed?
    I have DL380 G5 with iLO version 2.27 and DL380 G9 with iLO version 2.40
    Attached Files

    Leave a comment:

Announcement

Collapse
No announcement yet.
Working...
X