ZABBIX Forums  
  #21  
Old 25-03-2016, 17:44
s.vasilyev s.vasilyev is offline
Junior Member
 
Join Date: Mar 2016
Posts: 1
Default

hi, thanks for the script, i've changing it to /sbin/perl and getting following error when running it manually:

root@VM-Zabbix:/usr/lib/zabbix/externalscripts# ./hp-msa.pl 10.10.10.10 zabbix zabbixpass
Use of uninitialized value $ARGV[4] in string eq at ./hp-msa.pl line 120.
Use of uninitialized value $ARGV[4] in string eq at ./hp-msa.pl line 123.
Use of uninitialized value $ARGV[4] in string eq at ./hp-msa.pl line 126.
Use of uninitialized value $ARGV[4] in string eq at ./hp-msa.pl line 129.
Use of uninitialized value $ARGV[4] in string eq at ./hp-msa.pl line 132.
{
"data" : []
}

do i really need to install speedycgi for ubuntu 14.04 to run it withour errors?
Reply With Quote
  #22  
Old 29-03-2016, 08:52
michael.weber michael.weber is offline
Member
 
Join Date: Nov 2015
Posts: 81
Default

Quote:
Originally Posted by varnav View Post
1) You can't use symbol '!' in command line just like that
2) Is your API available via HTTPS?
3) MSA2040 script does not seem to support that, I'm looking for a solution too
correct. this is using bash for command execution and "!" is reserved for some "Special commands" this Symbol can not be used.
Reply With Quote
  #23  
Old 29-03-2016, 10:02
varnav varnav is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Quote:
Originally Posted by s.vasilyev View Post
do i really need to install speedycgi for ubuntu 14.04 to run it withour errors?
You have specified IP, username and password, but have not specified any other arguments.

Try hp-msa.pl <host> <user> <password> lld controller
Reply With Quote
  #24  
Old 30-03-2016, 18:21
pasik007 pasik007 is offline
Junior Member
 
Join Date: Mar 2016
Posts: 4
Default Problem with script

Hi,
I have install Zabbix Server 3.0.1, and perl to run scripts hp-msa.pl

Install packages:

yum install perl
yum install perl-CGI-SpeedyCGI-2.22-16.el7.1.x86_64.rpm
yum install perl-libwww-perl-6.05-2.el7.noarch.rpm
yum install perl-CPAN

add ./bashrc

export PERL_LOCAL_LIB_ROOT="$PERL_LOCAL_LIB_ROOT:/root/perl5";
export PERL_MB_OPT="--install_base /root/perl5";
export PERL_MM_OPT="INSTALL_BASE=/root/perl5";
export PERL5LIB="/root/perl5/lib/perl5:$PERL5LIB";
export PATH="/root/perl5/bin:$PATH";

perl -MCPAN -e 'install LWP::Protocol::https'
yum install perl-XML-Simple
yum install perl-JSON

Zabbix Server LOGS : DEBUG 5

21381:20160330:171526.168 query [txnlev:1] [update items set error='Received value [Can\'t locate LWP/Protocol/https.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.BEGIN failed--compilation aborted at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.speedy_backend[25065]: perl_parse errorspeedy[25054]: Cannot spawn backend process] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]' where itemid=28522;
21211:20160330:171526.247 In substitute_key_macros() data:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "health"]'
21211:20160330:171526.254 End of substitute_key_macros():SUCCEED data:'hp-msa.pl[10.0.149.102,monitor,Monitorbtuu1,"data", "vdisk", dgA06, "health"]'
21211:20160330:171526.254 In get_value() key:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "health"]'
21211:20160330:171526.255 In get_value_external() key:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "health"]'
21211:20160330:171526.255 In zbx_popen() command:'/etc/zabbix/scripts/externalscripts/hp-msa.pl "10.0.149.102" "monitor" "Monitorbtuu1" "data" "vdisk" "dgA06" "health"'
21253:20160330:171527.429 In substitute_key_macros() data:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB05, "health"]'
21253:20160330:171527.430 End of substitute_key_macros():SUCCEED data:'hp-msa.pl[10.0.149.102,monitor,Monitorbtuu1,"data", "vdisk", dgB05, "health"]'
21253:20160330:171527.430 In get_value() key:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB05, "health"]'
21253:20160330:171527.430 In get_value_external() key:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB05, "health"]'
21253:20160330:171527.430 In zbx_popen() command:'/etc/zabbix/scripts/externalscripts/hp-msa.pl "10.0.149.102" "monitor" "Monitorbtuu1" "data" "vdisk" "dgB05" "health"'
21250:20160330:171527.730 Item [HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA04, "freespace-numeric"]] error: Received value [Can't locate LWP/Protocol/https.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.BEGIN failed--compilation aborted at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.speedy_backend[25068]: perl_parse errorspeedy[25057]: Cannot spawn backend process] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
21385:20160330:171528.173 error reason for "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA04, "freespace-numeric"]" changed: Received value [Can't locate LWP/Protocol/https.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.BEGIN failed--compilation aborted at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.speedy_backend[25068]: perl_parse errorspeedy[25057]: Cannot spawn backend process] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
21385:20160330:171528.173 query [txnlev:1] [update items set error='Received value [Can\'t locate LWP/Protocol/https.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.BEGIN failed--compilation aborted at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.speedy_backend[25068]: perl_parse errorspeedy[25057]: Cannot spawn backend process] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]' where itemid=28523;
21179:20160330:171528.863 In substitute_key_macros() data:'hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA03, "health"]'

....................................
Can\'t locate LWP/Protocol/https.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.BEGIN failed--compilation aborted at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 6.speedy_backend[25068]: perl_parse errorspeedy[25057]: Cannot spawn backend process] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]' where itemid=28523;
.......................................

Please help solve the problem.
Regards
Peter
Reply With Quote
  #25  
Old 31-03-2016, 09:16
michael.weber michael.weber is offline
Member
 
Join Date: Nov 2015
Posts: 81
Default

i am not that familiar with the https Change.
But the first issue seems to be the https for perl:
Code:
Can\'t locate LWP/Protocol/https.pm in
I think this one Needs to be solved first.
Can you execute the the hp-msa.pl script on commandline first?

Code:
./hp-msa.pl <ip>lld Controller
please come back with the result
Reply With Quote
  #26  
Old 31-03-2016, 12:07
varnav varnav is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

try:

yum install perl-LWP-Protocol-https
Reply With Quote
  #27  
Old 01-04-2016, 00:59
pasik007 pasik007 is offline
Junior Member
 
Join Date: Mar 2016
Posts: 4
Default solved problem with perl env https

Quote:
Originally Posted by varnav View Post
try:

yum install perl-LWP-Protocol-https
Thanks
when I installed the package the problem was solved, but I have another problem:
in server logs there are many time limits when script is executed.

I set value Timeout=30 in zabbix_server.conf
Attached Images
 

Last edited by pasik007; 01-04-2016 at 09:51.
Reply With Quote
  #28  
Old 01-04-2016, 11:02
michael.weber michael.weber is offline
Member
 
Join Date: Nov 2015
Posts: 81
Default

that is a good hint. i raised my timeouts to 20 sek
Reply With Quote
  #29  
Old 01-04-2016, 12:08
varnav varnav is offline
Member
 
Join Date: Jul 2009
Posts: 36
Default

Anyway MSA2040 doesn't seem to be able to handle many queries at once. I've tried to balance queries between 2 contollers but that did not help.
HPE support is not willing to help with this.
Reply With Quote
  #30  
Old 01-04-2016, 12:21
pasik007 pasik007 is offline
Junior Member
 
Join Date: Mar 2016
Posts: 4
Default

Quote:
Originally Posted by varnav View Post
Anyway MSA2040 doesn't seem to be able to handle many queries at once. I've tried to balance queries between 2 contollers but that did not help.
HPE support is not willing to help with this.

Server logs:

3171:20160401:084719.218 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "enclosure", 1, "status"]" became not supported: Timeout while executing a shell script.
3171:20160401:084719.218 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.16, "status"]" became not supported: Timeout while executing a shell script.
3171:20160401:084719.325 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB05, "freespace-numeric"]" became not supported: Received value [File does not exist: Can't connect to 10.0.149.102:443Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51. at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 56] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
3171:20160401:084720.784 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.12, "health"]" became not supported: Timeout while executing a shell script.
3171:20160401:084720.784 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB02, "freespace-numeric"]" became not supported: Received value [File does not exist: Can't connect to 10.0.149.102:443Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51. at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 109] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
3174:20160401:084723.880 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.14, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084724.892 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.07, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084725.912 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "freespace-numeric"]" became not supported: Received value [File does not exist: Can't connect to 10.0.149.102:443Connection refused at /usr/share/perl5/LWP/Protocol/http.pm line 51. at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 56] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
3174:20160401:084725.912 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "volume", ASM_PROD_DATA_01, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084726.925 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA05, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084726.925 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.10, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084729.947 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.22, "status"]" became not supported: Timeout while executing a shell script.
3172:20160401:084730.961 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA02, "freespace-numeric"]" became not supported: Received value [File does not exist: Can't connect to 10.0.149.102:443Connection reset by peer at /usr/share/perl5/LWP/Protocol/http.pm line 51. at /etc/zabbix/scripts/externalscripts/hp-msa.pl line 109] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
3174:20160401:084731.963 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.05, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084731.964 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB03, "freespace-numeric"]" became not supported: Timeout while executing a shell script.
3171:20160401:084732.075 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "volume", Backup_MYSQL_ZABBIX_01, "health"]" became not supported: Timeout while executing a shell script.
3173:20160401:084734.074 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.08, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084734.993 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "volume", ASM_TEST_ARCH_01, "health"]" became not supported: Timeout while executing a shell script.
3172:20160401:084735.999 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.21, "status"]" became not supported: Timeout while executing a shell script.
3172:20160401:084735.999 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.15, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084737.014 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB04, "freespace-numeric"]" became not supported: Timeout while executing a shell script.
3172:20160401:084739.025 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "health"]" became supported
3172:20160401:084740.037 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "status"]" became not supported: Timeout while executing a shell script.
3172:20160401:084740.037 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.02, "status"]" became not supported: Timeout while executing a shell script.
3172:20160401:084741.050 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA01, "health"]" became supported
3172:20160401:084741.050 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.12, "status"]" became not supported: Timeout while executing a shell script.
3173:20160401:084743.098 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB02, "health"]" became supported
3172:20160401:084744.103 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.20, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084745.115 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB02, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084745.115 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA01, "status"]" became not supported: Timeout while executing a shell script.
3172:20160401:084746.126 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA06, "status"]" became supported
3173:20160401:084747.126 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA04, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084748.130 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB04, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084748.130 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA03, "status"]" became supported
3171:20160401:084750.145 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB03, "status"]" became supported
3173:20160401:084752.154 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_01.10, "status"]" became not supported: Timeout while executing a shell script.
3173:20160401:084752.154 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgB04, "status"]" became supported
3174:20160401:084754.164 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "volume", Zabbix_DBData_01, "health"]" became not supported: Timeout while executing a shell script.
3174:20160401:084754.164 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.11, "status"]" became not supported: Timeout while executing a shell script.
3171:20160401:084755.175 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "vdisk", dgA05, "status"]" became supported
3173:20160401:084756.282 item "HP MSA 2040 W:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "disk", disk_02.18, "status"]" became not supported: Timeout while executing a shell script.
3174:20160401:084758.191 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "enclosure", 1, "enclosure-power"]" became supported
3173:20160401:084758.347 item "HP MSA 2040 B:hp-msa.pl[{$MSA1},{$USER},{$PASSWORD},"data", "enclosure", 2, "health"]" became supported

OK, how can I solve this problem?

Last edited by pasik007; 01-04-2016 at 12:23.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:01.