I am writing a Drift sensor which is used to track file//directory. The current scope of this sensor to track modification of a single file. Input to this sensor(full path of file to track) is given by using .ini file Attached is the .py, .ini for this sensor
pyDrift.conf file look like this
/* Collection groups for the
# example python module */
collection_group {
collect_every = 30
time_threshold = 50
metric {
name = "PyDrift_Senser"
value_threshold = 1.0
}
}
I believe this means that gmond will call a drift sensor callback after every
30 sec . is this true?? What does time_threshold and value_threshold mean??
my code is very simple, I am having a global directory which stores the last
modification time of a file. Every callback compares the current modification
time with last modification time. If changed update the last modification time
and return 1 otherwise return 0
I wanted to understand following:
1. if the gmond polling time ("collect_every = 30 secs" specified in conf file)
is less then 15 sec (polling time of gmetad) aren't we will loose on values, if
they change in between? For e.g. if gmond polling time = 3sec
time t1 = 0 no change in file return = 0
t2 = 3 sec change in file return = 1
t3 = 6 sec no change in file w.r.t previous contents (t2 = 3 sec) so return = 0
t4 = 9 sec change in file w.r.t to previous contents (t3 = 6sec) return = 1
t4 = 12 sec no change in file w.r.t previous contents (t4 = 9 sec) so return = 0
t5 = 15 sec no change in file w.r.t previous contents (t5 = 12 sec) so return = 0
I believe ganglia will show the values at sampling time = 0 sec and 15 sec
which is 0. So we have missed if there is any change in between?? Is my
understanding right??
Secondly when I dump the rrd files into xml (rrdtool dump pydriftsenser.rrd>
test.xml) I see other then 0 and 1 as output there are other values also
present (like 3.33.... - 01, 8.66666 -01) . Because of these values, the graph
is not looking correct. I am wondering from where these values are coming in??
Please let me know if I am doing something wrong??
Attached is also the xml file which I got after rrdtool dump
This is very urgent for me. Please help me to make this work.
Thanks
Shaily
driftsenser.ini
Description: Binary data
driftsenser.py
Description: Binary data
------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
