From: Jessica H. <Je...@gm...> - 2005-03-04 06:33:19
|
Hi, you can do this for the other check_nt checks too but only where perfdata is produced. I can say I've no programming knowledge.. :-) But when nothing works you must try something. When you have antother problem tell it, my I can help you... regards Jessica > 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. > > -----Original Message----- > From: Jessica Holle [mailto:Je...@gm...] > 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. > 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=atof(strtok(recv_buffer,"&")); > mem_commitByte=atof(strtok(NULL,"&")); > percent_used_space = (mem_commitByte / mem_commitLimit) > * > 100; > warning_used_space = ((float)warning_value / 100) * > mem_commitLimit; > critical_used_space = ((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); > > asprintf(&perfdata,_("Memoryusage=%.2fMb;%.2f;%.2f;0.00;%.2f"), > mem_commitByte / 1048567, > warning_used_space / 1048567, critical_used_space / > 1048567, mem_commitLimit / 1048567); > > return_code=STATE_OK; > if(check_critical_value==TRUE && percent_used_space >= > critical_value) > return_code=STATE_CRITICAL; > else if (check_warning_value==TRUE && percent_used_space > >= > warning_value) > return_code=STATE_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? > > > > 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. > > > > Here is the output in nagios from the status detail page: > > > > Status Information: Memory usage: total:945.66 Mb - used: 742.66 Mb > > (79%) - free: 202.99 Mb (21%) > > Performance Data: 'Memory usage'=742.66Mb;756.53;851.09;0.00;945.66 > > > > Here is the output if I run it at the command line: > > > > 0> ./check_nt -H testadmin01 -v MEMUSE -c 80 -w 90 > > > > Memory usage: total:945.66 Mb - used: 744.19 Mb (79%) - free: 201.47 > Mb > > (21%) | 'Memory usage'=744.19Mb;851.09;756.53;0.00;945.66 > > > > Can anyone shed some light on this? Thanks! > > > > Oh I'm using plugins v1.40...Around 2/10/2005.. And I'm using latest > > nagios 2.0 from cvs > > > > > > ------------------------------------------------------- > > 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. > > -- > Lassen Sie Ihren Gedanken freien Lauf... z.B. per FreeSMS > GMX bietet bis zu 100 FreeSMS/Monat: http://www.gmx.net/de/go/mail > > > ------------------------------------------------------- > 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. -- DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen! AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl |