SV: SV: check_real: what does it really do? and isit enough?

Magnus.Glantz at teliasonera.com Magnus.Glantz at teliasonera.com
Tue Jun 17 09:37:08 CEST 2003


I agree that if open-source apps like mplayer can implement
wmv and wma streaming, then a nagios plugin can aswell.
I guess one could check out the legal stuff around mplayer and
see if you can borrow some ideas. I'm no wiz coder so it would be
very nice to be able to borrow the actual streaming implementation.

//Magnus Glantz

-----Ursprungligt meddelande-----
Från: Matthias Eichler [mailto:mylists at ame.de]
Skickat: den 16 juni 2003 23:36
Till: Glantz, Magnus M. /Communications /070-211 99 22, 070-211 99 22
Kopia: David at feedroom.com; nagios-users at lists.sourceforge.net
Ämne: Re: SV: [Nagios-users] check_real: what does it really do? and
isit enough?


A bit late, but here come my $0.01, some general ideas and questions, as
I am looking for some WMV-monitoring, too...:-)

Sure, MMS is closed source and maybe therefore we have some problems
together with nagios-plugins (what does GPL say about something like
this?!?), BUT:

- there are "open-source"-apps like the genius mplayer which takes the
windows codec.exe and can play WMV and WMA streams perfectly
- there are several WindowsMedia SDK packages for developing stuff

Now my ideas:
- If mplayer is able to stream WM on a linux box, why is it "impossible"
to implement in some check_wmt?
- If it is not possible (by license) to implement the whole transport
protocol as it is closed source, why not implementing the transport
library or something like this and not re-inventing it, just using it?
- If all these ideas were suxx, there is a possibility to remote admin
and monitor the WMserver of some code which is distributed by the WM
SDK's, so some check_wmt plugin would not really check the stream
itself, but contact the server and control the status information of the
server itself?!?

What do you think?!?

Matthias

Am Fre, 2003-04-18 um 09.54 schrieb Magnus.M.Glantz at telia.se:
> My $0.05.
> $USER1$/check_tcp -H $HOSTADDRESS$ -p 1755 -w $ARG1$ -c $ARG2$
>  
> It checks that you can make a TCP connection to the Windows Media Streaming server.
>  
> I think that writing a decent plug-in for Windows Media would be very difficult, cause the MMS protocoll is 'closed' and heavily copywrited.
>  
> I guess that if someone managed to write a plug-in and implement the protocoll, it couldnt not be published without payin' some heavy dues to Microsoft, and that plug-in could not be OpenSource.
>  
> I guess that if someone figured out what to send and what to expect as answere, you could use the check_tcp plugin -s and/or -e switches..
>  
> Cheers,
> //Magnus Glantz
> 
> 	-----Ursprungligt meddelande----- 
> 	Från: David Gitman [mailto:David at feedroom.com] 
> 	Skickat: to 2003-04-17 17:02 
> 	Till: Glantz, Magnus M. /Communications /070-211 99 22, 070-211 99 22 
> 	Kopia: nagios-users at lists.sourceforge.net 
> 	Ämne: RE: [Nagios-users] check_real: what does it really do? and is it enough?
> 	
> 	
> 
> 	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



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
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