Ad Widget

Collapse

IT Services SLA (Service Times)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dr_sybourg
    Junior Member
    • Jun 2016
    • 5

    #1

    IT Services SLA (Service Times)

    Hello,

    We run Zabbix 3.01 in our environment, I'm currently setting up some IT Services to enable some KPI's to be reported on.

    My question is:

    Reading the documentation it would seem that Service times have to be set at each item level, so for example we have:

    Infrastructure Key Systems
    --File Services
    ---File Server A Availability
    ---File Server B Availability

    Do I need to set Service Times like so:

    Infrastructure Key Systems (set service time here)
    --File Services (set service time here)
    ---File Server A Availability (set service time here)
    ---File Server B Availability (set service time here)

    Also is there anyway of scripting the Service times as we run a Monday to Friday 08:00 -- 17:30 SLA which can be very time consuming to manually enter into each item.

    Thanks in advance

    Dr.
  • tatapoum
    Senior Member
    • Jan 2014
    • 185

    #2
    Hi,
    The IT Service configuration view is really a pain... I can provide you with a bunch of ruby scripts using the API to simplify the configuration (copy service times or SLA, propagate service times, etc).

    Comment

    • dr_sybourg
      Junior Member
      • Jun 2016
      • 5

      #3
      Hi Tatapoum,

      Thanks for the reply!

      That would be really useful, thanks.

      Could you PM me your details?

      Dr.

      Comment

      • tatapoum
        Senior Member
        • Jan 2014
        • 185

        #4
        You can use these scripts :
        Contribute to dav3860/zabbix_api_scripts development by creating an account on GitHub.


        They make use of an updated version of the Zabby gem (to support IT services). So, run "bundle" to install the required gems and configure the ~/.zabbyrc file with your Zabbix server configuration (see https://github.com/Pragmatic-Source/zabby).

        Comment

        • dr_sybourg
          Junior Member
          • Jun 2016
          • 5

          #5
          Hello,

          Sorry it has taken a long time to reply!

          When running the following:

          [root@ZABBIX02 bin]# ./zabbysh --rcfile /etc/zabbix/zabby/zby/zabbyrc --extra-file /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby --source "Email" --destination "VSphere"

          We get this error:

          ERROR: invalid option: --source.
          Usage: zabbysh [zabbysh options] [script [script options]]

          Am I missing something simple here?

          Comment

          • tatapoum
            Senior Member
            • Jan 2014
            • 185

            #6
            Create a ~/.zabbyrc file and start the script with :
            Code:
            /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby --source "Email" --destination "VSphere"

            Comment

            • dr_sybourg
              Junior Member
              • Jun 2016
              • 5

              #7
              Hello,

              We still keep seeing the same error, below is an example of the output and the pre req steps:

              zabby> loggedin?
              => true
              zabby> /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby --source "Email" --destination "VSphere"
              Exception SyntaxError -> (eval):1: unknown regexp options - zabb
              (eval):1: syntax error, unexpected unary-, expecting end-of-input
              ...ervices/copy_time_periods.zby --source "Email" --destination...
              ... ^
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:79:in `eval'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:79:in `execute'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:70:in `block in shell'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:63:in `loop'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:63:in `shell'
              /etc/zabbix/zabby/zby/bin/zabbysh:106:in `<main>'
              zabby> exit
              [root@INF-MGTZABBIX02 bin]# /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby --source "Email" --destination "VSphere"
              This script will copy a Zabbix IT service time periods to another IT service.
              Exception NameError -> uninitialized constant Zabby::Runner::Service
              /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby:27:in `run'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:48:in `instance_eval'
              /etc/zabbix/zabby/zby/lib/zabby/runner.rb:48:in `run'
              /etc/zabbix/zabby/zby/bin/zabbysh:88:in `block in <main>'
              /etc/zabbix/zabby/zby/bin/zabbysh:83:in `each'
              /etc/zabbix/zabby/zby/bin/zabbysh:83:in `<main>'
              [root@INF-MGTZABBIX02 bin]#

              Comment

              • tatapoum
                Senior Member
                • Jan 2014
                • 185

                #8
                Just launch the script as I told you. Don't run the zabbysh interactive shell. Create a ~/.zabbyrc file and directly run the script...

                Comment

                • dr_sybourg
                  Junior Member
                  • Jun 2016
                  • 5

                  #9
                  Hello,

                  Sorry, please excuse my ignorance but is that command not this which i have run?:
                  [root@INF-MGTZABBIX02 bin]# /etc/zabbix/zabby/zby/scripts/itservices/copy_time_periods.zby --source "Email" --destination "VSphere"

                  Comment

                  • tatapoum
                    Senior Member
                    • Jan 2014
                    • 185

                    #10
                    No, you opened the Zabby Shell (zabbysh), and then you run the command. Just run the command out of zabbysh.

                    Comment

                    • tatapoum
                      Senior Member
                      • Jan 2014
                      • 185

                      #11
                      For the Zabby::Runner::Service error, I think that you didn't use my own zabby gem (https://github.com/dav3860/zabby) as specified in the Gemfile. The stock zabby gem doesn't include the Service methods.
                      Uninstall the zabby gem and run "bundle" in the source directory. It should install my own zabby gem.
                      Then enter zabbysh and run the command :
                      Code:
                      Service.get()
                      to confirm that it works.

                      Comment

                      Working...