Improved support for Equallogic storage arrays and DELL servers #3519

Merged
merged 3 commits into from May 19, 2016

Projects

None yet

3 participants

@Peter2121
Contributor

Added:

  • free space monitoring for different LUNs of Equallogic arrays
  • overall status ("Health") monitoring for Equallogic arrays
  • virtual disk state monitoring for DELL servers (using OpenManage MIB)
    Improved:
  • Equallogic Power Cooling Module status monitoring
@Peter2121 Peter2121 Improved support for Equallogic storage arrays and DELL servers
c99c74b
@laf laf commented on the diff May 16, 2016
includes/discovery/storage/eql-storage.inc.php
@@ -0,0 +1,37 @@
+<?php
+
+/*
+ * LibreNMS
+ *
+ * Copyright (c) 2016 Peter TKATCHENKO https://github.com/Peter2121/
+ *
+ * This program is free software: you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version. Please see LICENSE.txt at the top level of
+ * the source code distribution for details.
+ */
+
+$eql_storage = snmpwalk_cache_oid($device, 'EqliscsiVolumeEntry', null, 'EQLVOLUME-MIB', $config['install_dir'].'/mibs/equallogic');
@laf
laf May 16, 2016 Member

Think you need to check if the os is equallogic first otherwise this will run for all devices.

@Peter2121
Peter2121 May 18, 2016 Contributor

Hi,

Two others (hrstorage and netapp) have no this check.
The only working line is snmpwalk_cache_oid(...) without this check.
Do you really think this check would be useful?
Are use sure $os is always populated when this include works?

Peter

On 05/17/2016 00:24, Neil Lathwood wrote:

In includes/discovery/storage/eql-storage.inc.php
#3519 (comment):

@@ -0,0 +1,37 @@
+<?php
+
+/*

  • * LibreNMS
  • * Copyright (c) 2016 Peter TKATCHENKO https://github.com/Peter2121/
  • * This program is free software: you can redistribute it and/or modify it
  • * under the terms of the GNU General Public License as published by the
  • * Free Software Foundation, either version 3 of the License, or (at your
  • * option) any later version. Please see LICENSE.txt at the top level of
  • * the source code distribution for details.
  • */
    +
    +$eql_storage = snmpwalk_cache_oid($device, 'EqliscsiVolumeEntry', null, 'EQLVOLUME-MIB', $config['install_dir'].'/mibs/equallogic');

Think you need to check if the os is equallogic first otherwise this
will run for all devices.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/librenms/librenms/pull/3519/files/c99c74bd9554ad24654cd690b5b337ed5da8f47c#r63436648

@laf
laf May 19, 2016 Member

That's a good point actually. We'll leave it for now but this does raise that we need to force os check as being the first thing that runs.

@laf laf and 1 other commented on an outdated diff May 16, 2016
includes/discovery/storage/eql-storage.inc.php
+ * the source code distribution for details.
+ */
+
+$eql_storage = snmpwalk_cache_oid($device, 'EqliscsiVolumeEntry', null, 'EQLVOLUME-MIB', $config['install_dir'].'/mibs/equallogic');
+
+if (is_array($eql_storage)) {
+ echo 'EqliscsiVolumeEntry ';
+ foreach ($eql_storage as $index => $storage) {
+ $fstype = $storage['eqliscsiVolumeAdminStatus'];
+ $descr = $storage['eqliscsiVolumeName'];
+ $units = 1;
+ $size = $storage['eqliscsiVolumeSize'] * $units;
+ $used = $storage['eqliscsiVolumeStatusAllocatedSpace'] * $units;
+ if (is_int($index)) {
+ discover_storage($valid_storage, $device, $index, $fstype, 'eql-storage', $descr, $size, $units, $used);
+ } else {
@laf
laf May 16, 2016 Member

Can you format this as:

}
else {

Same for anywhere else you have this or elseif.

@Peter2121
Peter2121 May 18, 2016 Contributor

OK, pushed.

Peter

On 05/17/2016 00:25, Neil Lathwood wrote:

In includes/discovery/storage/eql-storage.inc.php
#3519 (comment):

  • * the source code distribution for details.
  • */
    +
    +$eql_storage = snmpwalk_cache_oid($device, 'EqliscsiVolumeEntry', null, 'EQLVOLUME-MIB', $config['install_dir'].'/mibs/equallogic');
    +
    +if (is_array($eql_storage)) {
  • echo 'EqliscsiVolumeEntry ';
  • foreach ($eql_storage as $index => $storage) {
  •    $fstype = $storage['eqliscsiVolumeAdminStatus'];
    
  •    $descr  = $storage['eqliscsiVolumeName'];
    
  •    $units  = 1;
    
  •    $size = $storage['eqliscsiVolumeSize'] \* $units;
    
  •    $used = $storage['eqliscsiVolumeStatusAllocatedSpace'] \* $units;
    
  •    if (is_int($index)) {
    
  •        discover_storage($valid_storage, $device, $index, $fstype, 'eql-storage', $descr, $size, $units, $used);
    
  •    }  else {
    

Can you format this as:

}
else {

Same for anywhere else you have this or elseif.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/librenms/librenms/pull/3519/files/c99c74bd9554ad24654cd690b5b337ed5da8f47c#r63436697

@laf
Member
laf commented May 16, 2016

Hi @Peter2121

Can you please sign the contributors agreement as per: http://docs.librenms.org/General/Contributing/

@Peter2121 Peter2121 I agree to the conditions of the Contributor Agreement
    contained in doc/General/Contributing.md.
7f4a05f
@Peter2121 Peter2121 Reformatting if-else
38d28ec
@Peter2121
Contributor

OK, pushed.
Should I create another pull request?

Peter

On 05/17/2016 00:25, Neil Lathwood wrote:

Hi @Peter2121 https://github.com/Peter2121

Can you please sign the contributors agreement as per:
http://docs.librenms.org/General/Contributing/


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#3519 (comment)

@laf laf merged commit 732524e into librenms:master May 19, 2016

2 checks passed

Auto-Deploy Build finished. No test results found.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment