Ad Widget

Collapse

HP P2000 G3 monitoring (Zabbix 2.0)

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Emir Imamagic
    replied
    Before adding anything to Zabbix make sure that the controller has DNS and IP address and that it is accessible from the Zabbix server.

    Script uses default username and password (monitor/monitor). If your storage admin changed these parameters, you have to modify them in the hp-msa.pl script, lines:
    Code:
    my $USERNAME = "monitor";
    my $PASSWORD = "monitor";
    Script uses https, but if that is causing a problem you can switch it to http. Unfortunately I didn't make a parameter for that so you can use sed:
    Code:
    sed -i s/https/http/ hp-msa.pl
    Adding script/template to Zabbix:
    1. Create host with your controller data (you must IP and DNS address)
    2. Import template from the ZIP file
    3. On the Zabbix server:
    3.1. check the value of ExternalScripts in Zabbix server config file
    3.2. put hp-msa.pl in that directory
    3.2. make sure that user zabbix has execution permission on hp-msa.pl
    4. Link host with the template Template_HP_P2000_G3

    Discovery rule has a long delay (3600s) so in order to get LLD items defined you might want to temporarily change it to something like 60.

    Wait until items (controllers, vdisks, volumes) appear. Afterwards external item "HP P2000 Sensor" should start reporting values and eventually switch from 0 to 1.

    Originally posted by i.kulagin
    Emir Imamagic
    Thanks for template and the script, but can you please provide some kind of guide how to use them? I need to monitor the P2000 G3 FC, but I can't understand how can I do it, using this script, and which services should I configure inside of the P2000 equipment to make monitoring possible.
    Thanks for your help.

    Leave a comment:


  • Emir Imamagic
    replied
    Hello,

    I have exactly the same version so it should work fine.

    Is LLD working? Did you get all the controllers, vdisks and volumes configured in Zabbix? Script will report 0 if sending of at least a single value fails.

    Unfortunately I didn't have time to do decent debugging so I suggest commenting line:
    Code:
    die "Can not remove file $sendFile!" unless(unlink ($sendFile));
    After executing
    Code:
    hp-msa.pl FQDN stats
    check content of file "/var/tmp/zabbixSenderHPP2000".

    Also check Zabbix server logs for errors.


    Originally posted by scr512
    So i've got most of this working my end but I'm guessing that something isn't quite right.

    If I execute the script interactively using the stats option I get a return of 0. I suspect that maybe the P2000s I am running are a version or two behind what you used in testing?

    # show inquiry
    Inquiry Controller A
    --------------------
    Management Controller Code Version: L230S025
    Management Controller Loader Code Version: 2.5
    Storage Controller Code Version: T230P03

    Leave a comment:


  • scr512
    replied
    So i've got most of this working my end but I'm guessing that something isn't quite right.

    If I execute the script interactively using the stats option I get a return of 0. I suspect that maybe the P2000s I am running are a version or two behind what you used in testing?

    # show inquiry
    Inquiry Controller A
    --------------------
    Management Controller Code Version: L230S025
    Management Controller Loader Code Version: 2.5
    Storage Controller Code Version: T230P03

    Leave a comment:


  • i.kulagin
    replied
    Emir Imamagic
    Thanks for template and the script, but can you please provide some kind of guide how to use them? I need to monitor the P2000 G3 FC, but I can't understand how can I do it, using this script, and which services should I configure inside of the P2000 equipment to make monitoring possible.
    Thanks for your help.

    Leave a comment:


  • thesubmitter
    replied
    Would this work for a g2 msa2312i?

    Leave a comment:


  • elvar
    replied
    Wow, your timing is impeccable! I just installed my first P2000 G3 and I came here looking for a template and found this.


    Thanks!

    Leave a comment:


  • Emir Imamagic
    started a topic HP P2000 G3 monitoring (Zabbix 2.0)

    HP P2000 G3 monitoring (Zabbix 2.0)

    Hello,

    I attached script and Zabbix template for transfer rates and IOPS for HP P2000 G3 storage system. I used LLD so this solution can be used only in Zabbix 2.0.
    For earlier versions it is possible to use statistic gathering & reporting part, but one needs to manually create templates.

    Script (hp-msa.pl) uses XML API and it is based on the example provided in "HP P2000 G3 MSA System CLI Reference Guide". Same script is used for LLD and reporting values as "Zabbix trappers". Execute hp-msa.pl to see usage. Unfortunately script does not have decent error/timeout handling, it is in my TODO list.

    Template uses LLD to discover all:
    • controllers
    • virtual disks
    • volumes


    Discovery item (HP Entities Discovery) uses {HOST.CONN} to connect to the storage system. Statistics gathering item (HP P2000 Sensor) uses {HOST.DNS1} for connecting and value reporting. Make sure that storage host has these two properly configured.

    Script execution time is ~10s so one needs to increase Zabbix server config file, e.g.:
    Timeout=30

    Big thanks to Zabbix team, LLD makes template generation soo much easier.

    Best regards,
    Emir Imamagic
    Attached Files
Working...