Ad Widget

Collapse

Template for HP MSA 2040 (external check)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • varnav
    Member
    • Jul 2009
    • 36

    #16
    I've published it with fixes to Zabbix Share:

    The Zabbix Team has collected all official Zabbix monitoring templates and integrations.

    Comment

    • kobe
      Junior Member
      • Mar 2016
      • 5

      #17
      Originally posted by michael.weber
      Please check the Server logs. In my logs i can see that sometimes to execution time for the script just to high and zabbix kills it. Can you check this?
      Hi, I met below issue while I run hp-msa.pl, would you please help me to confirm what happened? Thanks.

      [root@ externalscripts]# perl /usr/local/zabbix/share/zabbix/externalscripts/hp-msa.pl [IP address] data enclosure 2 health

      mismatched tag at line 9, column 2, byte 186 at /usr/lib64/perl5/XML/Parser.pm line 187

      Comment

      • tikondrus
        Member
        • Jan 2011
        • 36

        #18
        with latest version i have some errors.
        1)
        Code:
        # /usr/lib/zabbix/externalscripts/hp-msa.pl msa2000-1 manage !manage lld
        [B]bash: !manage: event not found[/B]
        but !manage - is default password. i cant use this script without changing password.

        when i changed password it works:

        Code:
        # /usr/lib/zabbix/externalscripts/hp-msa.pl msa2000-1 manage Manage123 lld controller
        {
           "data" : [
              {
                 "{#KEY}" : "A",
                 "{#CLASS}" : "Controller"
              },
              {
                 "{#KEY}" : "B",
                 "{#CLASS}" : "Controller"
              }
           ]
        }
        2) but in msa2040 does't work
        # /usr/lib/zabbix/externalscripts/hp-msa.pl msa2400-1 manage Manage123 lld controller
        Unsuccessful stat on filename containing newline at /usr/local/share/perl5/XML/Simple.pm line 950.
        Unsuccessful stat on filename containing newline at /usr/local/share/perl5/XML/Simple.pm line 963.
        File does not exist: Can't connect to msa2400-1:443

        Name or service not known at /usr/share/perl5/LWP/Protocol/http.pm line 51.
        at /usr/lib/zabbix/externalscripts/hp-msa.pl line 109.



        3) old version create very usefull graphs but this version doesn't.

        Template_HP_P2000_G3: {#HP_P2000_TYPE} {#HP_P2000_ID} IOPS
        Template_HP_P2000_G3: {#HP_P2000_TYPE} {#HP_P2000_ID} Transfer Rate

        Comment

        • varnav
          Member
          • Jul 2009
          • 36

          #19
          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

          Comment

          • tikondrus
            Member
            • Jan 2011
            • 36

            #20
            API not availe via HTTPS.

            Template_HP_P2000_G3 support MSA2040.

            Comment

            • s.vasilyev
              Junior Member
              • Mar 2016
              • 1

              #21
              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?

              Comment

              • michael.weber
                Senior Member
                • Nov 2015
                • 121

                #22
                Originally posted by varnav
                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.

                Comment

                • varnav
                  Member
                  • Jul 2009
                  • 36

                  #23
                  Originally posted by s.vasilyev
                  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

                  Comment

                  • pasik007
                    Junior Member
                    • Mar 2016
                    • 4

                    #24
                    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

                    Comment

                    • michael.weber
                      Senior Member
                      • Nov 2015
                      • 121

                      #25
                      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

                      Comment

                      • varnav
                        Member
                        • Jul 2009
                        • 36

                        #26
                        try:

                        yum install perl-LWP-Protocol-https

                        Comment

                        • pasik007
                          Junior Member
                          • Mar 2016
                          • 4

                          #27
                          solved problem with perl env https

                          Originally posted by varnav
                          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 Files
                          Last edited by pasik007; 01-04-2016, 08:51.

                          Comment

                          • michael.weber
                            Senior Member
                            • Nov 2015
                            • 121

                            #28
                            that is a good hint. i raised my timeouts to 20 sek

                            Comment

                            • varnav
                              Member
                              • Jul 2009
                              • 36

                              #29
                              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.

                              Comment

                              • pasik007
                                Junior Member
                                • Mar 2016
                                • 4

                                #30
                                Originally posted by varnav
                                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, 11:23.

                                Comment

                                Working...