IBM SVC / StorWize / V7000 Scripts (complete package)
Moderators: Developers, Moderators
IBM SVC / StorWize / V7000 Scripts (complete package)
V7000 Metrics currently included:
DISK Blocks/sec
DISK I/O
DISK Response Time
MDISK Blocks/sec
MDISK I/O
MDISK Response Time
NODE CPU Busy
NODE Port bytes/sec
VDISK Blocks/sec
VDISK I/O
VDISK Response Time
(FC & iSCSI port statistics have been written and included in the zip file but I can't get them to show up on the graph)
I am not sure how to categorize this package because it contains templates, scripts, etc and the wiki seems to be very narrow in its categories. Maybe someone can help me with that. In any case, this zip file contains all of the files necessary to monitor an IBM StorWize V7000 device. It was painful to create and so I figured it would be great to share. Although I'm only graphing 20 or so different metrics the full array of performance stats is easily obtained by a very simple modification to the XML files. So, without further discussion, here is how you install it.
1. Install the requisites for SVCMON from IBM http://www-03.ibm.com/support/techdocs/ ... ex/PRS3177. You don't actually need the scripts or anything but since my data collection script is a modified version of this script you will need the perl modules, etc. The install guide also describes how to set up the V7000 so that you can ssh into it from your cacti server.
2. So, now that you have installed the required software for SVCMON and configured your Unix account to have ssh access to the v7000 you are ready to begin. First, unzip the attached file. Take the v7000_collect_files script and place it somewhere.
3. Create a crontab entry under the proper user account to run this script every minute. You will need to pass it the name of your v7000 cluster. Your crontab entry should look something like this:
* * * * * /usr/bin/perl /usr/local/ct/bin/v7000_collect_files --svc myV7000HostName --nochange >/dev/null 2>&1
Note: This script will download the latest copies of performance files and save them to /svcmon/iostats/$NODE. You will want to keep these two directories clean. Maybe run something to remove files after a day. Otherwise your disk will quickly fill and the other scripts will also take much longer to run. You should already know that your V7000 is really two separate nodes clustered together. Each node has its own hostname and your script that runs each minute will log into the cluster and copy the performance files from both nodes.
4. Next, move the v7000_N*.xml files to your $cacti_home/resource/script_queries directory. The directory should probably be /var/www/cacti/resource/script_queries. There should be 6 files (v7000_Nd.xml, v7000_Nm.xml, v7000_NnCPU.xml, etc)
5. Next, move the query_v7000_*php files to $cacti_home/resource/scripts. There should be 6 of these files (query_v7000_disks.php, etc)
6. Import all of the data query, data template, and graph template files into your cacti server.
7. Remember that each node has its own hostname? Make sure that your cacti server can resolve these two hostnames.
That should be it. You should now be able to add each of the two nodes into Cacti as new devices and graph the data.
NOTE: If you look at the php scripts you will see that they are very simple and with just a modification to the XML files you should be able to graph anything and everything that is collected from the SVCMON script. Also note that my PHP scripts contain a URL to IBM's site where you can gather detailed information about every single performance metric available from the V7000.
DISK Blocks/sec
DISK I/O
DISK Response Time
MDISK Blocks/sec
MDISK I/O
MDISK Response Time
NODE CPU Busy
NODE Port bytes/sec
VDISK Blocks/sec
VDISK I/O
VDISK Response Time
(FC & iSCSI port statistics have been written and included in the zip file but I can't get them to show up on the graph)
I am not sure how to categorize this package because it contains templates, scripts, etc and the wiki seems to be very narrow in its categories. Maybe someone can help me with that. In any case, this zip file contains all of the files necessary to monitor an IBM StorWize V7000 device. It was painful to create and so I figured it would be great to share. Although I'm only graphing 20 or so different metrics the full array of performance stats is easily obtained by a very simple modification to the XML files. So, without further discussion, here is how you install it.
1. Install the requisites for SVCMON from IBM http://www-03.ibm.com/support/techdocs/ ... ex/PRS3177. You don't actually need the scripts or anything but since my data collection script is a modified version of this script you will need the perl modules, etc. The install guide also describes how to set up the V7000 so that you can ssh into it from your cacti server.
2. So, now that you have installed the required software for SVCMON and configured your Unix account to have ssh access to the v7000 you are ready to begin. First, unzip the attached file. Take the v7000_collect_files script and place it somewhere.
3. Create a crontab entry under the proper user account to run this script every minute. You will need to pass it the name of your v7000 cluster. Your crontab entry should look something like this:
* * * * * /usr/bin/perl /usr/local/ct/bin/v7000_collect_files --svc myV7000HostName --nochange >/dev/null 2>&1
Note: This script will download the latest copies of performance files and save them to /svcmon/iostats/$NODE. You will want to keep these two directories clean. Maybe run something to remove files after a day. Otherwise your disk will quickly fill and the other scripts will also take much longer to run. You should already know that your V7000 is really two separate nodes clustered together. Each node has its own hostname and your script that runs each minute will log into the cluster and copy the performance files from both nodes.
4. Next, move the v7000_N*.xml files to your $cacti_home/resource/script_queries directory. The directory should probably be /var/www/cacti/resource/script_queries. There should be 6 files (v7000_Nd.xml, v7000_Nm.xml, v7000_NnCPU.xml, etc)
5. Next, move the query_v7000_*php files to $cacti_home/resource/scripts. There should be 6 of these files (query_v7000_disks.php, etc)
6. Import all of the data query, data template, and graph template files into your cacti server.
7. Remember that each node has its own hostname? Make sure that your cacti server can resolve these two hostnames.
That should be it. You should now be able to add each of the two nodes into Cacti as new devices and graph the data.
NOTE: If you look at the php scripts you will see that they are very simple and with just a modification to the XML files you should be able to graph anything and everything that is collected from the SVCMON script. Also note that my PHP scripts contain a URL to IBM's site where you can gather detailed information about every single performance metric available from the V7000.
- Attachments
-
- svc2.JPG (94.06 KiB) Viewed 18099 times
-
- v7000_storwize_svc.zip
- All of the files and scripts necessary
- (95.13 KiB) Downloaded 2104 times
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi
this is very nice scripts. thanks.
but i can't import this template cacti....
i'm testing 0.8.7c and 0.8.7g.
this is very nice scripts. thanks.
but i can't import this template cacti....
i'm testing 0.8.7c and 0.8.7g.
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
I have some problem with version 0.8.7g. Please, write your (acer123) version.
Thank you.
Thank you.
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
I'm also unable to import the data queries, data templates, graph templates, and host templates.
I browse to the files and click import, but nothing happens, and the templates do not show up in cacti.
I am using the most recent version of cacti 0.8.7g with all patches applied on CentOS 6.0.
Any suggestions?
I browse to the files and click import, but nothing happens, and the templates do not show up in cacti.
I am using the most recent version of cacti 0.8.7g with all patches applied on CentOS 6.0.
Any suggestions?
-
- Posts: 2
- Joined: Wed Dec 21, 2011 11:04 am
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi,
I have the exact same problem using cacti 0.8.7e and CentOS 5.
Any help would be appreciated.
Thanks in advance and thanks for the scripts.
Regards.
I have the exact same problem using cacti 0.8.7e and CentOS 5.
Any help would be appreciated.
Thanks in advance and thanks for the scripts.
Regards.
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
The author omitted hash version from these templates somehow.
Here is a host template added version code for 0.8.7e (or later): Import results:
Here is a host template added version code for 0.8.7e (or later): Import results:
But I can't test this template because I don't have that device.
CDEF
[success] Make Stack Negative [update]
[success] Divide by 10 [new]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get Script Data (Indexed) [update]
Data Template
[success] V7000 DISK stats IOPS [new]
[success] V7000 DISK Stats Response Time [new]
[success] V7000 DISK stats BLOCKS [new]
[success] V7000 MDISK stats IOPS [new]
[success] V7000 MDISK stats BLOCKS [new]
[success] V7000 MDISK Stats Response Time [new]
[success] V7000 VDISK stats BLOCKS [new]
[success] V7000 VDISK stats IOPS [new]
[success] V7000 VDISK Stats Response Time [new]
[success] V7000 Node Port Bytes/sec [new]
[success] V7000 Node CPU Busy [new]
Graph Template
[success] V7000 DISK IO [new]
[success] V7000 DISK Response Time [new]
[success] V7000 DISK Blocks [new]
[success] V7000 MDISK IO [new]
[success] V7000 MDISK Blocks [new]
[success] V7000 MDISK Response Time [new]
[success] V7000 VDISK Blocks [new]
[success] V7000 VDISK IO [new]
[success] V7000 VDISK Response Time [new]
[success] V7000 NODE Port Bytes/sec [new]
[success] V7000 NODE CPU Busy [new]
Data Query
[success] V7000 DISK stats [new]
[success] V7000 MDisk stats [new]
[success] V7000 VDisk stats [new]
[success] V7000 NODE Port stats [new]
[success] V7000 NODE CPU stats [new]
Host Template
[success] V7000 Stats [new]
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hello I hope someone is still watching this topic.
I installed the templates in cacti on an Ubunt server.
When I want to create a graph I'm getting the error "Error in data query".
Is there someone out there who can help me?
Peter
I installed the templates in cacti on an Ubunt server.
When I want to create a graph I'm getting the error "Error in data query".
Is there someone out there who can help me?
Peter
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Though I'm not sure that because I've never used this template/script, did you follow all the steps of original post?zandhaas wrote: I installed the templates in cacti on an Ubunt server.
When I want to create a graph I'm getting the error "Error in data query".
(But on step 6, all you have to do is importing the host template, I guess)
And is there any additional error you can see? (like this topic)
-
- Posts: 2
- Joined: Wed Dec 21, 2011 11:04 am
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi,
Many thanks for the corrections.
I've imported the template and had no errors.
I'm gonna try to create the host and the graphs and will let you know if i encounter any errors.
As a reminder, i'm using cacti 0.8.7e and CentOS 5 (64 bits).
Regards.
Many thanks for the corrections.
I've imported the template and had no errors.
I'm gonna try to create the host and the graphs and will let you know if i encounter any errors.
As a reminder, i'm using cacti 0.8.7e and CentOS 5 (64 bits).
Regards.
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
[quote="noname"][quote="zandhaas"]
I installed the templates in cacti on an Ubunt server.
When I want to create a graph I'm getting the error "Error in data query".
[/quote]
Though I'm not sure that because I've never used this template/script, did you follow all the steps of original post?
(But on step 6, all you have to do is importing the host template, I guess)
And is there any additional error you can see? (like [url=http://forums.cacti.net/viewtopic.php?f=2&t=37488]this topic[/url])[/quote]
Yes I had additional errors.
I am going to install caci on a new centos server and am going to try it again.
When I still have the problems I will come back to this post
I installed the templates in cacti on an Ubunt server.
When I want to create a graph I'm getting the error "Error in data query".
[/quote]
Though I'm not sure that because I've never used this template/script, did you follow all the steps of original post?
(But on step 6, all you have to do is importing the host template, I guess)
And is there any additional error you can see? (like [url=http://forums.cacti.net/viewtopic.php?f=2&t=37488]this topic[/url])[/quote]
Yes I had additional errors.
I am going to install caci on a new centos server and am going to try it again.
When I still have the problems I will come back to this post
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi,
I'm not sure how long I'm supposed to follow the install instructions, but I followed them up until I was supposed to create script files, is this correct?
Where I'm at now is I try to start the script manually but get the following error:
[svcmon@server]$ ./v7000_collect_files --svc IP --nochange
ls: /svcmon/iostats/node1/Nn*: No such file or directory
basename: missing operand
Try `basename --help' for more information.
Thanks!
I'm not sure how long I'm supposed to follow the install instructions, but I followed them up until I was supposed to create script files, is this correct?
Where I'm at now is I try to start the script manually but get the following error:
[svcmon@server]$ ./v7000_collect_files --svc IP --nochange
ls: /svcmon/iostats/node1/Nn*: No such file or directory
basename: missing operand
Try `basename --help' for more information.
Thanks!
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Thank you for these templates and scripts. I got these working ok. I had to hardcode node-names to php scripts. On my case it was the fastest/only way to map files and nodes correctly.
Thanks
Thanks
-
- Posts: 2
- Joined: Mon Oct 08, 2012 1:54 am
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi guys,
I have an issue with the scripts - I can run them fine through CLI / webserver as the cacti user even, but when cacti runs them it "hangs".
Did any of you have similar issues? Seems the PHP process gets stuck waiting for a file lock - I could troubleshoot this down to host.php and session_create()
So I decided to try sqlite as session storage instead - then all hell broke loose - started "looping" and I had 20+ running php processes after just 2-3 sec all spawned by host.php.
Is it my setup or is there something weird going on in cacti?
I have an issue with the scripts - I can run them fine through CLI / webserver as the cacti user even, but when cacti runs them it "hangs".
Did any of you have similar issues? Seems the PHP process gets stuck waiting for a file lock - I could troubleshoot this down to host.php and session_create()
So I decided to try sqlite as session storage instead - then all hell broke loose - started "looping" and I had 20+ running php processes after just 2-3 sec all spawned by host.php.
Is it my setup or is there something weird going on in cacti?
-
- Posts: 2
- Joined: Mon Oct 08, 2012 1:54 am
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Seems like the hash is wrong =/ Even though it's tried on 0.8.8a and 0.8.7f.
Anyone else ran into the same issue?
Anyone else ran into the same issue?
Re: IBM SVC / StorWize / V7000 Scripts (complete package)
Hi,
i have implemented the Scripts and XMLs like written in the Post.
I changed some things for the node names. (if you have more than 1 v7000 node1 and node2 will be to few
The i have all files in:
/svcmon/iostst/$hostnamenode1 and /svcmon/iostst/$hostnamenode2
For example:
ls /svcmon/iostats/v7001node1
Nd_stats_78xxxx-1_121123_142401 Nm_stats_78xxx-1_121123_144001 Nn_stats_78xxx-1_121123_145602
and so on....
I get Graphs for Vdisks and mdisks. Fine!
But i dont get anything for Node CPU busy...
I think the php script ist running :
php -q query_v7000_node_cpu.php v70001node1 index
1
Whats wrong?
Thanks Menne
i have implemented the Scripts and XMLs like written in the Post.
I changed some things for the node names. (if you have more than 1 v7000 node1 and node2 will be to few
The i have all files in:
/svcmon/iostst/$hostnamenode1 and /svcmon/iostst/$hostnamenode2
For example:
ls /svcmon/iostats/v7001node1
Nd_stats_78xxxx-1_121123_142401 Nm_stats_78xxx-1_121123_144001 Nn_stats_78xxx-1_121123_145602
and so on....
I get Graphs for Vdisks and mdisks. Fine!
But i dont get anything for Node CPU busy...
I think the php script ist running :
php -q query_v7000_node_cpu.php v70001node1 index
1
Whats wrong?
Thanks Menne
Who is online
Users browsing this forum: No registered users and 1 guest