From: Paulo A. G. F. <pau...@pr...> - 2004-08-27 14:11:45
|
James, Read my answers below. Paulo Afonso Graner Fessel Administrador de Ambiente e Sistemas UNIX pau...@pr... OWT Fone: +55 (11) 3038-6464 Fax: +55 (11) 3038-6508 http://www.primesys.com.br =20 =20 =20 =20 > -----Mensagem original----- > De: per...@li...=20 > [mailto:per...@li...] Em nome=20 > de Ferrill, James > Enviada em: quinta-feira, 26 de agosto de 2004 22:02 > Para: per...@li... > Assunto: [Possible SPAM] - [Perfparse-users] check_nt 1.24=20 > doesn't see format strings when using COUNTER - Found word(s)=20 > inkjet cartridges in the Text body >=20 > > I've been trying to collect some counter data and it=20 > doesn't seem to=20 > > work quite right using the latest check_nt from CVS (1.24): > >=20 > > nexismdev04:/usr/local/nagios/libexec# ./check_nt -H=20 > 172.29.19.28 -p=20 > > 1248 -v COUNTER -l "\\Memory\\Available Bytes" > > 270553088 > >=20 > > nexismdev04:/usr/local/nagios/libexec# ./check_nt -H=20 > 172.29.19.28 -p=20 > > 1248 -v COUNTER -l "\\Memory\\Available Bytes","Free memory" > > No unit counter specified > >=20 > > nexismdev04:/usr/local/nagios/libexec# ./check_nt -H=20 > 172.29.19.28 -p=20 > > 1248 -v COUNTER -l "\\Memory\\Available Bytes","Free memory %.2f" > > Free memory %.2f =3D 271278080.00 %|'Free memory=20 > > %.2f'=3D271278080.000000%;0.000000;; > >=20 > > nexismdev04:/usr/local/nagios/libexec# ./check_nt -H=20 > 172.29.19.28 -p=20 > > 1248 -v COUNTER -l "\\Paging File(_Total)\\%% Usage","%.f=20 > %% paging file used." > > %.f %% paging file used. =3D 0.00 %|'%.f %% paging file=20 > > used.'=3D0.000000%;0.000000;; > >=20 > > Is this a bug or am I doing it wrong? Well, I've modified check_nt to show performance data with maximum, minimum and warning/critical thresholds. With these changes, the functionality of specifying the formatting string at the output has really been scrapped. This happened because the description field should exist for PerfParse in order to be graphed - and using the description field already provided for check_nt in CHECK_COUNTER seemed to be the most sensible idea. On the other hand, I couldn't include the formatting field as perfdata information is processed by specific functions (perfdata and fperfdata in plugins/utils.c) where a formatting string can't be used to inform data. So, I thought like Bill Gates and concluded that "two decimal places should be sufficient for anybody". If someone has a better solution, please submit to nagios-plugin-devel list. Until then, you should invoke the plugin like this: [root@nagioslab plugins]#./check_nt -H 10.4.8.210 -v COUNTER -l "\\Paging File(_Total)\\% Usage","Total Paging File Usage" Total Paging File Usage =3D 12.50 %|'Total Paging File Usage'=3D12.503050%;0.000000;0.000000; [root@nagioslab plugins]# ./check_nt -H 10.4.8.210 -v COUNTER -l "\\Memory\\Available Bytes","Free memory","Bytes" Free memory =3D 135479296.00 Bytes|'Free memory'=3D135479296.000000Bytes;0.000000;0.000000; []'s Paulo |