[Nagiosplug-devel] perfdata routines

Karl DeBisschop karl at debisschop.net
Sun Nov 30 19:00:05 CET 2003

On Fri, 2003-11-28 at 16:44, Ton Voon wrote:
> On 28 Nov, 2003, at 18:51, Karl DeBisschop wrote:
> > On Fri, 2003-11-28 at 10:03, Voon, Ton wrote:
> >> There is a standard perfdata routine which is in utils.c. However, 
> >> this
> >> expects parameters to be ints. For check_load, the data returned is 
> >> floating
> >> point numbers, which means we get rounded figure for perfdata which 
> >> loses a
> >> lot of information.
> >>
> >> Would it make sense for perfdata to expect all figures as floats 
> >> instead? I
> >> think this is more flexible and a bit more perl-like (where all 
> >> numeric
> >> scalars are floating point numbers). I guess a complaint would be
> >> speed/memory, but that should be alright in the world of super-fast
> >> computers?
> >>
> >> Any other opinions?
> >
> > When we discussed the 'standard' perfdata, we felt that since MRTG and
> > other RRD tools are dominantly oriented around ints, the we would do 
> > the
> > same.
> >
> > I myself do not use these tools so much that I can vouch for the
> > validity of the assumption that ints will make MRTG and RRD easier. But
> > that was the logic.
> >
> I know RRD can use floats. In fact, I think it works better with floats 
> because RRD only stores "averages" (I sometimes get a max figure of 
> 5.73 concurrent users on an application, which my manager thinks is a 
> bit stupid - of course, that could just be my implementation).
> I think the standard perfdata should store as much info as possible. 
> The "convert to a graph tool" can make the decision to reduce down to 
> integers.

Thanks for the comments. I've been meditating on them all weekend. And
hoping others would pipe in one way or another. They did not.

I committed to releasing an alpha this weekend. I am going to do that as
is. I don't know if floats are the right way to go or not. I'll have to
dig through the archives to try and recall what specific points were
given before.

Maybe the best answer is to use ints in most cases - leaving the basics
of the current perfdata macro as they are. But to add a perfdataf
function that makes floats for output.

I'd love to hash out the best answer before rolling up an alpha, but I
feel between a rock and a hard place. And since I'm not a big user of
perfdata, I don't feel like I want to make a pronouncement of policy. So
lets work it out in the next week or so, and hopefully the result will
not entail big changes relative to 1.4.0alpha1


More information about the Devel mailing list