Ad Widget

Collapse

v2 disk monitor problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • valferon
    Junior Member
    • Jun 2012
    • 5

    #1

    v2 disk monitor problem

    Hello,

    I'm trying to setup hard disk monitoring on my server using zabbix latest version (2.0).

    I'm using "UserParameter" in zabbix_agentd.conf. For some of them it works, for others, it doesn't.

    Here are the user parameters I use :

    - this one works :
    Code:
    UserParameter=custom.vfs.dev.read.ms[*],cat /proc/diskstats | grep $1 | head -1 | awk '{print $$7}'
    Both CLI and zabbix frontend get my datas and it works just fine.


    - this one doesn't work
    Code:
    UserParameter=custom.vfs.dev.disk.use[*],iostat -xk 1 2 | grep sda |tail -n 1 | sed -e's/  */ /g' | cut -d ' ' -f 12
    Frontend shows "no data" and turn my item from enabled to not supported after few seconds.
    CLI works though so it's quite strange :
    Code:
    zabbix_get -s 127.0.0.1 -k custom.vfs.dev.disk.use[sda]
    4,40
    Of course zabbix's item name are the same in the frontend and the config file.

    Thanks !

    F.Valentin
  • valferon
    Junior Member
    • Jun 2012
    • 5

    #2
    Any idea?
    Thanks for your help!

    Comment

    • ghoz
      Senior Member
      • May 2011
      • 204

      #3
      4,40 don't look like an understanable number to zabbix.
      your script should return 4.40 (notice the dot).

      you either have a problem with your script or your system locale . try adding a LANG=C in your agent's startup script

      Ghoz

      Comment

      • valferon
        Junior Member
        • Jun 2012
        • 5

        #4
        Thanks for help Ghoz!

        So I tried LANG=C, zabbix_get no longer return a "," but "." so it should be alright.

        But, still having the same problem and zabbix_agentd.log shows :


        Code:
           869:20120611:093531.803 Requested [custom.vfs.dev.use[sda]]
           869:20120611:093531.803 Sending back [ZBX_NOTSUPPORTED]
        Even if :

        Code:
        zabbix_get -s 127.0.0.1 -k custom.vfs.dev.disk.use[sda]
        5.94
        ( UserParameter=custom.vfs.dev.disk.use[*],iostat -xk 1 2 | grep sda |tail -n 1 | sed -e's/ */ /g' | cut -d ' ' -f 12 )

        Comment

        • ghoz
          Senior Member
          • May 2011
          • 204

          #5
          check your item name : according to the logs, you configured zabbix with

          custom.vfs.dev.use[sda]

          while the agent and your manual check uses

          custom.vfs.dev.disk.use[sda]

          Comment

          • valferon
            Junior Member
            • Jun 2012
            • 5

            #6
            Once more, thank you for help

            It returns good values now so it's alright for me now.

            Comment

            Working...