Announcement

Announcement Module
Collapse
No announcement yet.

Disk Stats not working with Cacti plugins v1.04

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Disk Stats not working with Cacti plugins v1.04

    I tried searching to see if this was posted before, but oddly, there doesn't seem to be a way to search these forums?

    I am trying to collect disk stats on my server and, according to this:
    http://www.percona.com/doc/percona-m...templates.html
    I need to use the volume name.

    I've actually tried just about every permutation of this that I can think of, none of which return values.
    On my server, I have:

    Code:
    # lsblk                  
    NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda                       8:0    0   9.1T  0 disk 
    ├─sda1                    8:1    0     1M  0 part 
    ├─sda2                    8:2    0   244M  0 part /boot
    └─sda3                    8:3    0   9.1T  0 part 
      ├─lzbfs-root (dm-0)   252:0    0     9T  0 lvm  /
      └─lzbfs-swap_1 (dm-1) 252:1    0    96G  0 lvm  
    sr0                      11:0    1  1024M  0 rom
    And
    Code:
    # pvdisplay 
      --- Physical volume ---
      PV Name               /dev/sda3
      VG Name               lzbfs
      PV Size               9.09 TiB / not usable 1.00 MiB
      Allocatable           yes (but full)
      PE Size               4.00 MiB
      Total PE              2383298
      Free PE               0
      Allocated PE          2383298
      PV UUID               SuoiPA-4Dgl-K6zd-Qqdx-KYdT-2U2D-GsxdjK
    I need to get stats for lzbfs-root. I have tried the following, but all return -1:
    Code:
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume lzbfs-root
    jw:-1 jx:-1
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume sda3
    jw:-1 jx:-1
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume /dev/sda3
    jw:-1 jx:-1
     /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume dm-0
    jw:-1 jx:-1
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume /
    jw:-1 jx:-1
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume lzbfs
    jw:-1 jx:-1
    As I understand the docs, it is supposed to work using the volume name from lsblk...in my case "lzbfs-root", but it doesn't seem to work.
    Can someone explain what I am doing wrong?


    NB:
    Other commands from get_by_ssh.php that are not disk related do work correctly.





  • #2
    Please show me your "df" output. The volume should be the way it is listed in the first column of "df" output.

    Comment


    • #3
      Code:
      ~# df
      Filesystem              Size  Used Avail Use% Mounted on
      /dev/mapper/lzbfs-root  9.0T  174G  8.9T   2% /
      udev                     48G   12K   48G   1% /dev
      tmpfs                    19G  628K   19G   1% /run
      none                    5.0M     0  5.0M   0% /run/lock
      none                     48G   92K   48G   1% /run/shm
      /dev/sda2               229M   29M  188M  14% /boot

      Comment


      • #4
        You have to use "/dev/mapper/lzbfs-root", i.e.
        /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume /dev/mapper/lzbfs-root

        Comment


        • #5
          I actually tried that before (just forgot to list it) and it doesn't work:
          Code:
          /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host 192.168.28.29 --type df --items jw,jx --volume /dev/mapper/lzbfs-root
          jw:-1 jx:-1

          Comment


          • #6
            'DISKFREE_used' => 'nj',
            'DISKFREE_available' => 'nk',


            It should be --items nj,nk. Also please check that the script from PMP 1.0.4 tarball or package.

            Comment

            Working...
            X