From mjtice@gmail.com Wed Jun 24 08:16:10 2026 From: mjtice@gmail.com To: xymon@xymon.com Subject: play sound Date: Fri, 09 Nov 2007 08:16:10 -0700 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4751106385583890709==" --===============4751106385583890709== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Is it possible to play a sound (through bbdisplay) when an alert it triggered (red, purple, whatever)? This feature is used in Sitescope . . . but Sitescope doesn't hold a flame to hobbit. Matt --===============4751106385583890709==-- From josh@imaginenetworksllc.com Wed Jun 24 08:16:10 2026 From: josh@imaginenetworksllc.com To: xymon@xymon.com Subject: [hobbit] play sound Date: Fri, 09 Nov 2007 10:21:28 -0500 Message-ID: <961092e10711090721w3ee020b5p4617745c374a4997@mail.gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4946501581688974482==" --===============4946501581688974482== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit You could use BBtray and stick in the wave file accordingly. http://www.deadcat.net/viewfile.php?fileid=233 If you want it to be embedded on the WWW pages then you'll have find out what outputs the red/yellow/green/purple backgrounds and title and embed flash (at least I suggest flash) file along side that. On 11/9/07, Matthew Tice wrote: > > Is it possible to play a sound (through bbdisplay) when an alert it > triggered (red, purple, whatever)? This feature is used in Sitescope > . . . but Sitescope doesn't hold a flame to hobbit. > > Matt > > To unsubscribe from the hobbit list, send an e-mail to > hobbit-unsubscribe at hswn.dk > > > -- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373 Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer --===============4946501581688974482==-- From thansmann@directpointe.com Wed Jun 24 08:16:10 2026 From: thansmann@directpointe.com To: xymon@xymon.com Subject: [hobbit] play sound Date: Fri, 09 Nov 2007 10:26:05 -0700 Message-ID: <483387BD5310504F95897573FF3E350D05A6A6D2@dpex.dpcorp.internal> In-Reply-To: <961092e10711090721w3ee020b5p4617745c374a4997@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5040833973625305888==" --===============5040833973625305888== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit I wrote a custom script to do this via javascript. It's a bit over-complicated I think, but I haven't had time to go back and optimize it. It works, and well enough. We keep the non-sound version of bb2.html separate, and thus I had to create a separate page. If you don't need to keep it separate, you could just modify the bb2_header file and include the tag we're adding with the php script. We also added a menu link to the bb2.php page via the menu_items.js file. Replace the sound with whatever you want to be played. Here are the files I wrote: bb2.php: --------------------------------------------------------------- \n" || $daline === "\n") { echo "\n"; } if (preg_match("$<[bB][oO][dD]$", $daline)) { echo $daline; echo ""; break; } echo $daline; } } while (!feof($bb2file)) { $daline = fgets($bb2file); echo $daline; } flcose($bb2file); ?> --------------------------------------------------------------- The Javascript "playsound.js": --------------------------------------------------------------- function doAlarm() { var casdf = document.getElementsByTagName("body"); var dasdf = casdf[0].innerHTML; var myEmbed = document.createElement('embed'); myEmbed.setAttribute('src','giddyupthing.mp3'); myEmbed.setAttribute('hidden','true'); myEmbed.setAttribute('autostart','true'); myEmbed.setAttribute('loop','false'); myEmbed.setAttribute('id','theAlarm'); casdf[0].appendChild(myEmbed); } function check_table(aasdf) { var basdf = aasdf.getElementsByTagName("img") var buh = false; for (i=0;i<=basdf.length;i++) { if (basdf[i] != undefined) { if (basdf[i].title != undefined) { var broken = basdf[i].title.split(":"); if (broken[1] == "red" || broken[1] == "yellow") { if (broken[2] != "acked") { var minsasdf = broken[2]; var testit = minsasdf.substr(0,1); if (isFinite(testit)) { testit = minsasdf.substr(0,2); if (isFinite(testit)) { buh = true; } else if ( parseInt(minsasdf.substr(0,1)) >= 4) { buh = true; } else if ( minsasdf.substr(1,1) == 'd' || minsasdf.substr(1,1) == 'h') { buh = true; } } } } } } } if (buh) { doAlarm(); } } function checkAcks() { var xasdf=document.getElementsByTagName("table"); for (i=0;i<=xasdf.length;i++) { if(xasdf[i] != undefined) { if(xasdf[i].summary != undefined) { if(xasdf[i].summary == "Group Block") { check_table(xasdf[i]); break; } } } } } var snd = document.getElementById("sounds_on"); if ( snd != undefined) { if ( snd.value = "true" ) { checkAcks(); } } --------------------------------------------------------------- Tod Hansmann Network Engineer ________________________________ From: Josh Luthman [mailto:josh at imaginenetworksllc.com] Sent: Friday, November 09, 2007 8:21 AM To: hobbit at hswn.dk Subject: Re: [hobbit] play sound You could use BBtray and stick in the wave file accordingly. http://www.deadcat.net/viewfile.php?fileid=233 If you want it to be embedded on the WWW pages then you'll have find out what outputs the red/yellow/green/purple backgrounds and title and embed flash (at least I suggest flash) file along side that. On 11/9/07, Matthew Tice wrote: Is it possible to play a sound (through bbdisplay) when an alert it triggered (red, purple, whatever)? This feature is used in Sitescope . . . but Sitescope doesn't hold a flame to hobbit. Matt To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk -- Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373 Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer --===============5040833973625305888==--