Ad Widget

Collapse

Disk IO statistics broken in Linux

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Netbulae
    Junior Member
    • Jul 2009
    • 27

    #1

    Disk IO statistics broken in Linux

    Hi,

    We are trying to monitor the disk IO stats in Centos 7 with zabbix 2.4, but I cannot get it to work.

    When trying the build in vfs.dev.read and vfs.dev.write, only the write returns any values

    zabbix_get -s hostname -k vfs.dev.write[sda,ops,avg1]
    0.000000

    zabbix_get -s hostname -k vfs.dev.write[sda,ops,avg1]
    2.933333

    Also the built in discovery prototype has "vfs.dev.read[{#FSNAME},ops,avg1]" but $FSNAME doesn't work because it's a device (https://support.zabbix.com/browse/ZBXNEXT-1302).

    And the "Type of information" is set to "Numeric (unsigned)" while it should be "Numeric (float)" for sps/ops.

    But even when I modify the item, only the write statistics work, not the read.

    The workaround posted here:


    Also doesn't give the proper results.

    Any tips on how to get these statistics??
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by Netbulae
    Any tips on how to get these statistics??

    Yep. Stop using avg1 type of metrics and start start reading IO counters to store "delta per second" vales.
    If you will be reading one time per 1min IO counters and storing these values as "delta per second" you will have exactly the same vales. Problem is that wit reading avg1 metrics you will be not able change sampling rate without making historic data useless or recalculating them.

    Really .. try first use first Linux templates from zabbix instead preparing your own.
    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

    • Netbulae
      Junior Member
      • Jul 2009
      • 27

      #3
      Originally posted by kloczek
      Yep. Stop using avg1 type of metrics and start start reading IO counters to store "delta per second" vales.
      If you will be reading one time per 1min IO counters and storing these values as "delta per second" you will have exactly the same vales. Problem is that wit reading avg1 metrics you will be not able change sampling rate without making historic data useless or recalculating them.
      After a lot of googling, I found this post:



      That describes the same..
      .
      Originally posted by kloczek
      Really .. try first use first Linux templates from zabbix instead preparing your own.
      Well that's what I tried.... But it doesn't work.

      I now thought maybe my template is outdated as I upgraded a couple of times.

      So I downloaded the latest known on:

      Join the friendly and open Zabbix community on our forums and social media platforms.


      But this templete doesn't contain a vfs.dev.read/vfs.dev.write or discovery rule at all....

      Comment

      • tchjts1
        Senior Member
        • May 2008
        • 1605

        #4
        About 3/4 of the way down this page explains the usage for vfs.dev.read and write on the various OS's for Zabbix 2.4.x:

        Comment

        • Netbulae
          Junior Member
          • Jul 2009
          • 27

          #5
          Originally posted by tchjts1
          About 3/4 of the way down this page explains the usage for vfs.dev.read and write on the various OS's for Zabbix 2.4.x:
          https://www.zabbix.com/documentation...s/zabbix_agent
          Yes I know, but that info appears incorrect:

          mode - possible values:
          avg1 (one-minute average, default), avg5 (five-minute average), avg15 (15-minute average).
          Note: The third parameter is supported only if the type is in: sps, ops, bps.
          The poster above tell's me to use Delta's instead of avg1:

          Originally posted by kloczek
          Yep. Stop using avg1 type of metrics and start start reading IO counters to store "delta per second" vales.
          If you will be reading one time per 1min IO counters and storing these values as "delta per second" you will have exactly the same vales. Problem is that wit reading avg1 metrics you will be not able change sampling rate without making historic data useless or recalculating them.
          The built in discovery rules I had for vfs.dev.read are not in the current template or maybe have been added a couple of years ago. So I'll built my own based on this info.

          I think it would be nice if zabbix would support this out of the box....

          Comment

          • kloczek
            Senior Member
            • Jun 2006
            • 1771

            #6
            Originally posted by Netbulae
            The built in discovery rules I had for vfs.dev.read are not in the current template or maybe have been added a couple of years ago. So I'll built my own based on this info.

            I think it would be nice if zabbix would support this out of the box....
            Seems you completely missed my point.
            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

            • Netbulae
              Junior Member
              • Jul 2009
              • 27

              #7
              Originally posted by kloczek
              Seems you completely missed my point.
              It appears so.... You talk about "Template OS Linux" when you say the default linux template with zabbix?

              My co-worker added some disk io experimentation items and discovery rules to our "Template OS Linux" so that got me confused.

              But there are as far as I see no disk IO items in the default zabbix templates, if there are can you point me to them? I could be wrong.

              I built some items with values as "delta per second" now but had to change ops into operations as it doesn't make sense to store ops as "delta per second"

              Comment

              • kloczek
                Senior Member
                • Jun 2006
                • 1771

                #8
                Originally posted by Netbulae
                It appears so.... You talk about "Template OS Linux" when you say the default linux template with zabbix?
                No. You don't understand why you should be not using avg1/avg5/avg15 metrics when you have access to raw counters.
                There is no items using avg1/avg5/avg15 keys (for IOs) in default template and seems you don't understand why it is.
                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

                • Netbulae
                  Junior Member
                  • Jul 2009
                  • 27

                  #9
                  Originally posted by kloczek
                  No. You don't understand why you should be not using avg1/avg5/avg15 metrics when you have access to raw counters.
                  There is no items using avg1/avg5/avg15 keys (for IOs) in default template and seems you don't understand why it is.
                  Ahh, sorry. Now I understand.

                  I got rid of avg1/avg5/avg15 after your first comment so I DON'T use it anymore.

                  But it's a hassle that the items are not in the default template.

                  So I added some ITEMS for vfs.dev.read/write with the DELTA as you suggested.

                  Also had to do sector to MB/s conversion and will have to write DISCOVERY rules...

                  That's what I meant with it would have been nice to include it with the default template.....

                  As it's open source, I'll submit my template modifications back to the community so it will be in the default

                  Comment

                  • kloczek
                    Senior Member
                    • Jun 2006
                    • 1771

                    #10
                    Originally posted by Netbulae
                    That's what I meant with it would have been nice to include it with the default template.....
                    IMO zabbix after initial installation should be without templates at all.
                    And/or templates with value mappings and regexps should be delivered as separated sql dump.
                    Another solution is fixing xml import/export mappings and regexps and delivery initial set of templates as xml.

                    Problem with initial set of templates delivered in form of sql dump is hat each hostid/itemid/etc is hardcoded and may overlap with definition already existing in zabbix setup so on release new set of templates importing them as sql dump is asking for troubles. This is causing that relaying on dist templates is very limited.
                    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

                    Working...