hp 3par storage array templates

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

hp 3par storage array templates

Post by shanekennedy »

wasn't able to find any templates for hp's 3par storage arrays, so created some

the queries use the 3par CLI which is downloadable from hp & included in your 3par Inform OS cd's

these templates were created using: redhat 6.2, cacti 0.8.8.a, 3par CLI 3.1.1



extract contents of 3par_cacti.tgz

import cacti_host_template_3par.xml from web interface > console tab > import templates

move 3par.ksh & 3par-graph-tree-generator.ksh to <path_cacti>/scripts/

move 3par_ports.xml & 3par_vvols.xml to <path_cacti>/resource/script_queries/

chown cactiuser:users <path_cacti>/scripts/3par* <path_cacti>/resource/script_queries/3par*

chmod 755 <path_cacti>/scripts/3par*

if you do not plan to query with 1 minute intervals, update the TIMESTEP variable in <path_cacti>/scripts/3par.ksh to be the number of seconds of you query interval



install 3par CLI, it ships with 3par InForm OS package, or is downloadable from HP

this should install to /opt/3PAR/inform_cli_3.1.1, if not, the update CLI variable in <path_cacti>/scripts/3par.ksh

create a user/encrypted-password file for the 3par by running:

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up
chmod 600 /opt/3PAR/inform_cli_3.1.1/bin/up

chown cactiuser /opt/3PAR/inform_cli_3.1.1/bin/up

up is the output file, if you change the filename, update the TPDPWFILE variable in <path_cacti>/scripts/3par.ksh

verify your password file works without typing a password:

su – cactiuser

export TPDPWFILE=/opt/3PAR/inform_cli_3.1.1/bin/up

/opt/3PAR/inform_cli_3.1.1/bin/cli -sys YOUR_3PAR_HOSTNAME showsys –space # this should show capacity utilization




verify cacti poller script works:

<path_cacti>/scripts/3par.ksh YOUR_3PAR_HOSTNAME vvindex # this should list all you volumes




you probably have more than a handful of ports & volumes on your 3par so to avoid having to create graphs for multiple pages go to: cacti console > settings > visual (tab) > graph creation > data query graph rows > & set the value to 5000

add a new device in the cacti GUI for your 3par array using the 3par host template

go to the bottom of the device page for the 3par you just added & click on the verbose queries for the associated data queries to verify queries work. if the verbose queries fail to find your volumes & ports, wait 1 minute & try again

click on create-graphs-for-this-host in the cacti device window

select all the graph_templates, all the data queries for 3par_ports, and all the data queries for 3par_vols & hit the create button at the bottom of the page

make sure you don’t have multiple pages of volumes/ports, if you do, you need to go to each page and add graphs

after these graphs are created, go to the bottom of the data_query for 3par_ports on the same page & change stats3parPorts to stats3parPorts_IO_Size, select all the ports again & click the create button again, continue the method for stats3parPorts_IOPS, stats3parPorts_KBPS, & stats3parPorts_service_time




now that all the graphs are created, you’ll need to add them to the graph tree

just adding the device to the graph tree will place every graph under 1 heading & it will be impossible to find anything

i created a script to build a more organized graph tree, it works for me, but was a quick hack

modify the HOST & CACTIDIR variables in <path_cacti>/scripts/3par-tree-generator.ksh to be the hostname of your 3par array & the run the <path_cacti>/scripts/3par-tree-generator.ksh script once for each 3par array you have

the 2 times i ran this script it crapped out, but the 3rd time was a charm. couldn’t figure out why. if you have issues, cntrl-c to kill the script then go to cacti console > graph_trees > & delete the 3par tree. then re-run the tree-generator. if it works correctly the only output you should see is “adding XXX : added XXX”


note, my 3par has 4 nodes labeled node0/node1/node4/node5. i didn’t take the time to make the cpu data/graph,/data_input_method templates generic. so if you have more/less/differently-named nodes, you will need to update the cpu templates
Attachments
3par_cacti.tgz
templates for hp 3par storage array
(310 KiB) Downloaded 934 times
shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

Re: hp 3par storage array templates

Post by shanekennedy »

some screenshots
Attachments
3par3.jpg
3par3.jpg (70.56 KiB) Viewed 11681 times
3par1.jpg
3par1.jpg (68.97 KiB) Viewed 11681 times
3par2.jpg
3par2.jpg (135.81 KiB) Viewed 11681 times
User avatar
JamesHouse
Posts: 1
Joined: Wed Jun 12, 2013 9:49 pm
Location: Mobile, AL
Contact:

Re: hp 3par storage array templates

Post by JamesHouse »

Thank you very much! Just got a 3par 7200, and was disappointed with how little is provided via SNMP.
I made some changes to cacti_host_template_3par.xml to let it work on Cacti 0.8.7g.
Attachments
cacti_host_template_3par.xml
Same as Shane's template, except it works in 0.8.7g.
(281.04 KiB) Downloaded 669 times
intelic76
Posts: 4
Joined: Mon Jan 26, 2009 12:09 pm

Re: hp 3par storage array templates

Post by intelic76 »

Does this require that SNMP be working? I've yet to figure out snmp on the 3par bits.

I've gotten the scripts to return the data and such, and the verbose queries return data the Graphs and RRD data are not updating.

Any thoughts?
intelic76
Posts: 4
Joined: Mon Jan 26, 2009 12:09 pm

Re: hp 3par storage array templates

Post by intelic76 »

I also noticed the rrd "host" directory and its RRD's are not being created..
intelic76
Posts: 4
Joined: Mon Jan 26, 2009 12:09 pm

Re: hp 3par storage array templates

Post by intelic76 »

Finally got it to work by starting over... I think the only step I changed was when I imported host template (after changing permissions on the files etc..) either that, or when I chmod/chown'd I missed a step when I reran the commands numerous times..
greghaa
Posts: 1
Joined: Tue Apr 22, 2014 3:22 pm

Re: hp 3par storage array templates

Post by greghaa »

These 3par graphs look good. I have 2 7400's that have been installed and are working.

Problem I am seeing is that although everything is installing fine, scripts work, all looks good.
When I go to create the graphs it seems it is doing it, but nothing gets created on the filesystem.

I have re-installed and gone through the steps at least 5 or 6 times now deleting everything and starting again.

Any ideas why these won't create the graphs? Everything else I graph they are created fine with no issue.

I see a bunch of this in the apache error_log

Code: Select all

0E<!:B`W!*TA9v1#o9vw#6N!2|/=!7fAs!+(@3w:_piw/HW<!.(|=!E_L..."
    (file "/opt/3PAR/inform_cli_3.1.1/bin/cli/lib/application/../combined/cli.tbc" line 9)
    invoked from within
"source      $startup"
    (file "/opt/3PAR/inform_cli_3.1.1/bin/cli/main.tcl" line 35)
tail: write error: Broken pipe
tail: write error: Broken pipe
tail: write error: Broken pipe
error writing "stdout": broken pipe
    while executing
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "Tpd::GetUserPasswd" line 1)
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
    invoked from within
"tbcload::bceval {
TclPro ByteCode 2 0 1.7 8.4
136 0 1191 169 4 0 880 1 6 136 140 -1 -1
1191
w0E<!:B`W!*TA9v1#o9vw#6N!2|/=!7fAs!+(@3w:_piw/HW<!.(|=!E_L..."
    (file "/opt/3PAR/inform_cli_3.1.1/bin/cli/lib/application/../combined/cli.tbc" line 9)
    invoked from within
"source      $startup"
    (file "/opt/3PAR/inform_cli_3.1.1/bin/cli/main.tcl" line 35)
tail: write error: Broken pipe
ERROR: opening '/var/www/cacti/rra/35/810.rrd': No such file or directory
ERROR: opening '/var/www/cacti/rra/35/793.rrd': No such file or directory
garethhwilson
Posts: 1
Joined: Mon Feb 02, 2015 10:53 am

Re: hp 3par storage array templates

Post by garethhwilson »

I have followed the instructions but it is not generating any of the rrd files in the rra folder, what am i doing wrong ??

Thanks in advance
shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

Re: hp 3par storage array templates

Post by shanekennedy »

does the ksh script have executable permissions:

shkenn@cacti:/var/www/html/cacti/scripts> ls -l /var/www/html/cacti/scripts/3par.ksh
-rwxr-xr-x 1 cactiuser users 8177 May 6 2013 /var/www/html/cacti/scripts/3par.ksh*

is ksh installed:

shkenn@cacti:/var/www/html/cacti/scripts> rpm -qa | grep -i ksh
ksh-20100621-16.el6.x86_64
technique
Posts: 27
Joined: Wed Sep 07, 2016 10:23 am

Re: hp 3par storage array templates

Post by technique »

Hi,

I installed a cacti server on a Debian OS (Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux) and want to monitor my HP 3PAR SAN.

when I run this command I have an error :

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up 
The error is

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword: 2: /opt/3PAR/inform_cli_3.1.1/bin/setpassword: cli: not found 
HP 3PAR CLI 3.1.1 have been successfully installed. Everything is in the right folder : /opt/3PAR/inform_cli_3.1.1/

Any idea where the problem might be ?

Thanks in advance for helping me here.
shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

Re: hp 3par storage array templates

Post by shanekennedy »

technique wrote:Hi,

I installed a cacti server on a Debian OS (Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux) and want to monitor my HP 3PAR SAN.

when I run this command I have an error :

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up 
The error is

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword: 2: /opt/3PAR/inform_cli_3.1.1/bin/setpassword: cli: not found 
HP 3PAR CLI 3.1.1 have been successfully installed. Everything is in the right folder : /opt/3PAR/inform_cli_3.1.1/

Any idea where the problem might be ?

Thanks in advance for helping me here.

unsure what is causing your error

my inform directory (inform_cli_3.1.1) is linked to inform_cli in the same dir, unsure if this was done by the installer or manually

cacti:/opt/3PAR> ls -l
lrwxrwxrwx 1 root root 16 May 6 2013 inform_cli -> inform_cli_3.1.1/
drwxrwxr-x 9 root root 4096 Feb 27 2013 inform_cli_3.1.1/

if that is already in place you could try stracing the command & searching output for errors

just run the following:

strace /opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up

answer the questions & then parse the verbose output
technique
Posts: 27
Joined: Wed Sep 07, 2016 10:23 am

Re: hp 3par storage array templates

Post by technique »

shanekennedy wrote:
technique wrote:Hi,

I installed a cacti server on a Debian OS (Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux) and want to monitor my HP 3PAR SAN.

when I run this command I have an error :

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up 
The error is

Code: Select all

/opt/3PAR/inform_cli_3.1.1/bin/setpassword: 2: /opt/3PAR/inform_cli_3.1.1/bin/setpassword: cli: not found 
HP 3PAR CLI 3.1.1 have been successfully installed. Everything is in the right folder : /opt/3PAR/inform_cli_3.1.1/

Any idea where the problem might be ?

Thanks in advance for helping me here.

unsure what is causing your error

my inform directory (inform_cli_3.1.1) is linked to inform_cli in the same dir, unsure if this was done by the installer or manually

cacti:/opt/3PAR> ls -l
lrwxrwxrwx 1 root root 16 May 6 2013 inform_cli -> inform_cli_3.1.1/
drwxrwxr-x 9 root root 4096 Feb 27 2013 inform_cli_3.1.1/

if that is already in place you could try stracing the command & searching output for errors

just run the following:

strace /opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up

answer the questions & then parse the verbose output
Hi,

here are the answers

Code: Select all

CAC-PD01:/opt/3PAR# ls -l
total 4
drwxrwxr-x 9 root root 4096 Sep  7 13:41 inform_cli_3.1.1

Code: Select all

CAC-PD01:/# find . -name *cli
./usr/bin/nmcli
./usr/bin/mmcli
./usr/share/bug/php5-cli
./usr/share/doc/php5-cli
./usr/share/php5/php.ini-production.cli
./usr/share/php5/sapi/cli
./usr/share/bash-completion/completions/nmcli
./usr/share/lintian/overrides/php5-cli
./usr/share/cacti/cli
./opt/3PAR/inform_cli_3.1.1/bin/cli
./var/lib/php5/modules/cli
./sbin/wpa_cli
./etc/php5/cli
I ran the strace command and here the output.

Code: Select all

CAC-PD01:~# strace /opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up
execve("/opt/3PAR/inform_cli_3.1.1/bin/setpassword", ["/opt/3PAR/inform_cli_3.1.1/bin/s"..., "-saveonly", "-file", "/opt/3PAR/inform_cli_3.1.1/bin/u"...], [/* 14 vars */]) = 0
brk(0)                                  = 0x7f9a871ab000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a8669c000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=73992, ...}) = 0
mmap(NULL, 73992, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f9a86689000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f9a85eb5000
mprotect(0x7f9a86057000, 2093056, PROT_NONE) = 0
mmap(0x7f9a86256000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f9a86256000
mmap(0x7f9a8625c000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f9a8625c000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a86688000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a86687000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f9a86686000
arch_prctl(ARCH_SET_FS, 0x7f9a86687700) = 0
mprotect(0x7f9a86256000, 16384, PROT_READ) = 0
mprotect(0x7f9a8669e000, 12288, PROT_READ) = 0
mprotect(0x7f9a86480000, 4096, PROT_READ) = 0
munmap(0x7f9a86689000, 73992)           = 0
getpid()                                = 5544
rt_sigaction(SIGCHLD, {0x7f9a86494fd0, ~[RTMIN RT_1], SA_RESTORER, 0x7f9a85eea0e0}, NULL, 8) = 0
geteuid()                               = 0
brk(0)                                  = 0x7f9a871ab000
brk(0x7f9a871cc000)                     = 0x7f9a871cc000
getppid()                               = 5541
stat("/root", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("/opt/3PAR/inform_cli_3.1.1/bin/setpassword", O_RDONLY) = 3
fcntl(3, F_DUPFD, 10)                   = 10
close(3)                                = 0
fcntl(10, F_SETFD, FD_CLOEXEC)          = 0
rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x7f9a86494fd0, ~[RTMIN RT_1], SA_RESTORER, 0x7f9a85eea0e0}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f9a85eea0e0}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f9a85eea0e0}, NULL, 8) = 0
read(10, "#!/bin/sh\ncli setpassword \"$@\"\n", 8192) = 31
stat("/opt/3PAR/inform_cli_3.1.1/bin//cli", {st_mode=S_IFREG|0775, st_size=2581354, ...}) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f9a866879d0) = 5545
wait4(-1, system:
Then the strace hangs.

then I hit enter few times and this happened

Code: Select all

wait4(-1, system:

user:
password:
Could not open connection to CLI server process on "":
        -sockssl option not supported, libtls not loaded
System name may be invalid, or the process may not have started yet
or may have failed.
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 5545
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5545, si_uid=0, si_status=1, si_utime=10, si_stime=1} ---
rt_sigreturn()                          = 5545
read(10, "", 8192)                      = 0
exit_group(1)                           = ?
+++ exited with 1 +++
What system info do I put ? 3PAR ?
What about user:pass ? are they valid credentials on my 3PAR system or just new ones
shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

Re: hp 3par storage array templates

Post by shanekennedy »

you don't have the soft link in /opt, unsure if it matter but to add it run:

ln -s /opt/3PAR/inform_cli_3.1.1 /opt/3PAR/inform_cli

then try again to run:

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up

if that fails run strace on the above command

when it prompts for system, enter the hostname of your 3par & the a username/password for an administrative account
technique
Posts: 27
Joined: Wed Sep 07, 2016 10:23 am

Re: hp 3par storage array templates

Post by technique »

shanekennedy wrote:you don't have the soft link in /opt, unsure if it matter but to add it run:

ln -s /opt/3PAR/inform_cli_3.1.1 /opt/3PAR/inform_cli

then try again to run:

/opt/3PAR/inform_cli_3.1.1/bin/setpassword -saveonly -file /opt/3PAR/inform_cli_3.1.1/bin/up

if that fails run strace on the above command

when it prompts for system, enter the hostname of your 3par & the a username/password for an administrative account
The command worked but I have an issue about libtls not being loaded

Code: Select all

Could not open connection to CLI server process on "HP3PARQC":
        -sockssl option not supported, libtls not loaded
System name may be invalid, or the process may not have started yet
or may have failed.
I ran this install command

Code: Select all

apt-get install libssl1.0.0
It's already there
shanekennedy
Posts: 45
Joined: Tue Oct 10, 2006 10:35 am

Re: hp 3par storage array templates

Post by shanekennedy »

if you're running selinux, disable it & try again
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests