Ad Widget

Collapse

MSSQL DB Free Space?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mdugas
    Junior Member
    • Dec 2010
    • 2

    #1

    MSSQL DB Free Space?

    Hi all,

    I'm a bit of a newbie with Zabbix (new client is using it for monitoring), so excuse me if I'm asking a silly question.

    We have several PerfMon monitors running against our SQL servers, however one of the things we are now needing to monitor is DB Free Space (My monitoring metric will be in %, however, I can certainly calculate free space in KB against the data file size and come up with that number on my own).

    Is there a "reasonably" quick and easy way (doesn't have to be pretty) to do this? This isn't a standard PM metric, so it's not something I can monitor directly.

    TIA,
    Mike
  • Zaniwoop
    Senior Member
    • Jan 2010
    • 232

    #2
    silly question from my side... does that not depend on the the available disk space?

    Comment

    • Bennie
      Member
      Zabbix Certified Specialist
      • Feb 2010
      • 73

      #3
      Hey Mdugas,

      I think there are various ways to give you a solution. Let me name some.

      1. The use of Zabbix sender
      If you can come up the the value you want, by a custom script or so, you can use zabbix_sender to get it in the Zabbix server

      2. Calculate
      Assuming you have a limit on the database file size you can get the file size with the Zabbix agent on the server. Use that value to calculate a percentage as you know what the max size is.

      3. Trigger the size
      Get the db file size directly with the agent, if you know the max size of the file you can calculate at what size you want to trigger.

      Don't know if this helps you

      Comment

      • mdugas
        Junior Member
        • Dec 2010
        • 2

        #4
        Originally posted by Zaniwoop
        silly question from my side... does that not depend on the the available disk space?
        Not silly. There's 2 pieces to this equation... The first being the actual "file" size of the database (which can grow automatically), the second being actual free space INSIDE the database. For example, if the database grows to 50Mb, and then you delete 10Mb worth of records, the database file itself does not shrink. But there is now 10Mb of "free space" inside the database that can be used for other things. This is the number I'm trying to measure.

        Originally posted by Bennie
        Hey Mdugas,

        I think there are various ways to give you a solution. Let me name some.

        1. The use of Zabbix sender
        If you can come up the the value you want, by a custom script or so, you can use zabbix_sender to get it in the Zabbix server

        2. Calculate
        Assuming you have a limit on the database file size you can get the file size with the Zabbix agent on the server. Use that value to calculate a percentage as you know what the max size is.

        3. Trigger the size
        Get the db file size directly with the agent, if you know the max size of the file you can calculate at what size you want to trigger.

        Don't know if this helps you
        Bennie,

        Thanks for the tips... Please see above, and see if that makes more sense to you. This number is a value I've found I can get calculated via a SQL query (or stored procedure - either way, something I can do as a remote command), however it's output is not simply that number by itself. It spits it out in pretty MSSQL text table format... And me not being a SQL guru (or at least an MSSQL guru), I don't know how to parse that down to only that single number I want as output.

        Does this help clarify?

        Comment

        • Zaniwoop
          Senior Member
          • Jan 2010
          • 232

          #5
          There's 2 pieces to this equation... The first being the actual "file" size of the database (which can grow automatically), the second being actual free space INSIDE the database. For example, if the database grows to 50Mb, and then you delete 10Mb worth of records, the database file itself does not shrink. But there is now 10Mb of "free space" inside the database that can be used for other things. This is the number I'm trying to measure.
          Good point

          Comment

          Working...