Ad Widget

Collapse

HP P2000 G3 monitoring (Zabbix 2.0)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Emir Imamagic
    Member
    • Mar 2008
    • 67

    #16
    Originally posted by scr512
    Yes, this is set in server config as well... no joy.
    How long do scripts take to execute:
    Code:
    time ./hp-msa.pl <HOSTNAME>
    time ./hp-msa.pl <HOSTNAME> stats

    Comment

    • scr512
      Junior Member
      • Jul 2012
      • 7

      #17
      Originally posted by Emir Imamagic
      How long do scripts take to execute:
      Code:
      time ./hp-msa.pl <HOSTNAME>
      time ./hp-msa.pl <HOSTNAME> stats
      Under 30 seconds to be sure
      Code:
      time ./hp-msa.pl jckp2k-1a.rac.acl 
      
      real	0m5.440s
      user	0m0.634s
      sys	0m0.038s
      
      time ./hp-msa.pl jckp2k-1a.rac.acl stats
      0
      
      real	0m7.793s
      user	0m0.496s
      sys	0m0.037s
      Maybe I should be using a newer version of Zabbix 2?
      Code:
      /usr/local/sbin/zabbix_server --version
      
      Zabbix server v2.0.0 (revision 27675) (21 May 2012)
      Compilation time: Jul 16 2012 08:39:11
      Last edited by scr512; 19-07-2012, 15:21.

      Comment

      • scr512
        Junior Member
        • Jul 2012
        • 7

        #18
        Originally posted by scr512
        Under 30 seconds to be sure
        Code:
        time ./hp-msa.pl jckp2k-1a.rac.acl 
        
        real	0m5.440s
        user	0m0.634s
        sys	0m0.038s
        
        time ./hp-msa.pl jckp2k-1a.rac.acl stats
        0
        
        real	0m7.793s
        user	0m0.496s
        sys	0m0.037s
        Maybe I should be using a newer version of Zabbix 2?
        Code:
        /usr/local/sbin/zabbix_server --version
        
        Zabbix server v2.0.0 (revision 27675) (21 May 2012)
        Compilation time: Jul 16 2012 08:39:11
        I think I got this working... being the idiot that I am... I failed to notice that my Zabbix server and agentd configuration files were located in /usr/local/etc rather than /etc/zabbix

        Once I copied my configuration files over proper things now appear to be working.

        Comment

        • meduzalt
          Junior Member
          Zabbix Certified Specialist
          • Mar 2012
          • 7

          #19
          Hello,

          I see it is good solution to monitor HP MSA, but I have problem with perl script.
          I have Zabbix 2.0.0 server, and want to monitor MSA 2324sa

          I've got error when execute:
          Code:
          ./hp-msa.pl FQDN stats 
          Not a HASH reference at ./hp-msa.pl line 60
          or
          Code:
          ./hp-msa.pl FQDN
          Not a HASH reference at ./hp-msa.pl line 33
          I dont understant what is wrong and cant find reference.
          Thanks

          Comment

          • thesubmitter
            Member
            • Feb 2012
            • 42

            #20
            Having the same error here on a self compiled 2.0 install running debian squeeze and on msa g2 2312i

            Originally posted by meduzalt
            Hello,

            I see it is good solution to monitor HP MSA, but I have problem with perl script.
            I have Zabbix 2.0.0 server, and want to monitor MSA 2324sa

            I've got error when execute:
            Code:
            ./hp-msa.pl FQDN stats 
            Not a HASH reference at ./hp-msa.pl line 60
            or
            Code:
            ./hp-msa.pl FQDN
            Not a HASH reference at ./hp-msa.pl line 33
            I dont understant what is wrong and cant find reference.
            Thanks

            Comment

            • meduzalt
              Junior Member
              Zabbix Certified Specialist
              • Mar 2012
              • 7

              #21
              Originally posted by thesubmitter
              Having the same error here on a self compiled 2.0 install running debian squeeze and on msa g2 2312i
              I have the same Debian Squeeze
              Maybe it is related with Debian and Perl v5.10.1 (*) built for x86_64-linux-gnu-thread-multi
              In some Forums it was noticed that after Perl upgraded from <5.10 to 5.10 appeared such error:
              Not a HASH reference at
              as alternative need test with another Perl version, but dont know how. Need Googling.

              Comment

              • i.kulagin
                Member
                • Aug 2011
                • 35

                #22
                I've got this error in zabbix-server.log:
                item [msa2000:hp-msa.pl["{HOST.DNS1}","stats"]] became not supported: Received value [] is not suitable for value type [Numeric (unsigned)] and data type [Decimal]
                But the /var/tmp/zabbixSenderHPP2000_* file is not empty and contains some usefull infomation. Is it possible that the problem with a perl parser? The script produced an error and asked about missing /usr/local/share/perl/5.14.2/XML/SAX/ParserDetails.ini. I have copied sample ParserDetails.ini from /etc/perl/XML/SAX/. Now it looks like this: Is it alright?
                Does anyone have any other suggestions about how to solve the problem?
                ----
                Ubuntu 12.04, zabbix 2.0.1.
                Last edited by i.kulagin; 02-08-2012, 10:27.

                Comment

                • i.kulagin
                  Member
                  • Aug 2011
                  • 35

                  #23
                  Hm, I think it's not the script problem.
                  I tried to send a file with the collected information (/var/tmp/zabbixSender*) to zabbix-server with zabbix_sender like this:
                  Code:
                  zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -i /var/tmp/zabbixSenderHPP2000_HostName_291
                  3
                  And I've got a response:
                  Code:
                  info from server: "Processed 0 Failed 60 Total 60 Seconds spent 0.002145"
                  sent: 60; skipped: 0; total: 60
                  zabbix-server.log says:
                  Code:
                  {
                                          "host":"HOSTNAME",
                                          "key":"hp.p2000.stats[Volume,Backup_1,iops]",
                                          "value":"0"},
                                  {
                                          "host":"HOSTNAME",
                                          "key":"hp.p2000.stats[Volume,Backup_1,bytes-per-second-numeric]",
                                          "value":"5120"},
                                  {
                                          "host":"HOSTNAME",
                                          "key":"hp.p2000.stats[Volume,Backup_1,data-written-numeric]",
                                          "value":"82499759616"}]}] len 7896
                    
                    3330:20120802:172313.391 In recv_agenthistory()
                    3330:20120802:172313.391 In process_hist_data()
                    3330:20120802:172313.392 In process_mass_data()
                    3330:20120802:172313.392 End of process_mass_data()
                    3330:20120802:172313.393 End of process_hist_data():SUCCEED
                    3330:20120802:172313.393 In zbx_send_response()
                    3330:20120802:172313.393 zbx_send_response() '{
                          "response":"success",
                          "info":"Processed 0 Failed 60 Total 60 Seconds spent 0.001607"}'
                    3330:20120802:172313.393 End of zbx_send_response():SUCCEED
                    3330:20120802:172313.393 End of recv_agenthistory()
                    3354:20120802:172313.397 In collect_selfmon_stats()
                    3354:20120802:172313.397 End of collect_selfmon_stats()
                    3354:20120802:172313.397 sleeping for 1 seconds
                    3330:20120802:172313.956 Trapper got [] len 0
                    3351:20120802:172314.277 sleeping for 1 sec
                  I have no idias why Processed 0 Failed 60. Can anybody help please?

                  Comment

                  • thesubmitter
                    Member
                    • Feb 2012
                    • 42

                    #24
                    given that there is no show controller statistics command on the G2 I am gonna say it doesn't work on the G2

                    Comment

                    • i.kulagin
                      Member
                      • Aug 2011
                      • 35

                      #25
                      So, I have solved some problems by reimporting the template. Now I can successfully send data from files, generated with the script, to zabbix-server with zabbix_sender. I can see item values, graphs etc in the latest data. But still no luck with external checks - data receiving is very unstable. When I run the script with hp-msa.pl HOSTNAME I get
                      Code:
                      {
                         "data" : []
                      }
                      or
                      Code:
                      Authentication Unsuccessful at /etc/zabbix/externalscripts/hp-msa.pl line 126.
                      Last error may be related with the small period of time between script launches, so I do not consider it as a problem. But the first error is really bothers me. I suggest, I should see an output, like in the file /var/tmp/zabbixSender*. Am I right? Can anyone with working configuration tell me, what the correct output is.
                      Thanks.

                      Comment

                      • i.kulagin
                        Member
                        • Aug 2011
                        • 35

                        #26
                        It seems that problem has been solved with the upgrade of P2000 firmware to the latest version. Emir Imamagic, thanks again for share the script.

                        Comment

                        • elvar
                          Senior Member
                          • Feb 2008
                          • 226

                          #27
                          The script appears to be succeeding in my zabbix_proxy.log but I'm not seeing anything populated in the latest data area. Any suggestions?

                          Comment

                          • prem
                            Junior Member
                            • Nov 2012
                            • 1

                            #28
                            Running CentOS 6.3 x86_64 with perl-5.10.1-127.el6.x86_64 hp-msa.pl returns the following error:

                            syntax error at line 1, column 0, byte 0 at /usr/lib64/perl5/XML/Parser.pm line 187

                            It would be great if someone could help me please. Thanks!

                            Comment

                            • dima_dm
                              Senior Member
                              • Dec 2009
                              • 2697

                              #29
                              Zabbix_sender 2.0.3
                              /usr/local/bin/zabbix_sender.old -c /etc/zabbix/zabbix_agentd.conf -i /tmp/zabbixSenderHPP2000_VMware_Array_16901 1>test1.txt
                              cat test1.txt
                              info from server: "Processed 36 Failed 0 Total 36 Seconds spent 0.000587"
                              sent: 36; skipped: 0; total: 36

                              Zabbix_sender 2.0.5
                              /usr/local/bin/zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -i /tmp/zabbixSenderHPP2000_VMware_Array_16901 1>test.txt
                              cat test.txt
                              sent: 36; skipped: 0; total: 36

                              Don’t print Zabbix_sender 2.0.5 in stdout string “info from server: "Processed 36 Failed 0 Total 36 Seconds spent 0.000587"

                              Patch for script
                              Code:
                              diff zabbix_hp_msa.pl.old zabbix_hp_msa.pl
                              13c13
                              < my $zabbixSendCommand="$zabbixSender -c $zabbixConfd -i ";
                              ---
                              > my $zabbixSendCommand="$zabbixSender -vv -c $zabbixConfd -i ";
                              167c167
                              <     $zabbixSendCommand .= $sendFile;
                              ---
                              >     $zabbixSendCommand .= $sendFile." 2>&1";
                              Last edited by dima_dm; 07-03-2013, 08:29.

                              Comment

                              • dima_dm
                                Senior Member
                                • Dec 2009
                                • 2697

                                #30
                                Originally posted by i.kulagin
                                I have no idias why Processed 0 Failed 60. Can anybody help please?
                                You must check name of host in zabbix and "HostName". This name is case sensitive.

                                Comment

                                Working...