check_real: what does it really do? and is it enough?

David Gitman David at feedroom.com
Thu Apr 17 17:02:20 CEST 2003


Has anyone written a plug-in for Windows Media 9 Streaming?

[-d]

-----Original Message-----
From: Magnus.M.Glantz at telia.se [mailto:Magnus.M.Glantz at telia.se] 
Sent: Tuesday, April 15, 2003 7:01 PM
To: David Gitman
Cc: nagios-users at lists.sourceforge.net

Well, I'm drawing the conclusion after talking with some streaming specialists that sending a DESCRIBE method to the streaming server should do the trick.
 
A successful try indicates that you got a two-way connection to/from the server, the file you're searching for (on, for example an ondemand server) exists, and the server can send you a description of the file.
 
The people I've talked to cannot see any problems that should hinder an actual stream from taking place after the server successfully answered to the DESCRIBE method.
 
Though, I'm still doing some research on this. I'll prolly know in acouple of days, should this not be the case.
 
I'll send a mail to the list, when I know more. :-)
 
Cheers,
//Magnus Glantz
 

	-----Ursprungligt meddelande----- 
	Från: David Gitman [mailto:David at feedroom.com] 
	Skickat: ti 2003-04-15 19:45 
	Till: Magnus Glantz 
	Kopia: 
	Ämne: RE: [Nagios-users] check_real: what does it really do? and is it enough?
	
	

	Have you found out anything?

	 

	[-d]

	
  _____  


	From: Magnus Glantz [mailto:magnus at hacka.net] 
	Sent: Friday, April 11, 2003 2:33 PM
	To: nagios-users at lists.sourceforge.net

	 

	I'm trying to figure out what exactly the check_real plugin checks.. using the -url option, does it actually start a stream with the server? Or does it only check if the .rm file is there and reachable? If check_real only checks for a description of the file, is it enough to say that the service is OK?

	 

	I dumped the conversation (tcpdump -X) while doing: 

	./check_real -H host -u /url/file.rm

	 

	I'm not 100% sure what happens..

	Though.. I've been able to understand some stuff..

	 

	( I've had some help interpeting the packets from the RTSP RFC. 

	http://www.freesoft.org/CIE/RFC/bynum.cgi?2326 )

	 

	 

	16:59:50.696763 netsaint.37062 > streaming-server.rtsp: P 1:36(35) ack 1 win 5840 <nop,nop,timestamp 293933168 2773241811> (DF)
	0x0000   4500 0057 a274 4000 4006 4bd5 c2ec e2e9        E..W.t at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b21d 7381 de14        .C.=...*P...s...
	0x0020   8018 16d0 04f6 0000 0101 080a 1185 1070        ...............p
	0x0030   a54c 4fd3 4f50 5449 4f4e 5320 7274 7370        .LO.OPTIONS.rtsp
	0x0040   3a2f 2f28 6e75 6c6c 293a 3535 3420 5254        ://(null):554.RT
	0x0050   5350                                           SP

	 

	Above.. the Nagios server asks the real server for the available methods. (PLAY PAUSE etc..)

	 

	 

	16:59:50.766763 netsaint.37062 > streaming-server.rtsp: P 45:102(57) ack 270 win 6432 <nop,nop,timestamp 293933175 2773241817> (DF)
	0x0000   4500 006d a277 4000 4006 4bbc c2ec e2e9        E..m.w at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b249 7381 df21        .C.=...*P..Is..!
	0x0020   8018 1920 0dac 0000 0101 080a 1185 1077        ...............w
	0x0030   a54c 4fd9 4445 5343 5249 4245 2072 7473        .LO.DESCRIBE.rts
	0x0040   703a 2f2f 286e 756c 6c29 3a35 3534 2f74        p://(null):554/t
	0x0050   692f                                           i/

	 

	Above..  check_real asks the real-server of a description of the file.

	 

	16:59:51.276763 streaming-server.rtsp > netsaint.37062: P 4614:5232(618) ack 111 win 33304 <nop,nop,timestamp 2773241837 293933187> (DF)
	0x0000   4500 029e 1e46 4000 3906 d4bc c343 e33d        E....F at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 f019 50ff b28b        .....*..s...P...
	0x0020   8018 8218 a8af 0000 0101 080a a54c 4fed        .............LO.
	0x0030   1185 1083 7468 203c 2032 3630 3030 292c        ....th.<.26000),
	0x0040   4176 6572 6167 6542 616e 6477 6964 7468        AverageBandwidth
	0x0050   3d31                                           =1

	 

	After this Nagios (the Netsaint host) sends win 0, and finilizes the connection.

	 

	Now, the question is.. what did the check_real plugin test? That you can get an description of a file on the server?

	The author of the plug-in writes in his source code (check_real.c).

	----------------snip-------------

	 /* Part II - Check stream exists and is ok */
	        if ((result == STATE_OK) && (server_url != NULL)) {

	 

	                /* Part I - Server Check */

	 

	                /* send the OPTIONS request */
	                sprintf (buffer, "DESCRIBE rtsp://%s:%d%s RTSP/1.0\n", host_name,
	                                                 server_port, server_url);
	                result = send (sd, buffer, strlen (buffer), 0);

	 

	                /* send the header sync */
	                sprintf (buffer, "CSeq: 2\n");
	                result = send (sd, buffer, strlen (buffer), 0);

	 

	                /* send a newline so the server knows we're done with the request */
	                sprintf (buffer, "\n");
	                result = send (sd, buffer, strlen (buffer), 0);
	----------------snip-------------

	 

	DESCRIBE seems to be the last actuall command that the check_real plugin send to the server.

	But I could be wrong.. please check for yourselfs.

	 

	An actual stream is from what I can tell, not initialized..

	Though, if the server give an description of the file (the description comes from the file itself) I guess a stream should

	be able to be initialized.. but.. then again, I'm no TCP/IP or RTSP expert.

	 

	 

	Full dump of "check_real -H hostname -u /url/file.rm" below..

	 

	Hope you can shed some light upon this..

	Cheers,

	//Magnus Glantz

	 

	 

	 

	16:59:50.676763 netsaint.37062 > streaming-server.rtsp.rtsp: S 1358934556:1358934556(0) win 5840 <mss 1460,sackOK,timestamp 293933166 0,nop,wscale 0> (DF)
	0x0000   4500 003c a272 4000 4006 4bf2 c2ec e2e9        E..<.r at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b21c 0000 0000        .C.=...*P.......
	0x0020   a002 16d0 2ce0 0000 0204 05b4 0402 080a        ....,...........
	0x0030   1185 106e 0000 0000 0103 0300                  ...n........

	 

	16:59:50.696763 streaming-server.rtsp > netsaint.37062: S 1937890835:1937890835(0) ack 1358934557 win 33304 <nop,nop,timestamp 2773241811 293933166,nop,wscale 0,nop,nop,sackOK,mss 1460> (DF)
	0x0000   4500 0040 1e3f 4000 3906 d721 c343 e33d        E.. at .?@.9..!.C.=
	0x0010   c2ec e2e9 022a 90c6 7381 de13 50ff b21d        .....*..s...P...
	0x0020   b012 8218 68cb 0000 0101 080a a54c 4fd3        ....h........LO.
	0x0030   1185 106e 0103 0300 0101 0402 0204 05b4        ...n............

	 

	16:59:50.696763 netsaint.37062 > streaming-server.rtsp: . ack 1 win 5840 <nop,nop,timestamp 293933168 2773241811> (DF)
	0x0000   4500 0034 a273 4000 4006 4bf9 c2ec e2e9        E..4.s at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b21d 7381 de14        .C.=...*P...s...
	0x0020   8010 16d0 14dd 0000 0101 080a 1185 1070        ...............p
	0x0030   a54c 4fd3                                      .LO.

	 

	16:59:50.696763 netsaint.37062 > streaming-server.rtsp: P 1:36(35) ack 1 win 5840 <nop,nop,timestamp 293933168 2773241811> (DF)
	0x0000   4500 0057 a274 4000 4006 4bd5 c2ec e2e9        E..W.t at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b21d 7381 de14        .C.=...*P...s...
	0x0020   8018 16d0 04f6 0000 0101 080a 1185 1070        ...............p
	0x0030   a54c 4fd3 4f50 5449 4f4e 5320 7274 7370        .LO.OPTIONS.rtsp
	0x0040   3a2f 2f28 6e75 6c6c 293a 3535 3420 5254        ://(null):554.RT
	0x0050   5350                                           SP

	 

	16:59:50.726763 streaming-server.rtsp > netsaint.37062: . ack 36 win 33304 <nop,nop,timestamp 2773241814 293933168> (DF)
	0x0000   4500 0034 1e40 4000 3906 d72c c343 e33d        E..4.@@.9..,.C.=
	0x0010   c2ec e2e9 022a 90c6 7381 de14 50ff b240        .....*..s...P..@
	0x0020   8010 8218 a96e 0000 0101 080a a54c 4fd6        .....n.......LO.
	0x0030   1185 1070                                      ...p

	 

	16:59:50.726763 netsaint.37062 > streaming-server.rtsp: P 36:45(9) ack 1 win 5840 <nop,nop,timestamp 293933171 2773241814> (DF)
	0x0000   4500 003d a275 4000 4006 4bee c2ec e2e9        E..=.u at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b240 7381 de14        .C.=...*P.. at s...
	0x0020   8018 16d0 f6b3 0000 0101 080a 1185 1073        ...............s
	0x0030   a54c 4fd6 4353 6571 3a20 310a 0a               .LO.CSeq:.1..

	 

	16:59:50.766763 streaming-server.rtsp > netsaint.37062: P 1:270(269) ack 45 win 33304 <nop,nop,timestamp 2773241817 293933171> (DF)
	0x0000   4500 0141 1e41 4000 3906 d61e c343 e33d        E..A.A at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 de14 50ff b249        .....*..s...P..I
	0x0020   8018 8218 1a2f 0000 0101 080a a54c 4fd9        ...../.......LO.
	0x0030   1185 1073 5254 5350 2f31 2e30 2032 3030        ...sRTSP/1.0.200
	0x0040   204f 4b0d 0a43 5365 713a 2031 0d0a 4461        .OK..CSeq:.1..Da
	0x0050   7465                                           te

	 

	16:59:50.766763 netsaint.37062 > streaming-server.rtsp: . ack 270 win 6432 <nop,nop,timestamp 293933175 2773241817> (DF)
	0x0000   4500 0034 a276 4000 4006 4bf6 c2ec e2e9        E..4.v at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b249 7381 df21        .C.=...*P..Is..!
	0x0020   8010 1920 1147 0000 0101 080a 1185 1077        .....G.........w
	0x0030   a54c 4fd9                                      .LO.

	 

	16:59:50.766763 netsaint.37062 > streaming-server.rtsp: P 45:102(57) ack 270 win 6432 <nop,nop,timestamp 293933175 2773241817> (DF)
	0x0000   4500 006d a277 4000 4006 4bbc c2ec e2e9        E..m.w at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b249 7381 df21        .C.=...*P..Is..!
	0x0020   8018 1920 0dac 0000 0101 080a 1185 1077        ...............w
	0x0030   a54c 4fd9 4445 5343 5249 4245 2072 7473        .LO.DESCRIBE.rts
	0x0040   703a 2f2f 286e 756c 6c29 3a35 3534 2f74        p://(null):554/t
	0x0050   692f                                           i/

	 

	16:59:50.886763 streaming-server.rtsp > netsaint.37062: . ack 102 win 33304 <nop,nop,timestamp 2773241831 293933175> (DF)
	0x0000   4500 0034 1e42 4000 3906 d72a c343 e33d        E..4.B at .9..*.C.=
	0x0010   c2ec e2e9 022a 90c6 7381 df21 50ff b282        .....*..s..!P...
	0x0020   8010 8218 a807 0000 0101 080a a54c 4fe7        .............LO.
	0x0030   1185 1077                                      ...w

	 

	16:59:50.886763 netsaint.37062 > streaming-server.rtsp: P 102:111(9) ack 270 win 6432 <nop,nop,timestamp 293933187 2773241831> (DF)
	0x0000   4500 003d a278 4000 4006 4beb c2ec e2e9        E..=.x at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b282 7381 df21        .C.=...*P...s..!
	0x0020   8018 1920 f1f3 0000 0101 080a 1185 1083        ................
	0x0030   a54c 4fe7 4353 6571 3a20 320a 0a               .LO.CSeq:.2..

	 

	16:59:51.046763 streaming-server.rtsp > netsaint.37062: . 270:1718(1448) ack 111 win 33304 <nop,nop,timestamp 2773241837 293933187> (DF)
	0x0000   4500 05dc 1e43 4000 3906 d181 c343 e33d        E....C at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 df21 50ff b28b        .....*..s..!P...
	0x0020   8010 8218 3fd8 0000 0101 080a a54c 4fed        ....?........LO.
	0x0030   1185 1083 5254 5350 2f31 2e30 2032 3030        ....RTSP/1.0.200
	0x0040   204f 4b0d 0a43 5365 713a 2032 0d0a 4461        .OK..CSeq:.2..Da
	0x0050   7465                                           te

	 

	16:59:51.046763 netsaint.37062 > streaming-server.rtsp: R 111:111(0) ack 1718 win 8688 <nop,nop,timestamp 293933203 2773241837> (DF)
	0x0000   4500 0034 a279 4000 4006 4bf3 c2ec e2e9        E..4.y at .@.K.....
	0x0010   c343 e33d 90c6 022a 50ff b28b 7381 e4c9        .C.=...*P...s...
	0x0020   8014 21f0 0259 0000 0101 080a 1185 1093        ..!..Y..........
	0x0030   a54c 4fed                                      .LO.

	 

	16:59:51.136763 streaming-server.rtsp > netsaint.37062: P 1718:3166(1448) ack 111 win 33304 <nop,nop,timestamp 2773241837 293933187> (DF)
	0x0000   4500 05dc 1e44 4000 3906 d180 c343 e33d        E....D at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 e4c9 50ff b28b        .....*..s...P...
	0x0020   8018 8218 6d86 0000 0101 080a a54c 4fed        ....m........LO.
	0x0030   1185 1083 300a 613d 5374 6172 7454 696d        ....0.a=StartTim
	0x0040   653a 696e 7465 6765 723b 300a 613d 4176        e:integer;0.a=Av
	0x0050   6742                                           gB

	 

	16:59:51.136763 netsaint.37062 > streaming-server.rtsp: R 1358934667:1358934667(0) win 0 (DF)
	0x0000   4500 0028 0000 4000 ff06 2f78 c2ec e2e9        E..(.. at .../x....
	0x0010   c343 e33d 90c6 022a 50ff b28b 0000 0000        .C.=...*P.......
	0x0020   5004 0000 cd0d 0000                            P.......

	 

	16:59:51.236763 streaming-server.rtsp > netsaint.37062: . 3166:4614(1448) ack 111 win 33304 <nop,nop,timestamp 2773241837 293933187> (DF)
	0x0000   4500 05dc 1e45 4000 3906 d17f c343 e33d        E....E at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 ea71 50ff b28b        .....*..s..qP...
	0x0020   8010 8218 97b0 0000 0101 080a a54c 4fed        .............LO.
	0x0030   1185 1083 696e 7465 6765 723b 3131 3739        ....integer;1179
	0x0040   3538 0a61 3d45 6e64 4f6e 6552 756c 6545        58.a=EndOneRuleE
	0x0050   6e64                                           nd

	 

	16:59:51.236763 netsaint.37062 > streaming-server.rtsp: R 1358934667:1358934667(0) win 0 (DF)
	0x0000   4500 0028 0000 4000 ff06 2f78 c2ec e2e9        E..(.. at .../x....
	0x0010   c343 e33d 90c6 022a 50ff b28b 0000 0000        .C.=...*P.......
	0x0020   5004 0000 cd0d 0000                            P.......

	 

	16:59:51.276763 streaming-server.rtsp > netsaint.37062: P 4614:5232(618) ack 111 win 33304 <nop,nop,timestamp 2773241837 293933187> (DF)
	0x0000   4500 029e 1e46 4000 3906 d4bc c343 e33d        E....F at .9....C.=
	0x0010   c2ec e2e9 022a 90c6 7381 f019 50ff b28b        .....*..s...P...
	0x0020   8018 8218 a8af 0000 0101 080a a54c 4fed        .............LO.
	0x0030   1185 1083 7468 203c 2032 3630 3030 292c        ....th.<.26000),
	0x0040   4176 6572 6167 6542 616e 6477 6964 7468        AverageBandwidth
	0x0050   3d31                                           =1

	 

	16:59:51.276763 netsaint.37062 > streaming-server.rtsp: R 1358934667:1358934667(0) win 0 (DF)
	0x0000   4500 0028 0000 4000 ff06 2f78 c2ec e2e9        E..(.. at .../x....
	0x0010   c343 e33d 90c6 022a 50ff b28b 0000 0000        .C.=...*P.......
	0x0020   5004 0000 cd0d 0000                            P.......

	 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list