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    


Threshold with CDEF'd graphs, i.e. Disk space by percentage
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold)
Author Message
namiradaki



Joined: 04 Jan 2007
Posts: 10

PostPosted: Sat Apr 05, 2008 1:48 am    Post subject: thold cdef problem Reply with quote

Hey Howie,

Thanks for your reply, ive actually tried to get this working via all your prior posts.

Im using the cdef you posted.

CURRENT_DATA_SOURCE,100,*,ALL_DATA_SOURCES_NODUPS,CURRENT_DATA_SOURCE,-,/

I don't think it likes the "ALL_DATA_SOURCES_NODUPS"

Regards,
Nick
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12205
Location: Muenster, Germany

PostPosted: Sat Apr 05, 2008 6:19 am    Post subject: Reply with quote

This is which version of cacti? What gives Graph templates Debug option?
Reinhard
Back to top
namiradaki



Joined: 04 Jan 2007
Posts: 10

PostPosted: Mon Apr 07, 2008 12:30 am    Post subject: cdef problem Reply with quote

Hi Gandalf,

Im running Cacti Version 0.8.7b and thold Version ........ 0.3.8.

Not sure what you mean about, what gives graph template debug option.

Regards,
Nick
Back to top
namiradaki



Joined: 04 Jan 2007
Posts: 10

PostPosted: Mon Apr 07, 2008 8:57 pm    Post subject: Re: cdef problem Reply with quote

Howie,

I understand that you released a patch for thold_functions.php, i also saw that your released a new thold_functions.php for windows file fully patched. However it doesnt seem to work for me.

Does patching do something different from just overwriting the file. Do I need to possibly recompile thold or re run the setup.php for it?

Please any guidance would be appreciated.

Regards,
Nick
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Tue Apr 08, 2008 2:27 am    Post subject: Reply with quote

namiradaki wrote:
Howie,

I understand that you released a patch for thold_functions.php, i also saw that your released a new thold_functions.php for windows file fully patched. However it doesnt seem to work for me.

Does patching do something different from just overwriting the file. Do I need to possibly recompile thold or re run the setup.php for it?

Please any guidance would be appreciated.

Regards,
Nick


No, it's just that patching is inconvenient for windows users. It sounds like you don't have it right though, because ALL_DATA_SOURCES_NODUPS is the one function I added HOWEVER, nothing I added affects what appears in the list of CDEFs - only how the CDEF is processed.

All I can really say is that it works for me. Thold will only show cdefs in the list that contain CURRENT_DATA_SOURCE. Do you get any others? All others?
Back to top
lerwin



Joined: 20 Mar 2008
Posts: 9
Location: Texas

PostPosted: Wed Apr 09, 2008 11:02 am    Post subject: Threshold percentage not working Reply with quote

I have thold working with standard numbers, meaning if I say alert me when the size is 72000000000, it will then alert me. However, all my servers have multiple drives of different sizes. I have tried to implement the percentage CDEF listed here and I can't seem to get it to work. I have attached a screenshot of my cdef. It does not show up in my threshold template. I read the CDEF tutorial, but still . Do I need item #1 to be Def statement before doing the CDEF?

Any help is appreciated.



ScreenHunter_02 Apr. 09 10.44.jpg
 Description:
Screen capture of my cdef
 Filesize:  39.83 KB
 Viewed:  2400 Time(s)

ScreenHunter_02 Apr. 09 10.44.jpg


Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Apr 09, 2008 11:44 am    Post subject: Reply with quote

I think you might need to define the CDEF the "long way" - my reading of the code in thold that looks for valid cdefs looks for the CURRENT_DATA_SOURCE as a specific item in the CDEF not as part of a string.
Back to top
namiradaki



Joined: 04 Jan 2007
Posts: 10

PostPosted: Thu Apr 10, 2008 1:22 am    Post subject: cdef problem Reply with quote

Ok Good news Howie,

After creating the cdef one item at a time as per the attached screen shot im now able to sellect the cdef under the Thold template.

AWESOME

but...

When viewing my tholds, the current data value is displayed as "0" which is incorrect. It should be showing a percentage value.

Can anyone shed some light on the matter please.

Regards,
Nick



cdef.jpg
 Description:
 Filesize:  111.25 KB
 Viewed:  2373 Time(s)

cdef.jpg


Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Thu Apr 10, 2008 2:22 am    Post subject: Re: cdef problem Reply with quote

namiradaki wrote:
Ok Good news Howie,

After creating the cdef one item at a time as per the attached screen shot im now able to sellect the cdef under the Thold template.

AWESOME

but...

When viewing my tholds, the current data value is displayed as "0" which is incorrect. It should be showing a percentage value.

Can anyone shed some light on the matter please.

Regards,
Nick


You missed out the second CURRENT_DATA_SOURCE after ALL_DATA_SOURCE_NODUPS, so your CDEF is underflowing the stack (the divide on the end has only one value to work with).
Back to top
gab



Joined: 22 Apr 2008
Posts: 6

PostPosted: Wed Apr 23, 2008 3:13 am    Post subject: Reply with quote

Quote:

That worked. Now I just have to make the CDEF work

Edit: Howie, your CDEF doesn't work for me. I am getting -100. My CDEF looks like yours:
cdef=CURRENT_DATA_SOURCE,100,*,ALL_DATA_SOURCES_NODUPS,CURRENT_DATA_SOURCE,-,/

And, I am trying to use this on the SNMP based hdd_used that comes with cacti.

I don't think it likes ALL_DATA_SOURCES_NODUPS. This value does not exist for me. When I do ALL_DATA_SOURCES_NODUPS - CURRENT_DATA_SOURCE I just get a negative value of the current used disk.

/Carl


I am in the same situation. The CDEF works perfectly for hdd but the Host MIB hard drive return "Physical Memory" and "Virtual Memory". Unfortunatly, the CDEF return -100 for the memory.

Does anyone have an idea to help me ?

I don't understand why it works for hdd and why it doesn't work for memory.

In case of memory, the DS hdd_total seems to return the value "0".
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Apr 23, 2008 3:17 am    Post subject: Reply with quote

gab wrote:

In case of memory, the DS hdd_total seems to return the value "0".


Then why do you expect the CDEF to work correctly?

You need the special data source CURRENT_PSYCHIC_VALUE
Back to top
gab



Joined: 22 Apr 2008
Posts: 6

PostPosted: Wed Apr 23, 2008 3:21 am    Post subject: Reply with quote

Howie wrote:
Then why do you expect the CDEF to work correctly?


It works correctly for hard drives.


Howie wrote:
You need the special data source CURRENT_PSYCHIC_VALUE




Could you help me ?



thold_bug.JPG
 Description:
Bug with thold - CDEF Used/Total -> Pourcentage
Value -100 for Virtual and Physical Memory
 Filesize:  25.11 KB
 Viewed:  2122 Time(s)

thold_bug.JPG


Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2135
Location: United Kingdom

PostPosted: Wed Apr 23, 2008 4:02 am    Post subject: Reply with quote

gab wrote:
Howie wrote:
Then why do you expect the CDEF to work correctly?


It works correctly for hard drives.


Howie wrote:
You need the special data source CURRENT_PSYCHIC_VALUE




Could you help me ?


It sounds like the problem is with either the data source, or your device, not threshold or CDEFs. There are (at least) a couple of different ways to get memory - one is as a 'disk' and the other is HOST-MIB Memory - do they both show 0?
Back to top
gab



Joined: 22 Apr 2008
Posts: 6

PostPosted: Wed Apr 23, 2008 7:28 am    Post subject: Reply with quote

I think you're right but i don't understand why there is a difference between hdd and memory ?

I use the default template "Windows 2000/XP Host" which use the script query_host_partitions.php via OIDs .1.3.6.1.2.1.25.2.3.1.x

Hard drives and Memory are in the same place in the MIB and cacti use the same script te retrieve values (hdd_total, hdd_used).
Back to top
gab



Joined: 22 Apr 2008
Posts: 6

PostPosted: Thu Apr 24, 2008 6:33 am    Post subject: Reply with quote

I am sorry, it was my fault.
I reinstalled the plugin and modified the files global_arrays.php and thold_functions.php and now, everything is OK.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Threshold) All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 



Powered by phpBB © 2001, 2005 phpBB Group