How to monitor DELL PowerVault MD3000i ?
Moderators: Developers, Moderators
Ok, I think I've got the host right. I created one host for each RAID controller module because each has its own IP and Virtual Disk assigned.
I'm not getting anything in the graphs though, and I think it's because I'm using Cacti on Windows.
I can run:
SMcli.exe 192.168.0.23 -S -quick -c "show virtualDisk [\"diskname\"] performanceStats;"
and I get results. However, if I run from a cmd prompt:
c:\perl\bin\perl.exe C:\Inetpub\wwwroot\cacti\scripts\md3000i.pl -H '192.168.0.23' -v 'diskname'
It returns a blank line. I'm guessing the perl script has something specific to Linux in it? Can anyone suggest what the problem might be?
I'm not getting anything in the graphs though, and I think it's because I'm using Cacti on Windows.
I can run:
SMcli.exe 192.168.0.23 -S -quick -c "show virtualDisk [\"diskname\"] performanceStats;"
and I get results. However, if I run from a cmd prompt:
c:\perl\bin\perl.exe C:\Inetpub\wwwroot\cacti\scripts\md3000i.pl -H '192.168.0.23' -v 'diskname'
It returns a blank line. I'm guessing the perl script has something specific to Linux in it? Can anyone suggest what the problem might be?
Got it working!
The input string for the Data Input Method in Cacti needs to be modified.
I had already modified the path to perl and cacti, but the rest of the string looked like this:
md3000i.pl -H '<host>' -v '<vmdisk>'
I removed the single quotes from <host> and <vmdisk> and its now working properly.
The input string for the Data Input Method in Cacti needs to be modified.
I had already modified the path to perl and cacti, but the rest of the string looked like this:
md3000i.pl -H '<host>' -v '<vmdisk>'
I removed the single quotes from <host> and <vmdisk> and its now working properly.
Perl script
Can someone actually post the oft-referenced perl script? It's a little pointless to keep talking about it and not actually share the code.
Re: How to monitor DELL PowerVault MD3000i ?
Hi,
Thnx for the script and the template. Voor a single MD3000i with 1 controller, so that there is only 1 virtual path to access the disks. It is working fine
But not for a cluster, you can get only disks stats from disks that use the controller agains you check.
Some little shell scripts help to solve this issue.
md3000i_discover_controller.sh checks on with controllers the vdisks are and write this to a file. I have this one i a cronjob to check every 15min.
md3000i_cluster.sh is a wrapper around md3000i.pl, to check it on the correct controller.
With this scripts, my graphics keep working, even when I or the system change the Prefferred Path to a Vdisk.
Thnx for the script and the template. Voor a single MD3000i with 1 controller, so that there is only 1 virtual path to access the disks. It is working fine
But not for a cluster, you can get only disks stats from disks that use the controller agains you check.
Some little shell scripts help to solve this issue.
md3000i_discover_controller.sh checks on with controllers the vdisks are and write this to a file. I have this one i a cronjob to check every 15min.
md3000i_cluster.sh is a wrapper around md3000i.pl, to check it on the correct controller.
With this scripts, my graphics keep working, even when I or the system change the Prefferred Path to a Vdisk.
- Attachments
-
- md3000i_cluster.sh
- (432 Bytes) Downloaded 238 times
-
- md3000i_discover_controller.sh
- (380 Bytes) Downloaded 245 times
Re: How to monitor DELL PowerVault MD3000i ?
Reviving an old thread!
well I did not have any luck using the script to monitor or get stats from Virtual disks that have a special characters such as dashes for example: "Deskop-Store-1"
this would give me no graphic data at all. However, it will work for something that had a one string name such as: "projects"
Any way, because of this and in addition to my limitations in perl scripting I decided to look for an alternative method in getting the script to interpret the "-" dashes. Here is an example of the original script:
For the life of me I could not figure out this last line and how to make that interpret the dashes in the name of the virtual disk.
The fix was to create a separate source script with the script editor for the modular disk manager software. I saved my script to my PC and uploaded it to the cacti server.
Now keep in mind that the cacti server also holds the Dell's Modular disk storage software. It runs on Debian-x64 system and Dell's MDSM installer was pain in the ass, but i eventually i figured it out. Here is the location of where i saved the source script:
here is the script:
To be able to call the script I had to modify some things around from the original
md3000i.pl script, as it did not allow to graph different virtual disks.
The FIX:
I ended up doing a new script called "md3000iv3.pl" I removed the references for "host" and "vmdisk" here:
As you can see i commented out all the beginning lines and added the following:
It is important that you have both IP addresses of your MD3000i else the script may fail. Even if you have only one IP address your second one could be exactly the same just with an added ".0"
The next important piece is the:
I did that so that cacti will not consider any Input Fields e.g. <H> and <VM>
Instead you will be redirecting the script to look for the MD source script:
e.g: /opt/dell/mdstoragemanager/client/server1-store.scr
The only drawback to all this is that you have to manually recreate in Cacti the Data Input Methods for each MD source script e.g. :
To create all graphs per Virtual Disk you will need to duplicate each Data Template and Graph Template. Also make sure your Data Template points to the correct Data Input Method.
well I did not have any luck using the script to monitor or get stats from Virtual disks that have a special characters such as dashes for example: "Deskop-Store-1"
this would give me no graphic data at all. However, it will work for something that had a one string name such as: "projects"
Any way, because of this and in addition to my limitations in perl scripting I decided to look for an alternative method in getting the script to interpret the "-" dashes. Here is an example of the original script:
Code: Select all
#Change this to fit your installation
my $SMcli="/opt/dell/mdstoragemanager/client/SMcli";
my ($x,$host,$vm,$arg,$find_only);
for $x ( 0 .. $#ARGV ){
$arg = $ARGV[$x];
if ( $arg eq "-H" ){
$find_only = 1;
$x++;
$host = ${ARGV[$x]};
next;
}
if ( $arg eq "-v" ){
$x++;
$vm = ${ARGV[$x]};
next;
}
}
#Execute SMcli command
my $cmd = "$SMcli $host -S -quick -c \"show virtualDisk [\\\"$vm\\\"] performanceStats;\"";
The fix was to create a separate source script with the script editor for the modular disk manager software. I saved my script to my PC and uploaded it to the cacti server.
Now keep in mind that the cacti server also holds the Dell's Modular disk storage software. It runs on Debian-x64 system and Dell's MDSM installer was pain in the ass, but i eventually i figured it out. Here is the location of where i saved the source script:
Code: Select all
/opt/dell/mdstoragemanager/client/server1-store.scr
Code: Select all
on error stop;
show virtualDisk ["Server-Store-1"] performanceStats;
md3000i.pl script, as it did not allow to graph different virtual disks.
The FIX:
I ended up doing a new script called "md3000iv3.pl" I removed the references for "host" and "vmdisk" here:
Code: Select all
#Change this to fit your installation
my $SMcli="/opt/dell/mdstoragemanager/client/SMcli";
my $SMscr="/opt/dell/mdstoragemanager/client";
my $datastore = $ARGV[0];
#your Dell MD3000i IP address
my $host="xx.xx.xx.xx";
my $host2="xx.xx.xx.xx";
#my ($x,$host,$vm,$arg,$find_only);
#for $x ( 0 .. $#ARGV ){
# $arg = $ARGV[$x];
# if ( $arg eq "-H" ){
# $find_only = 1;
# $x++;
# $host = ${ARGV[$x]};
# next;
# }
#
# if ( $arg eq "-v" ){
# $x++;
# $vm = ${ARGV[$x]};
# next;
# }
#
# }
#Execute SMcli command
#my $cmd = "$SMcli $host -S -quick -c \"show virtualDisk [\\\"$vm\\\"] performanceStats;\"";
my $cmd = "$SMcli $host $host2 -f $SMscr/$datastore";
#print "$cmd \n";
Code: Select all
....
my $SMcli="/opt/dell/mdstoragemanager/client/SMcli";
my $SMscr="/opt/dell/mdstoragemanager/client";
my $datastore = $ARGV[0];
#your Dell MD3000i IP address
my $host="xx.xx.xx.xx";
my $host2="xx.xx.xx.0";
....
my $cmd = "$SMcli $host $host2 -f $SMscr/$datastore";
It is important that you have both IP addresses of your MD3000i else the script may fail. Even if you have only one IP address your second one could be exactly the same just with an added ".0"
The next important piece is the:
Code: Select all
my $datastore = $ARGV[0];
Instead you will be redirecting the script to look for the MD source script:
Code: Select all
$SMscr/$datastore
The only drawback to all this is that you have to manually recreate in Cacti the Data Input Methods for each MD source script e.g. :
Code: Select all
/opt/dell/mdstoragemanager/client/server1-store.scr
/opt/dell/mdstoragemanager/client/server2-store.scr
/opt/dell/mdstoragemanager/client/server3-store.scr
/opt/dell/mdstoragemanager/client/server4-store.scr
To create all graphs per Virtual Disk you will need to duplicate each Data Template and Graph Template. Also make sure your Data Template points to the correct Data Input Method.
- Attachments
-
- md3000iv3.pl
- (2.06 KiB) Downloaded 355 times
Who is online
Users browsing this forum: No registered users and 1 guest