Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


THOLD - Disk Percentage calculations

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold)
Author Message
redawg



Joined: 30 Mar 2008
Posts: 6

PostPosted: Wed Jul 09, 2008 3:39 pm    Post subject: THOLD - Disk Percentage calculations Reply with quote

Alright,

I have been struggling with this for awhile now, the CDEF fix works some of the time. but if you calc alot of they are very inconsistent..

So I took a patch from a couple people finagled around and edited it and have it working consistently.

Here are my files, working with cacti 8.7b

Remember to recreate the datasources for disk space on all your current hosts that use this,
Most importantly, this includes re-querying the "Associated Data Query" for the device!

After you install these files you will see this in you cacti.log


/09/2008 01:44:18 PM - CMDPHP: Poller[0] Host[6] DS[585] SERVER: /usr/local/cacti/scripts/ss_host_disk.php ss_host_disk 127.0.0.1 6 1:161:500:XXXXXXXXX:::MD5::DES: get total 4, output: 18656718848

07/09/2008 01:44:18 PM - CMDPHP: Poller[0] Host[6] DS[585] SERVER: /usr/local/cacti/scripts/ss_host_disk.php ss_host_disk 127.0.0.1 6 1:161:500:XXXXXXXXX:::MD5::DES: get used 4, output: 2781540352

07/09/2008 01:44:18 PM - CMDPHP: Poller[0] Host[6] DS[585] SERVER: /usr/local/cacti/scripts/ss_host_disk.php ss_host_disk 127.0.0.1 6 1:161:500:XXXXXXXXX:::MD5::DES: get percent 4, output: 14.91






quote]Cacti Version - 0.8.7b
Plugin Architecture - 2.1
Poller Type - CMD.php
Server Info - Linux 2.6.18-53.1.21.el5
Web Server - Apache/2.2.3 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp
MySQL - 5.0.22
RRDTool - 1.2.23
SNMP - 5.3.1
Plugins
    Change password (passwd - v0.1)
    Global Plugin Settings (settings - v0.5)
    Documents (docs - v0.1)
    Update Checker (update - v0.4)
    Network Tools (tools - v0.3)
    Host Info (hostinfo - v0.2)
    Status: Read-only Devices Tab (status - v0.1)
    Cycle Graphs (Cycle Graphs - v0.5)
    NTop Viewer (ntop - v0.1)
    Thresholds (thold - v0.3.9)
    Device Monitoring (monitor - v0.8.2)
    Uptime (uptime - v0.3)
    Cacti-ReportIt (reportit - v0.6.1)
[/quote]


Here are the files in the zip with readme as to where they go. Hope it helps trying the other way was annoying the crap out of me.



HOST MIB-Working percentage.rar
 Description:
Unzip and move to correct locations in the Readme files

Download
 Filename:  HOST MIB-Working percentage.rar
 Filesize:  5.34 KB
 Downloaded:  308 Time(s)

Back to top
jrego



Joined: 14 Jul 2008
Posts: 33

PostPosted: Wed Jul 23, 2008 8:31 pm    Post subject: Reply with quote

Thanks for the files.

when you say import this file using the cacti interface? You mean the website right? also where in the website?

thanks.
Back to top
jrego



Joined: 14 Jul 2008
Posts: 33

PostPosted: Wed Jul 23, 2008 8:31 pm    Post subject: Reply with quote

and then what after i do that? do i need to make any additional changes? or will there be an option now for %?

thanks for your help.
Back to top
umarzuki



Joined: 22 Jul 2008
Posts: 8

PostPosted: Wed Jul 23, 2008 9:20 pm    Post subject: Reply with quote

jrego wrote:
Thanks for the files.

when you say import this file using the cacti interface? You mean the website right? also where in the website?

thanks.

import cacti_graph_template_host_mib_available_disk_space.xml as template:
Console > Import Templates
Back to top
jewnlie



Joined: 01 Aug 2008
Posts: 1

PostPosted: Fri Aug 01, 2008 3:04 am    Post subject: how to intall this package Reply with quote

Hrrr....
with this package
I should add a new Data Input methods,but
how should i write input string
php <path_cacti>/scripts/ss_host_disk.php doesn't work

any one show me step by step
thanks a lot

# snmpwalk -c public -v 1 localhost .1.3.6.1.2.1.25.2.3.1.5
HOST-RESOURCES-MIB::hrStorageSize.1 = INTEGER: 3632116
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 5663724
HOST-RESOURCES-MIB::hrStorageSize.6 = INTEGER: 215428
HOST-RESOURCES-MIB::hrStorageSize.7 = INTEGER: 961856
HOST-RESOURCES-MIB::hrStorageSize.8 = INTEGER: 0
HOST-RESOURCES-MIB::hrStorageSize.10 = INTEGER: 2031608
HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 8094174
HOST-RESOURCES-MIB::hrStorageSize.32 = INTEGER: 101086
Back to top
gsaray101
Cacti User


Joined: 17 May 2007
Posts: 108

PostPosted: Wed Aug 06, 2008 12:54 pm    Post subject: reporting disk space as percent Reply with quote

I have cacti verstion 0.8.7a and your graph template does not work on that. I created a graph template with disk but I dont see any percentage values. Are you doing anything different on this graph template? Can you please explain
Back to top
juge



Joined: 12 Aug 2008
Posts: 4

PostPosted: Thu Aug 14, 2008 4:44 am    Post subject: Reply with quote

It works perfectly for me on 0.8.7b.

thank redawg !
Back to top
stephan_r



Joined: 22 Aug 2008
Posts: 5

PostPosted: Fri Aug 22, 2008 1:58 am    Post subject: Reply with quote

Hi,

i don´t get the percentage displayed so far. Maybe first of all my system configuration:

Fedora 8

Apache/2.2.6
mySQL 5.0.45
PHP 5.2.6

Cacti 0.8.7b
Plugin Architecture 2.1
Settings 0.5
Thold 0.3.8

First of all i imported the template. After that i copied the two .xml files and overwrote the existing files. Then i added a new device (Windows XP SP2) and created a graph to display the disk usage. The max capacity and the used space are displayed correctly, but the percentage is only displayed as "nan".
In the readme file it is said to "recreate the database" and to "requerying the associated data query". How can i do this, or is it not important, because i added the new device after the modification?
I don´t realy know where to search for a mistake. Maybe somebody here has an idea.

bye
Back to top
redawg



Joined: 30 Mar 2008
Posts: 6

PostPosted: Wed Sep 10, 2008 1:44 pm    Post subject: Reply with quote

Re query the associated data source.. What I am refering to is going into the device and clicking on the circle to refresh the snmp data for disk space. if you want the source it will say

SNMP - Get Mounted Partitions (Verbose Query) Uptime Goes Backwards Success [32 Items, 8 Rows] Reload Data Query

if successful your items should be 3 time the amount of rows, previously it was 2 x the amount of rows because it was only doing max and used value.
Back to top
kroyer22



Joined: 11 Sep 2008
Posts: 1

PostPosted: Thu Sep 11, 2008 10:18 am    Post subject: Reply with quote

I installed the Patch, Deleted all Graphs and re queried the data source. When I recreate a new graph I get NAN or 0% for the percent. Any thoughts?
Back to top
atanasio



Joined: 18 Mar 2008
Posts: 4

PostPosted: Wed Oct 01, 2008 12:13 pm    Post subject: Reply with quote

kroyer22 wrote:
I installed the Patch, Deleted all Graphs and re queried the data source. When I recreate a new graph I get NAN or 0% for the percent. Any thoughts?


Same problem with me.

Cacti 0.8.7b
Plugin Architecture 2.1
Debian Etch

Thanks anyway.
Back to top
mlum



Joined: 20 Oct 2008
Posts: 16
Location: uk

PostPosted: Wed Oct 29, 2008 12:11 pm    Post subject: Reply with quote

Same problem for me. Tried all the steps above a few times but still 0 showing.

I'm assuming the percent figure is calculated in the amended ss_host_disk.php file? I wonder if it something to with the if statement order?

Anyone know PHP?
Back to top
mlum



Joined: 20 Oct 2008
Posts: 16
Location: uk

PostPosted: Fri Nov 14, 2008 10:35 am    Post subject: Reply with quote

11/14/2008 03:35:04 PM - CMDPHP: Poller[0] Host[10] DS[42] SERVER: /usr/share/cacti/site/scripts/ss_host_disk.php ss_host_disk 172.16.212.18 10 2:161:500:public:::MD5::DES: get total 2, output: 6432133120
11/14/2008 03:35:04 PM - CMDPHP: Poller[0] Host[10] DS[42] SERVER: /usr/share/cacti/site/scripts/ss_host_disk.php ss_host_disk 172.16.212.18 10 2:161:500:public:::MD5::DES: get used 2, output: 5955248128

Not receiving the third "get percent" entry. hmmm. will keep looking.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group