On Mon, Jul 06, 2009 at 09:38:50AM -0700, Laurence M. Perkins
wrote:
> Since this appears to have gotten filtered somewhere, I am
posting it
> again.
Email to you bounced at your end for some reason.
> I have attached the output from the poller. Interfaces 4 and 9
are two
> examples of the problem. If necessary I can disable polling on
all but
> one of the affected interfaces and run it again.
Let's look at interface 4
08:36:00 : H 3 : I 4 : P 10 :
tcp_status,tcp_content,conn_delay(): open|ÿûÿûÿýÿýC|0.00247
-> multi_buffer(): 7 (time P:3002.66 | 0.03)
08:36:10 db_ping(pg) Connection to DB Restored...
08:36:11 db_ping(pg) Connection to DB Restored...
08:36:11 Query Failed - table_insert(events) - insert into
events (date,type,host,interface,state,username,info) VALUES
('2009-06-29 08:36:06','22','3','Port
23','open','tcp_status,tcp_content','ÿû^Aÿû^Cÿý^Xÿý^_C') -
ERROR: invalid byte sequence for encoding "UTF8": 0xff
HINT: This error can also happen if the byte sequence does not
match the encoding expected by the server, which is controlled
by "client_encoding".08:36:11 : H 3 : I 4 : P 15 :
tcp_status,tcp_content(): open|ÿûÿûÿýÿýC -> alarm(22): Event
Added: (time P:0.02 | 5071.99)
08:36:11 : H 3 : I 4 : P 20 :
tcp_connection_number:tcp_conn_number(): 0 -> buffer(): 13 (time
P:0.01 | 0.02)
08:36:11 : H 3 : I 4 : P 30 : tcp_content_analisis(tcp_..ent):
valid|Not Checked -> alarm(39): Nothing was done (time P:0.01 |
0.65)
08:36:12 : H 3 : I 4 : P 60 : no_poller(): 0 -> rrd(*):
tcp_conn_number:0 - conn_delay:0.00247 (time P:0.02 | 25.31)
08:36:12 : H 3 : I 4 : P LPD : last_poll_date(): 1246289771 ->
db(last_poll_date): 1 (time P:0.01 | 2.81)
The alarm comes from the second line, that has that strange
message.
First poller gives the result open|something strange|0.00247
We then yank out the first two results from the buffer and check
them,
we got open here so its Up. But then all hell breaks loose
because the
junk you're sending to the database is upsetting the database so
the
event, your up event, fails to get in.
So, we need to clean it up.
engine/pollers/tcp_status.php has the line:
$data = addslashes( trim (fgets ($fp,100)));
Change the line so it only has things we want, with
$data = preg_replace('/[^ -~]/', '', addslashes( trim (fgets
($fp,100))));
This means anything that is not a space (ASCII 32) to tilde ~
(ASCII 126)
will be replaced with nothing. It strips away the nasties.
It will break any UTf-8 encoding you have going on, but I think
it might
be broken anyhow.
--
Craig Small GnuPG:1C1B D893 1418 2AF4 45EE 95CB C76C E5AC 12CA
DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/ Debian GNU/Linux, software should be
Free
That seems to have fixed it. Strange that it was only affecting telnet.
Sorry the reply took so long, it seems that messages from the mailing
list aren't being delivered to me anymore.
Thanks for the help.
LMP
-
Laurence M. Perkins
Information Services
Stevens County Washington
(509) 684-7505
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users