From: Ben C. <be...@cl...> - 2004-08-13 13:11:23
|
Paulo, Sorry for the delay. I have just got back from holiday and had a chance to look at the code. There is a bug, these values are the wrong way round. If you want to make a change now, please look at the file 'perfparse.c' at line 71. Change: #define TPERFDATA_MIN 0 #define TPERFDATA_MAX 1 #define TPERFDATA_WARN 2 #define TPERFDATA_CRIT 3 #define TPERFDATA_VALUE 4 Into: #define TPERFDATA_MIN 2 #define TPERFDATA_MAX 3 #define TPERFDATA_WARN 0 #define TPERFDATA_CRIT 1 #define TPERFDATA_VALUE 4 And recompile. This is untested. If you can verify that this does fix the problem, it would be helpful. :) I will get a new version when our other developer Yves is back from vacation sometime in next few days. Sorry for problems. Regards, Ben. Paulo Afonso Graner Fessel wrote: > I wasn't at the office today, so I'll try to describe what's happening. > > Here's for example one row of data took from perfdata_service_bin: > > +-----------+---------------------+--------+---------------------+---------+--------+----------+--------+ > | host_name | service_description | metric | ctime | > value | warn | critical | state | > +-----------+---------------------+--------+---------------------+---------+--------+----------+--------+ > | nagioslab | /dev/vg00/rootlv | / | 2004-07-23 14:35:10 | > 4822 | 0 | 10079 | 0 | > +-----------+---------------------+--------+---------------------+---------+--------+----------+--------+ > > On the other hand, take a look at the output of check_disk: > > [root@nagioslab libexec]# ./check_disk -w 15% -c 5% -p / > DISK OK - free space: / 4869 MB (48%);| /=5211MB;8567;9575;0;10079 > > The line recorded at serviceperf.log shows > > 1092398291 nagioslab /dev/vg00/rootlv DISK OK - free > space: / > 4869 MB (48%): OK /=5211MB;8567;9575;0;10079 > Seems that the values that are making into the database are minimum > (0) and maximum (10079) values instead of warning (10064) and critical > (10074) ones. My patched check_nt (that provides also perfdata > information) also provides evidence supporting this: > > [root@nagioslab libexec]# ./check_nt -H 10.4.8.135 -v USEDDISKSPACE -l c > -w 85% -c 95% > c:\ - total: 37.27 Gb - used: 7.31 Gb (20%) - free 29.96 Gb > (80%)|c=7.310GB;31.678;35.404;;37.268 > > Now, the line recorded at the database: > > +------------+---------------------------+--------+---------------------+---------+--------+----------+--------+ > | host_name | service_description | metric | ctime > | value | warn | critical | state | > +------------+---------------------------+--------+---------------------+---------+--------+----------+--------+ > | bradesk150 | Disco C: | c | 2004-07-23 15:09:11 > | 5.909 | 0 | 37.26 | 0 | > +------------+---------------------------+--------+---------------------+---------+--------+----------+--------+ > Again, we see that warn = 0 and critical =- 37.26, when the correct > information should have been warn = 31.68 and critical = 35.40. Also, as > you can see, both plugins provide output in the format you mentioned - > that is, 'label'=value[UOM];[warn];[crit];[min];[max]. > > TIA, > > Paulo Fessel > > "This is not right. This is not even wrong." (Wolfgang Pauli) > > > *Paulo Fessel* > /Administrador de Ambiente e Sistemas UNIX/ *PrimeSys Soluções > Empresariais* > Av. Brig. Faria Lima, 1485 - 13° andar > Torre Norte - Pinheiros > 01451-904 > São Paulo - SP > pau...@pr... <mailto:pau...@pr...> > tel: > fax: > mobile: +55 (11) 3038-6554 > +55 (11) 3038-6508 > +55 (11) 8259-0353 > > > > /Signature powered by Plaxo/ <http://www.plaxo.com/signature> /Want a > signature like this?/ <http://www.plaxo.com/signature> > > /Add me to your address book.../ > <https://www.plaxo.com/add_me?u=8590019246&v0=166225&k0=1601108562> > > > > ------------------------------------------------------------------------ > *De:* Cook, Garry [mailto:GW...@ma...] > *Enviada em:* quinta-feira, 12 de agosto de 2004 12:07 > *Para:* Paulo Afonso Graner Fessel; > per...@li... > *Assunto:* RE: [Perfparse-users] Warn values are not going into database > > I'm not sure that I completely understand your question... What do > you mean by 'I'm not including all fields of performance data on > plugin output'? > > Plugin output of performance data should be in the format > 'label'=value[UOM];[warn];[crit];[min];[max] > Please see > http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN185 for > detailed information. > > As you can see from the above, some of the variables are optional > (those enclosed in square brackets). If your performance data does > not supply the warning and critical values, they will not make it > into the database. > > Garry W. Cook, CCNA > Network Infrastructure Manager > MACTEC, Inc. - http://www.mactec.com/ > 303.308.6228 (Office) - 720.220.1862 (Mobile) > > -----Original Message----- > *From:* per...@li... > [mailto:per...@li...] *On Behalf > Of *Paulo Afonso Graner Fessel > *Sent:* Wednesday, August 11, 2004 2:44 PM > *To:* per...@li... > *Subject:* [Perfparse-users] Warn values are not going into database > > Hello, folks. > > We have noticed today that perfparse is not inserting the > warning values into perfdata_service_bin table, only the > critical ones. So it's impossible to graph threshold lines as > warning values are always "0". > > Does it happen because i'm not including all fields of > performance data on plugin output? Is it neccessary to include > all fields of performance values on plugin output? > > []'s > Paulo Fessel > > "This is not right. This is not even wrong." (Wolfgang Pauli) > > > *Paulo Fessel* > /Administrador de Ambiente e Sistemas UNIX/ *PrimeSys Soluções > Empresariais* > Av. Brig. Faria Lima, 1485 - 13° andar > Torre Norte - Pinheiros > 01451-904 > São Paulo - SP > pau...@pr... <mailto:pau...@pr...> > tel: > fax: > mobile: +55 (11) 3038-6554 > +55 (11) 3038-6508 > +55 (11) 8259-0353 > > > > /Signature powered by Plaxo/ <http://www.plaxo.com/signature> > /Want a signature like this?/ <http://www.plaxo.com/signature> > > /Add me to your address book.../ > <https://www.plaxo.com/add_me?u=8590019246&v0=166225&k0=1601108562> > > |