From: Wilson P. J. <wp....@te...> - 2004-08-30 21:13:22
|
Ben, I use check_tcp on port 23 for two reasons: in order to check if telnet = service is available from my internal routers and to get perfdata for = round trip time as an workaround for check_ping that doesn't have = perfdata. Wilson > -----Original Message----- > From: Ben Clewett [mailto:be...@cl...] > Sent: segunda-feira, 30 de agosto de 2004 16:30 > To: Yves Mettier > Cc: Wilson Pires Jr; per...@li... > Subject: Re: [Perfparse-users] Odd and lack graphs [Was: Cannot run = db- > tool update [was: nagios restarting]] >=20 > There are lots of difficulties with binary data. The escape method we > have for MySQL cannot cope with arbitrary binary data. Several > characters need escaping. There are also characters like NULL, EOF, > which are really bad to processing. If we got that far, the binary is > also illegal for HTML so that would need handling. >=20 > I suggest the correct solution it to try and get the binary data out = of > the plugin output. >=20 > The binary data is likely to be some form of Telnet handshake. = Sending > the screen size, echo, cursor type, terminal type name etc. >=20 > If you are checking a telnet server, I would suggest using the correct > check_telnet plugin which understands the telnet protocol. >=20 > Regards, >=20 > Ben >=20 > Yves Mettier wrote: > >>Yves, > >> > >>The xpdfile_service_perfdata_template is correct. I have graphs for = some > plugins, but > >>not to check_tcp. I don't know why there isn't the "|" in my old = message, > but check_tcp > >>brings perfdata, as you can see: > >> > >>[root@genesis var]# ../libexec/check_tcp -H 10.109.29.2 -p 23 > >>TCP OK - 0.089 second response time on port 23 [ = B=C3=83=E2=80=A1j=C3=A2=CB=9C=C2=BA@=C3=A2=E2=80=93=E2=80=98=C3=A2=E2=80=A2= =C2=9D] > >>|time=3D88581us;0;0;0;10000 > >> > >>How could I check why the data aren't being imported? > > > > > > The reason is probably what is in the binary data. > > 1st: try to go around the difficulty instead of jumping over it: is > there an option to > > check_tcp to write something else than binary data ? check_tcp = --help > will help you to > > answer. > > > > 2nd: I'd really like to know what's inside that binary data. I also > notice that there > > are [ and ] characters. Ben: is there somewhere something that say = that > plugins can put > > binary data between those 2 characters ? In that case, there may be > something to do in > > perfparse ? > > > > Yves > > > > > >>Regards, > >> > >>Wilson > >> > >> > >>>-----Original Message----- > >>>From: Yves Mettier [mailto:yme...@li...] > >>>Sent: segunda-feira, 30 de agosto de 2004 11:12 > >>>To: Wilson Pires Jr > >>>Cc: 'Ben Clewett'; per...@li... > >>>Subject: RE: [Perfparse-users] Odd and lack graphs [Was: Cannot run = db- > >>>tool update [was: nagios restarting]] > >>> > >>>Edit nagios.cfg. Do you have this ? If not, update, and restart = nagios: > >>> > = >>>xpdfile_service_perfdata_template=3D$TIMET$\t$HOSTNAME$\t$SERVICEDESC$= \t$ > OUT > >>>PUT$\t$SERVICESTATE$\t$PERFDATA$ > >>> > >>>I think this will do nothing anyways, when I see check_tcp output. > There > >>>is no "|" > >>>character that mean perfdata following that character. > >>>In that case, either check_tcp does not send perf data, or = check_tcp is > >>>broken. > >>>Have you already run check_tcp in an xterm to see the output ? > (check_tcp > >>>--help for help) > >>>I have no other idea. > >>> > >>>Yves > >>> > >>> > >>>>Ben, > >>>> > >>>>running the command from shell the result is the same. I'm gonna = check > >>> > >>>with > >>> > >>>>nagios-plugins developers. > >>>> > >>>>I'm having problems with the graphs: > >>>> > >>>>All the graphs I'm obtaining are similar to this one attached. It > looks > >>> > >>>so > >>> > >>>>odd. What could be wrong? > >>>> > >>>>Another question is regarding check_tcp, that besides the odd > characters > >>>>brings perfdata but the graphs are empty (Sample Points: 0). > >>>> > >>>>Regards, > >>>> > >>>>Wilson > >>>> > >>>> > >>>>>-----Original Message----- > >>>>>From: Ben Clewett [mailto:be...@cl...] > >>>>>Sent: segunda-feira, 30 de agosto de 2004 05:38 > >>>>>To: Wilson Pires Jr; per...@li... > >>>>>Subject: Re: [Perfparse-users] Cannot run db-tool update [was: = nagios > >>>>>restarting] > >>>>> > >>>>>Wilson, > >>>>> > >>>>>The odd characters in the log file must come from a Nagios = plugin. > Try > >>>>>running the command from the UNIX shell, does this give the same = odd > >>>>>characters? > >>>>> > >>>>>It looks like you have a plugin which reports the binary data it > finds > >>>>>on a TCP port, or something similar. This is dangerous data to > return > >>>>>from a plugin. If this is the case, you may consider writing an > email > >>>>>to the author asking them to escape the binary data... > >>>>> > >>>>>You can disable performance data for a plugin (somewhere?) which = you > >>> > >>>may > >>> > >>>>>consider for this one. > >>>>> > >>>>>Ben > >>>>> > >>>>> > >>>>> > >>>>> > >>>>>Wilson Pires Jr wrote: > >>>>> > >>>>> > >>>>>>Ben, > >>>>>> > >>>>>>I'm glad too! > >>>>>> > >>>>>>The server is the same. With -c option I can run the db update, = but > >>>>> > >>>>>don't perfparse.sh, besides I have into perfparse.sh: > >>>>> > >>>>>>BASE_DIR=3D"/usr/local/nagios" > >>>>>> > >>>>>>But, actually, I have it working by copying perfparse.cfg to > >>>>> > >>>>>/usr/local/etc. > >>>>> > >>>>>>OTOH, I have a new problem. I have graphs from some plugins, but = I > >>> > >>>use > >>> > >>>>>check_tcp on port 23 to monitor Telnet. The output format is ok = (I > >>> > >>>think): > >>> > >>>>>>[root@genesis bin]# cat /usr/local/nagios/var/serviceperf.log | = grep > >>>>> > >>>>>TELNET > >>>>> > >>>>>>1093635155 itb1601a TELNET TCP OK - 0.153 second > >>> > >>>response > >>> > >>>>>time on port 23 [ B=C3=83=E2=80=A1j?@=C3=82=C2=A6+] = OK t > >>>>> > >>>>>>ime=3D152656us;250000;400000;0;10000 > >>>>>>1093635164 sbc1601a TELNET TCP OK - 0.051 second > >>> > >>>response > >>> > >>>>>time on port 23 [ B=C3=83=E2=80=A1j?@=C3=82=C2=A6+] = OK t > >>>>> > >>>>>>ime=3D50577us;250000;400000;0;10000 > >>>>>>1093635174 bsa1721a TELNET TCP OK - 0.088 second > >>> > >>>response > >>> > >>>>>time on port 23 [ B=C3=83=E2=80=A1j?@=C3=82=C2=A6+] = OK t > >>>>> > >>>>>>ime=3D87626us;250000;400000;0;10000 > >>>>>> > >>>>>>Question > >>>>>>What means the odd characters into brackets? > >>>>>> > >>>>>>Problem > >>>>>>The graphs aren't generated to these services. I have graphs for > >>>>> > >>>>>check_ftp, http, users, cpu ... normally, but don't for tcp. > >>>>> > >>>>>>Regards > >>>>>> > >>>>>> > >>>>>> > >>>>>>>-----Original Message----- > >>>>>>>From: Ben Clewett [mailto:Be...@cl...] > >>>>>>>Sent: sexta-feira, 27 de agosto de 2004 13:15 > >>>>>>>To: Wilson Pires Jr > >>>>>>>Subject: Re: [Perfparse-users] Cannot run db-tool update [was: > nagios > >>>>>>>restarting] > >>>>>>> > >>>>>>>Wilson, > >>>>>>> > >>>>>>>Glad you have it working. Is this the same server as you run = the > CGI > >>>>>>>application from PP? If so this uses the same definition of = there > to > >>>>>>>find the config file. Unlike the tools, there is no '-c' = option. > >>> > >>>Can > >>> > >>>>>>>you please check these are working as well? > >>>>>>> > >>>>>>>Regards, Ben > >>>>>>> > >>>>>>>Wilson Pires Jr wrote: > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>>>Ben, > >>>>>>>> > >>>>>>>>I've used the correct prefix. Now, I've deleted the program = and > done > >>>>> > >>>>>the > >>>>> > >>>>>>>>complete recompile. The program was regenerated: > >>>>>>>> > >>>>>>>>[root@genesis bin]# ./configure --prefix=3D/usr/local/nagios > >>>>>>>>--with-imagedir=3D/usr/local/nagios/share/images/ = --with-cgidir > >>>>>>>>=3D/usr/local/nagios/sbin = --with-http_image_path=3D/nagios/images > >>>>>>>> > >>>>>>>>-rwxr-xr-x 1 root root 253547 Aug 27 11:25 = perfparse- > >>> > >>>db- > >>> > >>>>>>>tool > >>>>>>> > >>>>>>> > >>>>>>>>but the problem persisted, it looks for the cfg file the wrong > place: > >>>>>>>> > >>>>>>>>[root@genesis bin]# ./perfparse-db-tool --update > >>>>>>>>Error, can't open configuation file: > "//usr/local/etc/perfparse.cfg" > >>>>>>>> > >>>>>>>>So, I've copied perfparse.cfg to /usr/local/etc and the update = was > >>>>>>>>successfully performed. > >>>>>>>> > >>>>>>>>Thanks for the help. But I'm still curious about the program > >>> > >>>checking > >>> > >>>>>>>the > >>>>>>> > >>>>>>> > >>>>>>>>cfg file into the wrong path... > >>>>>>>> > >>>>>>>>Regards, > >>>>>>>> > >>>>>>>>Wilson > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>>>-----Original Message----- > >>>>>>>>>From: Ben Clewett [mailto:Be...@cl...] > >>>>>>>>>Sent: sexta-feira, 27 de agosto de 2004 11:18 > >>>>>>>>>To: Wilson Pires Jr > >>>>>>>>>Cc: per...@li... > >>>>>>>>>Subject: Re: [Perfparse-users] Cannot run db-tool update = [was: > >>> > >>>nagios > >>> > >>>>>>>>>restarting] > >>>>>>>>> > >>>>>>>>>I note the error is: > >>>>>>>>> > >>>>>>>>>Error, can't open configuration file: > >>> > >>>"//usr/local/etc/perfparse.cfg" > >>> > >>>>>>>>>The file you are after is: > >>>>>>>>> > >>>>>>>>>/usr/local/nagios/etc/perfparse.cfg > >>>>>>>>> > >>>>>>>>>Are you are configuring using: --prefix=3D/usr/local/nagios = ?? > >>>>>>>>> > >>>>>>>>>This should work. :( > >>>>>>>>> > >>>>>>>>>Can you try deleting the program 'perfparse-db-tool' and = doing a > >>>>>>>>>complete recompile, as stated in the README? > >>>>>>>>> > >>>>>>>>>Does this regenerate this program? If you run it, does it = work? > >>>>>>>>> > >>>>>>>>>Ben > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>Wilson Pires Jr wrote: > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>>Remember as well that by default PP will install the file: > >>>>>>>>>>>/usr/local/nagios/etc/perfparse.cfg.example > >>>>>>>>>>>You need to rename this: > >>>>>>>>>>>/usr/local/nagios/etc/perfparse.cfg > >>>>>>>>>>>And add your own settings. > >>>>>>>>>>>Ben. > >>>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>[Wilson Pires Jr] > >>>>>>>>>>I've recompiled and reinstalled, as suggested by Paulo, and > >>> > >>>renamed > >>> > >>>>>and > >>>>> > >>>>>>>>>set > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>perfparse.cfg.example and perfparse.sh.example. But the = problem > >>>>> > >>>>>remains. > >>>>> > >>>>>>>>>I > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>can't run the db update: > >>>>>>>>>> > >>>>>>>>>>[root@genesis bin]# ./perfparse-db-tool --update > >>>>>>>>>>Error, can't open configuation file: > >>> > >>>"//usr/local/etc/perfparse.cfg" > >>> > >>>>>>>>>>The files perfparse-db-tool and perfparse.cfg are owned by = root, > >>> > >>>and > >>> > >>>>>>>>>>perfparse.sh is owned by nagios. Is this correct? > >>>>>>>>>> > >>>>>>>>>>/usr/local/nagios/bin > >>>>>>>>>>-rwxr-xr-x 1 root root 250813 Aug 27 10:24 > perfparse > >>>>>>>>>>-rwxr-xr-x 1 root root 1661 Jul 28 10:42 > >>>>>>>>> > >>>>>>>>>perfparse_daemon.sh > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>-rwxr-xr-x 1 root root 262873 Aug 27 10:24 > perfparse- > >>> > >>>db- > >>> > >>>>>>>>>purge > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>-rwxr-xr-x 1 root root 253547 Aug 27 10:24 > perfparse- > >>> > >>>db- > >>> > >>>>>>>>>tool > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>-rwxr-xr-x 1 nagios nagios 252518 Jul 19 16:59 > perfparse- > >>>>>>>>> > >>>>>>>>>install-db > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>-rwxr-xr-x 1 nagios nagios 259533 Jul 19 16:59 > perfparse- > >>>>>>> > >>>>>>>purge- > >>>>>>> > >>>>>>> > >>>>>>>>>db > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>-rwxr-xr-x 1 nagios nagios 1326 Aug 27 10:32 > >>> > >>>perfparse.sh > >>> > >>>>>>>>>>/usr/local/nagios/etc > >>>>>>>>>>[root@genesis etc]# ls -la perfparse.cfg* > >>>>>>>>>>-rw-r--r-- 1 root root 1303 Aug 27 10:58 > >>> > >>>perfparse.cfg > >>> > >>>>>>>>>>-rw-r--r-- 1 root root 1303 Aug 27 10:24 > >>>>>>>>>>perfparse.cfg.example > >>>>>>>>>> > >>>>>>>>>>As you can see I've tried to run the update as root. What is = my > >>>>> > >>>>>mistake? > >>>>> > >>>>>>>>>Now > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>I can't see the pp web page: > >>>>>>>>>> > >>>>>>>>>>Error message: > >>>>>>>>>>malformed header from script. Bad header=3D<pre>: > >>> > >>>perfgraph.cgi > >>> > >>>>>>>>>>Regarding the nagios restarting and stopping checks = problems, > they > >>>>>>> > >>>>>>>seems > >>>>>>> > >>>>>>> > >>>>>>>>>to > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>be solved. I've changed the use_retained_program_state from = 0 to > 1 > >>>>> > >>>>>and > >>>>> > >>>>>>>>>my > >>>>>>>>> > >>>>>>>>> > >>>>>>>>> > >>>>>>>>>>nagios is checking around 16 hours :-))) > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>>>Paulo Afonso Graner Fessel wrote: > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>> > >>>>>>>>>>>>Recompile perfparse according to the instructions: > >>>>>>>>>>>> > >>>>>>>>>>>>./configure \ > >>>>>>>>>>>> --prefix=3D/usr/local/nagios \ > >>>>>>>>>>>> --with-imagedir=3D/usr/local/nagios/share/images/ = \ > >>>>>>>>>>>> --with-cgidir=3D/usr/local/nagios/sbin \ > >>>>>>>>>>>> --with-http_image_path=3D/nagios/images > >>>>>>>>>>>> > >>>>>>>>>>>>(Of course, I'm assuming that you've got nagios in > >>>>> > >>>>>/usr/local/nagios.) > >>>>> > >>>>>>>>>>>>This way, perfparse.cfg will be installed at > >>> > >>>/usr/local/nagios/etc. > >>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>> > >>>>>>>>>>>>>>You should upgrade to 0.99.09. It may or may not help = with > >>>>>>>>>>>>> > >>>>>>>>>>>>>this issue, > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>>but there are a couple of other bugfixes/enhancements > >>>>>>>>>>>>> > >>>>>>>>>>>>>available in the > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>>>>>>latest version. And don't forget to run > >>>>>>>>>>>>>>'/<path_to>/nagios/bin/perfparse-db-tool --update' after > >>>>>>>>>>>>> > >>>>>>>>>>>>>each upgrade... > >>>>>>>>>>>>> > >>>>>>>>>>>>>[Wilson Pires Jr] > >>>>>>>>>>>>>I'm upgrading, but I can't run the upgrade: > >>>>>>>>>>>>>Error, can't open configuation file: > >>>>> > >>>>>"//usr/local/etc/perfparse.cfg" > >>>>> > >>>>>>>>>>>>>I'm logged as root. The perfparse.cfg owner is root. What > >>>>>>>>>>>>>mistake am I doing? > >>>>>>>>>>>>> > >>>>>>>>>>>>> > >>>>>>>>>> > >>>>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>> > >>>>>>>>------------------------------------------------------- > >>>>>>>>This SF.Net email is sponsored by BEA Weblogic Workshop > >>>>>>>>FREE Java Enterprise J2EE developer tools! > >>>>>>>>Get your free copy of BEA WebLogic Workshop 8.1 today. > >>>>>>>>http://ads.osdn.com/?ad_id=3D5047&alloc_id=3D10808&op=3Dclick > >>>>>>>>_______________________________________________ > >>>>>>>>Perfparse-users mailing list > >>>>>>>>Per...@li... > >>>>>>>>https://lists.sourceforge.net/lists/listinfo/perfparse-users > >>>>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>>>> > >>>> > >>> > >>>-- > >>>- Homepage - http://ymettier.free.fr - http://www.logicacmg.com = - > >>>- GPG key - http://ymettier.free.fr/gpg.txt = - > >>>- Maitretarot - http://www.nongnu.org/maitretarot/ = - > >>>- GTKtalog - http://www.nongnu.org/gtktalog/ = - > >>> > >>> > >> > >> > >> > >> > > > > |