Ad Widget

Collapse

Monitoring Tivoli Storage Manager with Zabbix

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thiago.info
    Junior Member
    • Feb 2008
    • 28

    #1

    Monitoring Tivoli Storage Manager with Zabbix

    Someone have already monitored TSM Server with Zabbix ? How can I do it ? Help!
  • hoyt
    Member
    • Aug 2007
    • 31

    #2
    Originally posted by thiago.info
    Someone have already monitored TSM Server with Zabbix ? How can I do it ? Help!

    Yes I monitor a TSM Server with Zabbix. What I did was write a Perl script the uses dsmadmc to gather up the data I want from TSM. Then I use zabbix_send to put the data into Zabbix. I then run the script from cron every 5 minutes.

    I have attached the script zabbix-tsm (uploaded as zabbix-tsm.txt). You will need to create the items in Zabbixs before running the script. You also need to setup a TSM account for the script.

    --John

    [Attachment removed due to errors]
    Last edited by hoyt; 12-02-2008, 19:04.

    Comment

    • thiago.info
      Junior Member
      • Feb 2008
      • 28

      #3
      Originally posted by hoyt
      Yes I monitor a TSM Server with Zabbix. What I did was write a Perl script the uses dsmadmc to gather up the data I want from TSM. Then I use zabbix_send to put the data into Zabbix. I then run the script from cron every 5 minutes.

      I have attached the script zabbix-tsm (uploaded as zabbix-tsm.txt). You will need to create the items in Zabbixs before running the script. You also need to setup a TSM account for the script.

      --John
      Hi hoyt, I don't know much about Perl, but I'll try to do this soon, thanks a lot for the reply!

      Best Regards,
      Thiago

      Comment

      • thiago.info
        Junior Member
        • Feb 2008
        • 28

        #4
        Originally posted by hoyt
        Yes I monitor a TSM Server with Zabbix. What I did was write a Perl script the uses dsmadmc to gather up the data I want from TSM. Then I use zabbix_send to put the data into Zabbix. I then run the script from cron every 5 minutes.

        I have attached the script zabbix-tsm (uploaded as zabbix-tsm.txt). You will need to create the items in Zabbixs before running the script. You also need to setup a TSM account for the script.

        --John
        A question, I need to create the items with the keys:
        tsm.session
        tsm.driveload
        tsm.libvol.scratch
        tsm.libvol.total
        tsm.libvol.private
        tsm.db.pctutil
        tsm.db.maxpctutil
        tsm.db.cachehit
        tsm.db.cachewait
        tsm.drm.offsite
        tsm.log.pctutil
        tsm.log.maxpctutil
        tsm.log.poolpctutil
        tsm.log.poolpctwait

        ? And what type I select ? Zabbix agent, Zabbix agente (active), etc ?

        Comment

        • hoyt
          Member
          • Aug 2007
          • 31

          #5
          Here is a template for the TSM items. Just import this template, then link it to the host that will be running the zabbix-tsm script.

          You will need to edit the script some. You will atleast need to update the TSM login/password information.

          --John
          Attached Files
          Last edited by hoyt; 12-02-2008, 19:05.

          Comment

          • thiago.info
            Junior Member
            • Feb 2008
            • 28

            #6
            Originally posted by hoyt
            Here is a template for the TSM items. Just import this template, then link it to the host that will be running the zabbix-tsm script.

            You will need to edit the script some. You will atleast need to update the TSM login/password information.

            --John
            I imported the items templates with no problem, the only problem is when I try to execute the script zabbix-tsm:

            [root@zabbix zabbix]# perl zabbix-tsm
            Global symbol "$DRMediaOffite" requires explicit package name at zabbix-tsm line 111.
            Global symbol "$DRMediaOffite" requires explicit package name at zabbix-tsm line 112.
            Global symbol "$DRMediaOffiteKey" requires explicit package name at zabbix-tsm line 256.
            Global symbol "$DRMediaOffite" requires explicit package name at zabbix-tsm line 256.
            Execution of zabbix-tsm aborted due to compilation errors.


            I've already changed the login/password in the script, the dsmadmc runs with no problem...only return the value 0, but this value is true...


            [root@zabbix zabbix]# dsmadmc -id=admin -pass=admin -dataonly=yes -comma "select count(state) from drmedia where location = 'OFFSITE'"
            0


            Above is the lines with errors, but I couldn't correct it, can you help me? please


            102 sub DRMediaInfo {
            103 my @tmp;
            104
            105 open( FOO, "dsmadmc -id=admin -pass=admin -dataonly=yes -comma "
            106 . "\"select count\(state\) from drmedia where location = 'OFFSITE'\" |" );
            107
            108 @tmp= <FOO>;
            109 close( FOO );
            110
            111 $DRMediaOffite = $tmp[1];
            112 chop( $DRMediaOffite );
            113
            114 }

            255 print DATA "$ZabbixServerIP $ReportingHost $ZabbixPort " .
            256 "$DRMediaOffiteKey $DRMediaOffite\n";
            257
            258 close( DATA );



            Thiago

            Comment

            • hoyt
              Member
              • Aug 2007
              • 31

              #7
              Try this version of the zabbix-tsm script.

              --John
              Attached Files

              Comment

              • thiago.info
                Junior Member
                • Feb 2008
                • 28

                #8
                Originally posted by hoyt
                Try this version of the zabbix-tsm script.

                --John
                Hey John, this version of the script returned no error, no output, and no value in Zabbix Itens, I believe that I have a problem with zabbix_sender...this is the first time that I use it.

                Do you know if don't have problem running it in the samer server as zabbix ?
                I tried running it to test:

                zabbix_sender -z 192.168.217.55 -p 10051 -s zabbix -k tsm.driveload -o 1 -v
                zabbix_sender [21159]: Warning: Incorrect answer from server [NOT OK]

                Comment

                • hoyt
                  Member
                  • Aug 2007
                  • 31

                  #9
                  Originally posted by thiago.info
                  Hey John, this version of the script returned no error, no output, and no value in Zabbix Itens, I believe that I have a problem with zabbix_sender...this is the first time that I use it.

                  Do you know if don't have problem running it in the samer server as zabbix ?
                  I tried running it to test:

                  zabbix_sender -z 192.168.217.55 -p 10051 -s zabbix -k tsm.driveload -o 1 -v
                  zabbix_sender [21159]: Warning: Incorrect answer from server [NOT OK]


                  The hostname for the '-s' option has to match Hostname parameter in the zabbix_agentd.conf file on the host where you are running zabbix_sender .

                  Is that set to 'zabbix'?

                  I run the script on our zabbix server.

                  --John

                  Comment

                  • thiago.info
                    Junior Member
                    • Feb 2008
                    • 28

                    #10
                    Originally posted by hoyt
                    The hostname for the '-s' option has to match Hostname parameter in the zabbix_agentd.conf file on the host where you are running zabbix_sender .

                    Is that set to 'zabbix'?

                    I run the script on our zabbix server.

                    --John
                    Yes, the same, maybe there is an specific conf in the zabbix_agentd.conf ?

                    Comment

                    • hoyt
                      Member
                      • Aug 2007
                      • 31

                      #11
                      Originally posted by thiago.info
                      Yes, the same, maybe there is an specific conf in the zabbix_agentd.conf ?
                      The Zabbix server has kinda of a odd setup in Zabbix out of the box. If you go and look at Configurtion->Host, and look for your Zabbix server entery. You will most likely find that the "name" of the Zabbix server does not match up with the "Hostname" parameter in the zabbix_agentd.conf file. I had to fixed this on our Zabbix server before I could get zabbix_sender to work.

                      --John

                      Comment

                      • thiago.info
                        Junior Member
                        • Feb 2008
                        • 28

                        #12
                        Originally posted by hoyt
                        The Zabbix server has kinda of a odd setup in Zabbix out of the box. If you go and look at Configurtion->Host, and look for your Zabbix server entery. You will most likely find that the "name" of the Zabbix server does not match up with the "Hostname" parameter in the zabbix_agentd.conf file. I had to fixed this on our Zabbix server before I could get zabbix_sender to work.

                        --John
                        Now its working perfectly, thanks a lot for this John, next I'll try to add / modify some checks in my TSM Server.

                        Comment

                        • LenR
                          Senior Member
                          • Sep 2009
                          • 1005

                          #13
                          So, where did the zabbix-tsm.txt script go?

                          Comment

                          • LenR
                            Senior Member
                            • Sep 2009
                            • 1005

                            #14
                            Never mind, yahoo search found it when google didn't.

                            Comment

                            • Peteris
                              Member
                              • Feb 2010
                              • 89

                              #15
                              This script seems to be for older version of TSM.

                              Is there a script for TSM 6.2?

                              Comment

                              Working...