Disk Stats not working with Cacti plugins v1.04

  • 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:
    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:

    # 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
    # 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:
    /usr/bin/php -q /usr/share/cacti/site/scripts/ss_get_by_ssh.php --host --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 --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 --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 --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 --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 --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?

    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.


    • #3
      ~# 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


      • #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 --type df --items jw,jx --volume /dev/mapper/lzbfs-root


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


          • #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.