newdevice: Basic support for HPE MSA storage #5907

Merged
merged 4 commits into from Feb 16, 2017

Conversation

Projects
None yet
6 participants
@FTBZ
Contributor

FTBZ commented Feb 15, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

  • Have you signed the Contributors agreement - please do NOT submit a pull request unless you have (signing the agreement in the same pull request is fine). Your commit message for signing the agreement must appear as per the docs.
  • Have you followed our code guidelines?

screen shot 2017-02-15 at 16 59 13

screen shot 2017-02-15 at 16 59 04

@mention-bot

This comment has been minimized.

Show comment
Hide comment
@mention-bot

mention-bot Feb 15, 2017

Thank you for submitting a PR @FTBZ! We have found the following @laf, @murrant and @Rosiak based on the history of these files to review this PR.

Thank you for submitting a PR @FTBZ! We have found the following @laf, @murrant and @Rosiak based on the history of these files to review this PR.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
includes/polling/os/hpe-msa.inc.php
+
+$data = snmp_get_multi($device, $oids, '-OQUs', 'CPQSINFO-MIB');
+
+$hardware = preg_replace('/"/', '', $data[0]['cpqSiProductName']);

This comment has been minimized.

@murrant

murrant Feb 15, 2017

Member

What is the output for these? I don't like the preg_replace here when str_replace() or trim($sr, '"') would likely work, and none may even be needed.

Adding the output of these to the snmprec wouldn't be a bad idea either. like this:

1.3.6.1.4.1.232.2.2.4.2.0|4|Product name string here
1.3.6.1.4.1.232.2.2.2.1.0|4|Serial number here (Change actual number to a similar format/length)
@murrant

murrant Feb 15, 2017

Member

What is the output for these? I don't like the preg_replace here when str_replace() or trim($sr, '"') would likely work, and none may even be needed.

Adding the output of these to the snmprec wouldn't be a bad idea either. like this:

1.3.6.1.4.1.232.2.2.4.2.0|4|Product name string here
1.3.6.1.4.1.232.2.2.2.1.0|4|Serial number here (Change actual number to a similar format/length)
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@@ -0,0 +1,11 @@
+os: hpe-msa

This comment has been minimized.

@laf

laf Feb 15, 2017

Member

Is storageworks not a better os name:

| 4|generic|.1.3.6.1.4.1.11.2.51| HP P2000G3 FC/iSCSI |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP P2000 G3 SAS |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP MSA 1040 SAN |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks P2000 G3 SAS |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks P2000 G3 FC |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks MSA2312fc |
| 1|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks MSA2324sa |

@laf

laf Feb 15, 2017

Member

Is storageworks not a better os name:

| 4|generic|.1.3.6.1.4.1.11.2.51| HP P2000G3 FC/iSCSI |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP P2000 G3 SAS |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP MSA 1040 SAN |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks P2000 G3 SAS |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks P2000 G3 FC |
| 2|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks MSA2312fc |
| 1|generic|.1.3.6.1.4.1.11.2.51| HP StorageWorks MSA2324sa |

This comment has been minimized.

@FTBZ

FTBZ Feb 16, 2017

Contributor

StorageWorks isn't used anymore by HPE, this is the MSA family now.

@FTBZ

FTBZ Feb 16, 2017

Contributor

StorageWorks isn't used anymore by HPE, this is the MSA family now.

tests/snmpsim/hpe-msa.snmprec
@@ -0,0 +1,2 @@
+1.3.6.1.2.1.1.1.0|4|"HP MSA 2040 SAN"
+1.3.6.1.2.1.1.2.0|6|"DRSAKZR-123456789"

This comment has been minimized.

@laf

laf Feb 15, 2017

Member

This should be the sysObjectId

@laf

laf Feb 15, 2017

Member

This should be the sysObjectId

This comment has been minimized.

@FTBZ

FTBZ Feb 16, 2017

Contributor

Not sure to understand, I pushed a PR tell me if it's wrong again. The OIDs should be standardised of the real OID of the device?

@FTBZ

FTBZ Feb 16, 2017

Contributor

Not sure to understand, I pushed a PR tell me if it's wrong again. The OIDs should be standardised of the real OID of the device?

@laf laf added the Blocker 🚫 label Feb 15, 2017

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@scrutinizer-notifier

scrutinizer-notifier Feb 16, 2017

The inspection completed: 1 updated code elements

The inspection completed: 1 updated code elements

@laf laf merged commit 44c3f1f into librenms:master Feb 16, 2017

2 checks passed

Auto-Deploy Build finished.
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