Cactiusers.org


It is currently Thu May 17, 2012 7:24 am




Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next
 specify thresholds in percentages in thold 
Author Message
Post specify thresholds in percentages in thold
It would be VERY nice to be able to specify percentages in thold. For example if I have 100 servers to setup it is annoying to have to specify exactly how full the hard disk needs to be on each one when they are different sizes. It would be so much simpler to say 90% on the template.


Thu Oct 20, 2005 2:40 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post Re: specify thresholds in percentages in thold
Anonymous wrote:
It would be VERY nice to be able to specify percentages in thold. For example if I have 100 servers to setup it is annoying to have to specify exactly how full the hard disk needs to be on each one when they are different sizes. It would be so much simpler to say 90% on the template.


Actually, this is pointless to do in thold, instead, rewrite the hard drive script to also return a percentage. I did this 6 months ago and have been using it ever since without issues.

I'll post the script and XML files shortly.


Thu Oct 20, 2005 9:00 pm
New User

Joined: Wed Oct 12, 2005 10:53 am
Posts: 12
Post 
Jimmy, any idea when this mod will be available for prime-time?


Fri Nov 11, 2005 6:18 pm
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
Here is the template, script, and a quick install instructions.

Quote:
Import this file into Cacti via the Cacti interface
cacti_graph_template_host_mib_available_disk_space.xml

------------------
Copy this file into your Cacti installations "scripts" folder, overriding the one there
ss_host_disk.php

------------------
Copy this file into your Cacti installations "resource/script_server" folder, overriding the one there
host_disk.xml

------------------
You will have 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!


Let me know if you have any problems.


Attachments:
File comment: Disk Space by Percentage
host_disk.zip [5.16 KiB]
Downloaded 620 times
Sun Nov 13, 2005 11:49 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
Also, just to note, this script also doesn't return the floppy, virtual memory, or the CDRoms (if they are empty).


Sun Nov 13, 2005 4:03 pm
New User

Joined: Tue Feb 28, 2006 5:06 pm
Posts: 17
Post 
I'm having a bit of a problem using this script with thold. The graph itself works great. I returns Total, Used and % Used info on all of my devices. When I setup a threshold to use it, however I get nothing. I create a new threshold template using "Host MIB - Hard Drive Space", "hdd_percent" and then set the high threshold to 80 and save it. I then assign this to one of my devices. I wait a while and look at the threshld tab and I can see the device/threshold, but in the "Current" column, it says 0. This happens on every device that I setup to use this template.

As a test, I setup a low threshold of 10 in the template just for kicks. I get the e-mail alert a few minutes later, even though the disk space is 40% on the particular device.

has anyone else seen this?

Thanks!


Tue Feb 28, 2006 5:24 pm
New User

Joined: Wed Jun 14, 2006 5:02 am
Posts: 2
Post 
What about a threshold percentage for interface traffic? Is there any way to do this with Thold 0.3.0 ??

Thanks.


Wed Jun 14, 2006 5:06 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
Maestro_Ba wrote:
What about a threshold percentage for interface traffic? Is there any way to do this with Thold 0.3.0 ??

Thanks.


Currently no, since it only knows the value of the current datasource, not the one that you want to take a percentage off of. You could ofcourse modify the script and datasource to calculate the % and store it in the RRD, then you could easily threshold off of that.


Wed Jun 14, 2006 6:22 pm
New User

Joined: Wed Jun 14, 2006 5:02 am
Posts: 2
Post 
Thanks Jimmy.

I saw here -> http://forums.cacti.net/about11360.html that you're currently working in Cacti 0.9.0 development.

Can you tell me if this new Cacti version will include Thold new functionalities (like the one I asked in my previous post - percentage thresholding for Interface Traffic)? And is there any estimate beta-version release date?

Thanks, congratulations for your great work, and good luck!


Fri Jun 16, 2006 11:31 am
New User

Joined: Tue Feb 28, 2006 5:06 pm
Posts: 17
Post 
Has anyone been successful at setting up thresholds based on a percentage of drive space? My graphs show the percentage but I'm still having the same problems I mentioned in the post above.

Just wondering.....


Thu Jul 13, 2006 3:51 pm
New User

Joined: Mon Jan 29, 2007 5:21 am
Posts: 1
Post graph update
Hi all,

Thks Jimmy for your great job!

but, i have a question :
when u say :

You will have 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!

it works fine with new graph, but does'nt update current ones.

do we have to delete rrd data and recreate a brand new graph?
is it possible to update current graphs with new percentage statistics? (if yes how?)

thks for all.

Phil.


Mon Jan 29, 2007 5:26 am
New User

Joined: Thu Feb 08, 2007 8:37 am
Posts: 3
Post 
Hi - I setup the latest thold and the host_disk graphs. Thold works correctly because it is alerting me on network interface usage. However, the host_disk does not seem to be returning data to the thold screens and in the database. The lastread field is blank in the database. Anybody have an idea why this would not be updating. See my attached screencaps. Thanks!


Attachments:
File comment: thold and host_disk problem
thold_prob.JPG
thold_prob.JPG [ 155.65 KiB | Viewed 3321 times ]
Thu Feb 08, 2007 8:53 am
Site Admin

Joined: Thu Nov 11, 2004 11:12 am
Posts: 2007
Post 
Does walking the OIDs manually return any results?


Fri Feb 16, 2007 7:18 pm
New User

Joined: Thu Feb 08, 2007 8:37 am
Posts: 3
Post 
Yes - and the graphs for these data sources show the percent used. But the threshold part shows no data.

Russell


Fri Feb 16, 2007 8:22 pm
New User

Joined: Tue Dec 19, 2006 2:37 pm
Posts: 15
Post 
To fix the issue with thold not showing current drive % with this new template, I had to make a change within the Associated Graph Template for the SNMP - Get Mounted Partitions Data Query.

I had to change the Data Source hdd_percent from hrStorageSize to hrStorage Percent, and check the box next to it.

Here is a step by step.
1. Click Console
2. click Data Queries on the left
3. click SNMP - Get Mounted Partitions (is it misspelled in yours too?)
4. click "Available Disk Space" under Associated Graph Templates
5. change the dropdown for hdd_percent to "hrStoragePercent(Percent Used)
6. check the box just to the right of that dropdown
7. click save

and I'm not sure if this next step is necessary, but I did it anyway.
8. re-create the graphs.


Hope this works for you.

-James


Wed Mar 07, 2007 12:18 pm
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: