Python module for ganglia - precision number being rounded by gmond
I've written a python module for g开发者_如何转开发anglia that is returning response times. The raw times look like this:
0.0120489597321
I parse this with my python module and return the time as such:
return int(response_time)
If I run the script with python, it works fine:
[ DEBUG ]: returning: 0.0120489597321
However, gmond (ganglia) runs this module and it rounds the result to 0.0000. I am classifying it as a uint.
I've tried to return it as a float, and as long... but both methods of provided the same results. Anyone have any ideas here?
I'm not sure what you're trying to do here. int(response_time)
will return an integer, int(0.0120489597321)
is 0.
You can try to multiply that number by 10^6 before reporting to ganglia and then set the ganglia RRA to divide it by 10^6 before graphing.
精彩评论