The Storwize systems don't export statistic data via SNMP. This program tries to get the statistic data from a Storwize system into the PRTG server. The program will be installed on a windows probe server, and will extract the data from the Storwize system via ssh. (So the ssh service has to run on the Storwize system. By default it is running)
You have to follow the installation instructions for a "Advanced EXE/Script Sensor" on a windows probe server.
The program needs 5 parameter
StorwizeSensor.exe <host> <port> <username> <password> <IBMCommand>
Optional you could tell the program which fields it should collect as a result.
StorwizeSensor.exe <host> <port> <username> <password> <IBMCommand> <1..n : FieldNrs that should be returned>
(Ofcourse you have to replace the IP with the IP of your Storwize system)
Get system statistics
192.168.0.1 22 %linuxuser %linuxpassword lssystemstats 1
Get disk usage statistics
192.168.0.1 22 %linuxuser %linuxpassword "lsmdiskgrp -bytes" 5 7 9 10
Get the status of the first global mirror
192.168.0.1 22 %linuxuser %linuxpassword "lsrcrelationshipprogress rcrel0"
Precompiled exe files are released here: https://github.com/BenediktS/PRTG_IBMStorwizeSensor/releases
To compile the project, you need the SSH Components from Devart. ( https://www.devart.com/sbridge/ )
This components are only used in the uDevartSSHConnector.pas.
I couldn't find a ssh shell from delphi itself.
I would be pleased to hear from you, that i am wrong.
Dieses Projekt probiert die fehlenden SNMP Daten von einem Storwize System per ssh in eine PRTG Umgebung zu holen. Das Programm verbidnet sich von einem Windowsserver per ssh mit einem IBM Storwize System, setzt einen bash Befehl ab, und wandelt die Antwort in ein JSON um welches PRTG versteht.
Da ich keine Dokumentation gefunden habe, wie man ein echtes Plugin schreiben kann, habe ich nur einen "Advanced EXE/Script Sensor" geschrieben. Diesen muss man auf einen der Windows Probe Server kopieren und dann die benötigten Infos per Parameter übergeben.
Die Exe benötigt mindestens 5 Parameter.
StorwizeSensor.exe <host> <port> <username> <password> <IBMCommand>
Optional kann man dem Programm sagen, dass es nur bestimmte Feldnummern als Sensoren zurück geben soll.
StorwizeSensor.exe <host> <port> <username> <password> <IBMCommand> <1..n : FieldNrs that should be returned>
(Die IP muss natürlich durch die IP des Storwize Systems ersetzt werden)
Hole alle aktuellen Statistikdaten des Systems
192.168.0.1 22 %linuxuser %linuxpassword lssystemstats 1
Hole die aktuelle Belegung der Festplattengruppen
192.168.0.1 22 %linuxuser %linuxpassword "lsmdiskgrp -bytes" 5 7 9 10
Zeige mir den Status des ersten Global Mirrors an:
192.168.0.1 22 %linuxuser %linuxpassword "lsrcrelationshipprogress rcrel0"
Aktuelle Exe-Files findet man unter den Releases https://github.com/BenediktS/PRTG_IBMStorwizeSensor/releases
Zum kompilieren des Projekts benötigt man in der aktuellen Version die SSH Komponenten von Devart. (https://www.devart.com/sbridge/)
Diese Komponenten werden für die Unit uDevartSSHConnector.pas benötigt. Ich habe bisher keine SSH Shell implementierung von Embarcadero selber gefunden. Nehme aber gerne Hinweise darauf an :)