Ad Widget

Collapse

SQL statement to get availability report of a host on a month

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fdeco
    Junior Member
    • Feb 2013
    • 4

    #1

    SQL statement to get availability report of a host on a month

    I need to create an SQL query that gets the availability of a host on the event host down in a timeperiod. Just like it does on the Availability Report. I need to get the OK and the unknown percentage from this SQL. I use MySql.

    Anybody can help?
    Last edited by fdeco; 09-04-2013, 18:33. Reason: Changed word statement for query
  • cyber_geek5
    Junior Member
    • Apr 2013
    • 19

    #2
    Since i am not a DBA i need a way to write sql queries to able to pull info from the Zabbix DB

    requirement :

    Generate a report for Top 10 hosts - CPU average consumputions for a week
    Top 10 hosts - Disk space utilization
    Top 10 hosts - Critical events occured last week
    Top 10 hosts - System down message

    I have no idea which table these values are store , what are their items names , how to write sql query to get this info

    If this could be done from the GUI thats great

    any ideas

    Comment

    • Michael0
      Member
      • Jan 2013
      • 70

      #3
      does anyone know in which table the availbility report is stored?

      Comment

      • BSDUKJ
        Member
        • Aug 2017
        • 38

        #4
        Did anyone get any replies on this?

        I am looking for exactly the same thing.

        Does anyone have any SQL Queries for this?

        I am using mysql also.

        Even looking for the values and I can try and figure it out.

        Cheers

        Jonny

        Comment

        • allexpetrov
          Senior Member
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • May 2017
          • 361

          #5
          Actually Zabbix performs calculations and there is no universal one-shot query for it. You can drop an eye on Availability report with "Debug" enabled.

          Regards,
          Alex!

          Comment

          • sejuras
            Junior Member
            • Feb 2017
            • 4

            #6
            Any update

            I'm looking for something similar to this as well. I understand it may NOT be a simple query, but a calculation. Anyone have any ideas?

            Comment

            • kloczek
              Senior Member
              • Jun 2006
              • 1771

              #7
              Originally posted by fdeco
              I need to create an SQL query that gets the availability of a host on the event host down in a timeperiod. Just like it does on the Availability Report. I need to get the OK and the unknown percentage from this SQL. I use MySql.

              Anybody can help?
              You don't need any SQL queries to get the availability of a host/srvice/whatever.
              Go to Configuration -> Services and define your availability.
              http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
              https://kloczek.wordpress.com/
              zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
              My zabbix templates https://github.com/kloczek/zabbix-templates

              Comment

              • Severin Simko
                Junior Member
                • Nov 2018
                • 2

                #8
                Hi, I'm currently working on a script that gets the Availability Report per Host from the Mysql, that's why I would like to have the SQL Query to get this information. Did someone find the solution (SQL Query) that can get this information from the DB? I think that the Zabbix is using the calculation for this value, does anyone know where to find how is this calculation done?

                Comment

                Working...