From: Tong Y. <To...@in...> - 2005-03-03 21:20:05
|
Hi Jessica, Thanks for your tip! It works great!! Well. For the memory one anyways. You didn't by chance change the other ones did you? My programming knowledge is really bad and I'm not sure where to make the other changes for the other checks. =20 -----Original Message----- From: Jessica Holle [mailto:Je...@gm...]=20 Sent: Wednesday, March 02, 2005 10:39 PM To: Tong Young Cc: per...@li... Subject: Re: [Perfparse-users] Perfparse & nsclient memory check Hi Tom, I've had the same problem.=20 You must correct the check_nt plugin, the file check_nt.c and make all again and copy the new check_nt plugin to your other plugins. case CHECK_MEMUSE: asprintf(&send_buffer,"%s&7", req_password); fetch_data (server_address, server_port, send_buffer); mem_commitLimit=3Datof(strtok(recv_buffer,"&")); mem_commitByte=3Datof(strtok(NULL,"&")); percent_used_space =3D (mem_commitByte / = mem_commitLimit) * 100; warning_used_space =3D ((float)warning_value / 100) * mem_commitLimit; critical_used_space =3D ((float)critical_value / 100) * mem_commitLimit; /* Divisor should be 1048567, not 3044515, as we are measuring "Commit Charge" here, which equals RAM + Pagefiles. */ asprintf(&output_message,_("Memory usage: total:%.2f Mb - used: %.2f Mb (%.0f%%) - free: %.2f Mb (%.0f%%)"), mem_commitLimit / 1048567, mem_commitByte / 1048567, percent_used_space, (mem_commitLimit - mem_commitByte) / 1048567, (mem_commitLimit - mem_commitByte) / mem_commitLimit * 100); =20 asprintf(&perfdata,_("Memoryusage=3D%.2fMb;%.2f;%.2f;0.00;%.2f"), mem_commitByte / 1048567, warning_used_space / 1048567, critical_used_space / 1048567, mem_commitLimit / 1048567); return_code=3DSTATE_OK; if(check_critical_value=3D=3DTRUE && percent_used_space = >=3D critical_value) return_code=3DSTATE_CRITICAL; else if (check_warning_value=3D=3DTRUE && = percent_used_space >=3D warning_value) return_code=3DSTATE_WARNING; break; so it look at my plugin, the problem are the blanks between "Memory usage". When you check other things from check_nt it is the same problem. There should not be a blank or a '!!! The " must stay. Test it and tell me if it works regard Jessica > Is anyone using nsclient (check_nt) successfully with perfparse? >=20 > I have charts for some other things working so it would appear to me > that perfparse is functioning correctly. And I get performance data > back in what looks to be the correct format, but for some reason no > charts appear. >=20 > Here is the output in nagios from the status detail page: >=20 > Status Information: Memory usage: total:945.66 Mb - used: 742.66 Mb > (79%) - free: 202.99 Mb (21%)=20 > Performance Data: 'Memory usage'=3D742.66Mb;756.53;851.09;0.00;945.66=20 >=20 > Here is the output if I run it at the command line: >=20 > 0> ./check_nt -H testadmin01 -v MEMUSE -c 80 -w 90 >=20 > Memory usage: total:945.66 Mb - used: 744.19 Mb (79%) - free: 201.47 Mb > (21%) | 'Memory usage'=3D744.19Mb;851.09;756.53;0.00;945.66 >=20 > Can anyone shed some light on this? Thanks! >=20 > Oh I'm using plugins v1.40...Around 2/10/2005.. And I'm using latest > nagios 2.0 from cvs >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. --=20 Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail |