Changeset d0a64b649e4eac288431ac20d986830b57fb044d

Show
Ignore:
Timestamp:
09/27/13 20:58:00 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1380315480 -0400
git-parent:

[19725755b41a5c46e6dc80cf68b0f84a8a7ed337]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1380223444 -0400
Message:

Add support for riemann as the IEP subsystem.
Remove all traces of Esper.
Change the license on all our bits to simply match reconnoiter.
Cleanup copyrights and embelish auditing script.
Updated test 108 to check riemann iep results.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • .gitignore

    re8b241b rd0a64b6  
    2424src/java/activemq-data 
    2525src/java/jezebel 
    26 src/java/run-iep.sh 
    27 src/java/jezebel.jar 
    28 src/java/reconnoiter.jar 
     26src/java/lib/jezebel.jar 
     27src/java/lib/reconnoiter.jar 
    2928src/java/classes 
    3029src/jlog/jlog_config.h 
  • LICENSE

    r204b403 rd0a64b6  
    11Noit itself is released under the following license: 
    22 
    3 Copyright (c) 2007,2008, OmniTI Computer Consulting, Inc. 
     3Copyright (c) 2007-2013 Circonus, Inc. All rights reserved. 
     4Copyright (c) 2007-2013 OmniTI Computer Consulting, Inc. 
    45All rights reserved. 
    56 
     
    4849 
    4950activemq: Apache-2.0 [http://activemq.apache.org/] 
    50 reconnoiter.jar: GPLv2 [http://labs.omniti.com/labs/reconnoiter] 
    51 esper: GPLv2 [http://esper.codehaus.org/] 
     51reconnoiter.jar: new-BSD [http://labs.omniti.com/labs/reconnoiter] 
    5252jetty 6: Apache 2.0 [http://www.eclipse.org/jetty/] 
    5353antlr: new-BSD [www.antlr.org] 
  • buildtools/license-audit

    rb9b0b57 rd0a64b6  
    7878%), 
    7979  'labs-omni-BSD' => normalize(q% 
    80 All rights reserved. 
    81  
    8280Redistribution and use in source and binary forms, with or without 
    8381modification, are permitted provided that the following conditions are 
     
    108106%), 
    109107  'labs-msys-BSD' => normalize(q% 
    110 All rights reserved. 
    111  
    112108Redistribution and use in source and binary forms, with or without 
    113109modification, are permitted provided that the following conditions are 
     
    137133OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    138134%), 
     135  'labs-circonus-BSD' => normalize(q% 
     136Redistribution and use in source and binary forms, with or without 
     137modification, are permitted provided that the following conditions are 
     138met: 
     139 
     140    * Redistributions of source code must retain the above copyright 
     141      notice, this list of conditions and the following disclaimer. 
     142    * Redistributions in binary form must reproduce the above 
     143      copyright notice, this list of conditions and the following 
     144      disclaimer in the documentation and/or other materials provided 
     145      with the distribution. 
     146    * Neither the name Circonus, Inc. nor the names 
     147      of its contributors may be used to endorse or promote products 
     148      derived from this software without specific prior written 
     149      permission. 
     150 
     151THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     152"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     153LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     154A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     155OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     156SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     157LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     158DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     159THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     160(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     161OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     162%), 
    139163  'Apache-2.0' => normalize(q% 
    140164 Licensed under the Apache License, Version 2.0 (the "License"); 
     
    150174 limitations under the License. 
    151175%), 
    152   'GPL' => normalize(q% 
    153  Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
    154  All rights reserved. 
    155  The software in this package is published under the terms of the GPL license 
    156  a copy of which can be found at: 
    157  https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
    158 %), 
    159   'Esper-GPL' => normalize(q%published under the terms of the GPL license%), 
    160176  'LGPL' => normalize(q% 
    161177   This library is free software; you can redistribute it and/or 
     
    248264 POSSIBILITY OF SUCH DAMAGE. 
    249265%)], 
     266  'MPL' => [ 
     267    normalize(q%see LICENSE-MPL-RabbitMQ%), 
     268  ], 
    250269  'MIT' => [ 
     270    normalize(q%released under the MIT License%), 
     271    normalize(q% 
     272This library is free software; you can redistribute it and/or modify 
     273it under the terms of the MIT license. See COPYING for details. 
     274%), 
     275    normalize(q% 
     276Permission to use, copy, modify, and/or distribute this software for any 
     277purpose with or without fee is hereby granted, provided that the above 
     278copyright notice and this permission notice appear in all copies. 
     279 
     280THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 
     281WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 
     282MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 
     283ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
     284WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 
     285ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 
     286OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
     287%), 
     288    normalize(q%See dynasm.lua for full copyright%), 
     289    normalize(q%See Copyright Notice in luajit.h%), 
     290    normalize(q% 
     291Permission is hereby granted, free of charge, to any person obtaining 
     292a copy of this software and associated documentation files (the 
     293"Software"), to deal in the Software without restriction, including 
     294without limitation the rights to use, copy, modify, merge, publish, 
     295distribute, sublicense, and/or sell copies of the Software, and to 
     296permit persons to whom the Software is furnished to do so, subject to 
     297the following conditions: 
     298 
     299The above copyright notice and this permission notice shall be 
     300included in all copies or substantial portions of the Software. 
     301 
     302THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
     303EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     304MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
     305IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 
     306CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 
     307TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
     308SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     309%), 
    251310    normalize(q%See Copyright Notice in lua.h%), 
    252311    normalize(q% 
     
    272331           ], 
    273332  'modified-bsd' => normalize(q%this file may be licensed under the new BSD license%), 
    274   'public-domain' => normalize(q%Public domain%), 
    275   'N/A' => normalize(q%Automatically generated%), 
     333  'public-domain' => [ 
     334    normalize(q%Public domain%), 
     335    normalize(q%Donated to the public domain%), 
     336    normalize(q%placed in the public domain%), 
     337    normalize(q%released to the public domain%), 
     338  ], 
     339  'N/A' => [ 
     340    normalize(q%Automatically generated%), 
     341    normalize(q%Generated by the protocol buffer compiler.%), 
     342  ] 
    276343); 
    277344 
     
    321388    } 
    322389  } 
    323   chomp(my $st = `svn st $fname`); 
    324   return 'ignored' if($st =~ /^I\s+/); 
     390  chomp(my $st = `git ls-tree HEAD -- $fname`); 
     391  return 'ignored' unless(length($st)); 
    325392  return $license; 
    326393} 
  • buildtools/version.java

    re574ab0 rd0a64b6  
     1/* 
     2 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
     3 * All rights reserved. 
     4 * 
     5 * Redistribution and use in source and binary forms, with or without 
     6 * modification, are permitted provided that the following conditions are 
     7 * met: 
     8 * 
     9 *     * Redistributions of source code must retain the above copyright 
     10 *       notice, this list of conditions and the following disclaimer. 
     11 *     * Redistributions in binary form must reproduce the above 
     12 *       copyright notice, this list of conditions and the following 
     13 *       disclaimer in the documentation and/or other materials provided 
     14 *       with the distribution. 
     15 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     16 *       of its contributors may be used to endorse or promote products 
     17 *       derived from this software without specific prior written 
     18 *       permission. 
     19 * 
     20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     31 */ 
    132import java.lang.System; 
    233public class version { 
  • configure.in

    rc05dbbb rd0a64b6  
    841841src/noitedit/Makefile 
    842842src/java/Makefile 
    843 src/java/run-iep.sh 
     843src/java/reconnoiter-riemann/run-iep.sh 
    844844src/java/jezebel 
    845845src/scripts/noit-config 
  • src/bundle.proto

    rd8ec2a3 rd0a64b6  
     1/* 
     2 * Copyright (c) 2011 Dan Di Spaltro. All rights reserved. 
     3 * All rights reserved. 
     4 *  
     5 * Redistribution and use in source and binary forms, with or without 
     6 * modification, are permitted provided that the following conditions are 
     7 * met: 
     8 *  
     9 *     * Redistributions of source code must retain the above copyright 
     10 *       notice, this list of conditions and the following disclaimer. 
     11 *     * Redistributions in binary form must reproduce the above 
     12 *       copyright notice, this list of conditions and the following 
     13 *       disclaimer in the documentation and/or other materials provided 
     14 *       with the distribution. 
     15 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     16 *       of its contributors may be used to endorse or promote products 
     17 *       derived from this software without specific prior written 
     18 *       permission. 
     19 *  
     20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     31 */ 
     32 
    133option java_outer_classname = "CheckStatus"; 
    234option java_package = "com.omniti.reconnoiter"; 
  • src/dtrace_probes.h

    ra198c7c rd0a64b6  
     1/* 
     2 * Copyright (c) 2013, OmniTI Computer Consulting, Inc. 
     3 * All rights reserved. 
     4 * 
     5 * Redistribution and use in source and binary forms, with or without 
     6 * modification, are permitted provided that the following conditions are 
     7 * met: 
     8 * 
     9 *     * Redistributions of source code must retain the above copyright 
     10 *       notice, this list of conditions and the following disclaimer. 
     11 *     * Redistributions in binary form must reproduce the above 
     12 *       copyright notice, this list of conditions and the following 
     13 *       disclaimer in the documentation and/or other materials provided 
     14 *       with the distribution. 
     15 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     16 *       of its contributors may be used to endorse or promote products 
     17 *       derived from this software without specific prior written 
     18 *       permission. 
     19 * 
     20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     31 */ 
     32 
    133#include "noit_dtrace_probes.h" 
    234#include "stratcon_dtrace_probes.h" 
  • src/java/Makefile.in

    re8b241b rd0a64b6  
    2323top_srcdir=@top_srcdir@ 
    2424 
     25IEPJAR=reconnoiter-riemann/target/reconnoiter-riemann-1.0-jar-with-dependencies.jar 
     26 
    2527R_FILE=src/com/omniti/reconnoiter/MQListener.java \ 
    26         src/com/omniti/reconnoiter/EventHandler.java \ 
    2728        src/com/omniti/reconnoiter/IEventHandler.java \ 
    2829        src/com/omniti/reconnoiter/MessageHandler.java \ 
    2930        src/com/omniti/reconnoiter/CheckStatus.java \ 
    30         src/com/omniti/reconnoiter/broker/NoitListener.java \ 
    3131        src/com/omniti/reconnoiter/broker/RabbitBroker.java \ 
    3232        src/com/omniti/reconnoiter/broker/IMQBroker.java \ 
    3333        src/com/omniti/reconnoiter/broker/AMQBroker.java \ 
    34         src/com/omniti/reconnoiter/broker/RabbitListener.java \ 
    35         src/com/omniti/reconnoiter/broker/AMQListener.java \ 
    3634        src/com/omniti/reconnoiter/broker/BrokerFactory.java \ 
    3735        src/com/omniti/reconnoiter/event/NoitEvent.java \ 
     
    4442        src/com/omniti/reconnoiter/event/NoitMetricNumeric.java \ 
    4543        src/com/omniti/reconnoiter/event/NoitMetricGeneric.java \ 
    46         src/com/omniti/reconnoiter/event/StratconStatement.java \ 
    47         src/com/omniti/reconnoiter/event/StratconQueryBase.java \ 
    48         src/com/omniti/reconnoiter/event/StratconQuery.java \ 
    49         src/com/omniti/reconnoiter/event/StratconQueryStop.java \ 
    50         src/com/omniti/reconnoiter/esper/ExactStatViewFactory.java \ 
    51         src/com/omniti/reconnoiter/esper/ExactBaseBivariateStatisticsView.java \ 
    52         src/com/omniti/reconnoiter/esper/ExactRegressionLinestView.java \ 
    53         src/com/omniti/reconnoiter/esper/ExactBaseStatisticsBean.java \ 
    54         src/com/omniti/reconnoiter/esper/ExactRegressionBean.java \ 
    55         src/com/omniti/reconnoiter/esper/WeightedValueBean.java \ 
    56         src/com/omniti/reconnoiter/esper/CounterView.java \ 
    57         src/com/omniti/reconnoiter/esper/CounterViewFactory.java \ 
    58         src/com/omniti/reconnoiter/esper/DeriveView.java \ 
    59         src/com/omniti/reconnoiter/esper/DeriveViewFactory.java \ 
    60         src/com/omniti/reconnoiter/IEPEngine.java \ 
    6144        src/com/omniti/reconnoiter/StratconConfig.java \ 
    6245        src/com/omniti/reconnoiter/StratconMessage.java \ 
     
    8770J_CLASS = $(J_JAVA:.java=*.class) 
    8871 
    89 R_SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar lib/esper-4.5.0.jar
     72R_SUPPORT=lib/activemq-all-5.2.0.jar lib/antlr-runtime-3.1.1.jar
    9073        lib/log4j-1.2.15.jar lib/spring-beans-2.5.5.jar lib/spring-context-2.5.5.jar \ 
    9174        lib/cglib-nodep-2.2.jar lib/commons-pool-1.4.jar lib/commons-dbcp-1.2.2.jar \ 
     
    10083        lib/snmp4j-2.1.0.jar 
    10184 
    102 all:    reconnoiter.jar jezebel.jar 
    103         @chmod 755 run-iep.sh 
     85all:    lib/reconnoiter.jar lib/jezebel.jar $(IEPJAR) 
     86        @chmod 755 reconnoiter-riemann/run-iep.sh 
    10487        @chmod 755 jezebel 
    10588 
    106 reconnoiter.jar:      $(R_FILE) 
     89lib/reconnoiter.jar:  $(R_FILE) 
    10790        @echo "- $@ compiling files" 
    10891        @mkdir -p classes 
     
    11194        @(cd classes && $(JAR) cf ../$@ $(R_CLASS)) 
    11295 
    113 jezebel.jar:  $(J_FILE) 
     96lib/jezebel.jar:      $(J_FILE) 
    11497        @echo "- $@ compiling files" 
    11598        @mkdir -p classes 
     
    117100        @echo "- creating $@" 
    118101        @(cd classes && $(JAR) cf ../$@ $(J_CLASS)) 
     102 
     103$(IEPJAR): 
     104        @echo "- building a maven-like repo layout in lib" 
     105        @(cd lib && ./stub-as-maven.sh) 
     106        @echo "- building reconnoiter-riemann" 
     107        @(cd reconnoiter-riemann && mvn compile assembly:single) 
    119108 
    120109install-dirs:   all 
     
    124113install-iep:    install-dirs all 
    125114        $(top_srcdir)/buildtools/mkinstalldirs $(DESTDIR)$(localstatedir)/db/noit-iep 
    126         $(INSTALL) -m 0644 reconnoiter.jar $(DESTDIR)$(javalibdir)/reconnoiter.jar 
    127         for jar in $(R_SUPPORT) ; do \ 
    128                 $(INSTALL) -m 0644 $$jar $(DESTDIR)$(javalibdir)/`echo $$jar | sed -e 's#^lib/##'` ; \ 
    129         done 
    130         $(INSTALL) -m 0755 run-iep.sh $(DESTDIR)$(bindir)/run-iep.sh 
     115        $(INSTALL) -m 0644 $(IEPJAR) $(DESTDIR)$(javalibdir)/ 
     116        $(INSTALL) -m 0755 reconnoiter-riemann/run-iep.sh $(DESTDIR)$(bindir)/run-iep.sh 
     117        $(INSTALL) -m 0644 reconnoiter-riemann/riemann.config $(DESTDIR)$(localstatedir)/db/noit-iep/riemann.config 
    131118        $(INSTALL) -m 0644 log4j.xml $(DESTDIR)$(localstatedir)/db/noit-iep/log4j.xml 
    132119 
    133120install-jezebel:        install-dirs all 
    134         $(INSTALL) -m 0644 jezebel.jar $(DESTDIR)$(javalibdir)/jezebel.jar 
     121        $(INSTALL) -m 0644 lib/jezebel.jar $(DESTDIR)$(javalibdir)/jezebel.jar 
    135122        for jar in $(J_SUPPORT) ; do \ 
    136123                $(INSTALL) -m 0644 $$jar $(DESTDIR)$(javalibdir)/`echo $$jar | sed -e 's#^lib/##'` ; \ 
     
    141128 
    142129clean: 
    143         rm -rf classes 
    144         rm -f reconnoiter.jar jezebel.jar 
     130        rm -rf classes reconnoiter-riemann/target 
     131        rm -f lib/reconnoiter.jar lib/jezebel.jar 
    145132 
    146133distclean:      clean 
    147         rm -f Makefile run-iep.sh jezebel 
     134        rm -f Makefile reconnoiter-riemann/run-iep.sh jezebel 
    148135 
  • src/java/src/com/omniti/reconnoiter/IEventHandler.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    8  
    933package com.omniti.reconnoiter; 
    1034 
  • src/java/src/com/omniti/reconnoiter/MQListener.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    2247    private IMQBroker broker; 
    2348    private LinkedList<StratconMessage> preproc; 
    24     private LinkedList<StratconMessage> queries_toload; 
    2549    private LinkedList<MessageHandler>  alternates; 
    2650    private boolean booted = false; 
     
    3155      this.eh = eh; 
    3256      preproc = new LinkedList<StratconMessage>(); 
    33       queries_toload = new LinkedList<StratconMessage>(); 
    3457      alternates = new LinkedList<MessageHandler>(); 
    3558    } 
     
    4063    public void preprocess(StratconMessage m) throws Exception { 
    4164      if(booted) throw new Exception("Already booted"); 
    42       if(m instanceof StratconQuery) 
    43         queries_toload.add(m); 
    44       else 
    45         preproc.add(m); 
     65      preproc.add(m); 
    4666    } 
    4767 
     
    6787        try { 
    6888          broker.connect(); 
    69           process(eh, queries_toload); 
    7089          try { broker.consume(eh); } catch (Exception anything) {} 
    7190          broker.disconnect(); 
  • src/java/src/com/omniti/reconnoiter/MessageHandler.java

    re8b241b rd0a64b6  
     1/* 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
     4 * All rights reserved. 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     32 */ 
     33 
    134package com.omniti.reconnoiter; 
    235 
  • src/java/src/com/omniti/reconnoiter/StratconConfig.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    2550import org.xml.sax.SAXException; 
    2651 
    27 import com.espertech.esper.client.ConfigurationDBRef; 
    2852import org.apache.commons.dbcp.BasicDataSourceFactory; 
    2953import org.w3c.dom.Document; 
     
    3256 
    3357import com.omniti.reconnoiter.StratconMessage; 
    34 import com.omniti.reconnoiter.event.StratconStatement; 
    35 import com.omniti.reconnoiter.event.StratconQuery; 
    3658 
    3759public class StratconConfig { 
     
    6991        System.out.println("Bad file: " + e.getMessage()); 
    7092    } 
    71   } 
    72  
    73   public List<StratconMessage> getQueries() throws Exception { 
    74     LinkedList<StratconMessage> list = new LinkedList<StratconMessage>(); 
    75     Hashtable<String,StatementNode> stmt_by_id = new Hashtable<String,StatementNode>(); 
    76     Hashtable<String,StatementNode> stmt_by_provider = new Hashtable<String,StatementNode>(); 
    77     XPathFactory factory = XPathFactory.newInstance(); 
    78     XPath xpath = factory.newXPath(); 
    79     XPathExpression expr_epl, expr_req; 
    80     Object result; 
    81     NodeList queries; 
    82     try { 
    83       XPathExpression expr = 
    84         xpath.compile("/stratcon/iep/queries[@master=\"iep\"]//statement"); 
    85       result = expr.evaluate(doc, XPathConstants.NODESET); 
    86  
    87       XPathExpression qexpr = 
    88         xpath.compile("/stratcon/iep/queries[@master=\"iep\"]//query"); 
    89       queries = (NodeList) qexpr.evaluate(doc, XPathConstants.NODESET); 
    90  
    91       expr_epl = xpath.compile("self::node()/epl"); 
    92       expr_req = xpath.compile("self::node()/requires"); 
    93     } 
    94     catch(XPathExpressionException e) { 
    95       System.err.println("Bad expression: " + e.getMessage()); 
    96       return null; 
    97     } 
    98     NodeList nodes = (NodeList) result; 
    99  
    100     /* Phase 1: sweep in all the statements */ 
    101     for(int i = 0; i < nodes.getLength(); i++) { 
    102       StatementNode stmt = new StatementNode(); 
    103       Node node = nodes.item(i); 
    104       Node node_id = node.getAttributes().getNamedItem("id"); 
    105       if(node_id == null) continue; 
    106       stmt.id = node_id.getNodeValue(); 
    107       Node provides_id = node.getAttributes().getNamedItem("provides"); 
    108       if(provides_id != null) stmt.provides = provides_id.getNodeValue(); 
    109       NodeList nodes_epl = (NodeList) expr_epl.evaluate(node, XPathConstants.NODESET); 
    110       if(nodes_epl.getLength() != 1) continue; 
    111       stmt.statement = nodes_epl.item(0).getTextContent(); 
    112       stmt_by_id.put(stmt.id, stmt); 
    113       if(stmt.provides != null) 
    114         if(stmt_by_provider.put(stmt.provides, stmt) != null) 
    115           throw new Exception("Two statements provide: " + stmt.provides); 
    116     } 
    117  
    118     /* Phase 2: load the requires graph */ 
    119     for(int i = 0; i < nodes.getLength(); i++) { 
    120       StatementNode stmt; 
    121       Node node = nodes.item(i); 
    122       Node node_id = node.getAttributes().getNamedItem("id"); 
    123       if(node_id == null) continue; 
    124       String id = node_id.getNodeValue(); 
    125       stmt = stmt_by_id.get(id); 
    126       if(stmt == null) throw new Exception("Cannot find statement: " + id); 
    127       NodeList nodes_req = (NodeList) expr_req.evaluate(node, XPathConstants.NODESET); 
    128       stmt.nrequires = nodes_req.getLength(); 
    129       if(stmt.nrequires > 0) { 
    130         stmt.requires = new StatementNode[stmt.nrequires]; 
    131         for(int j = 0; j < stmt.nrequires; j++) { 
    132           String req = nodes_req.item(j).getTextContent(); 
    133           StatementNode stmt_req = stmt_by_provider.get(req); 
    134           if(stmt_req == null) throw new Exception("Statement " + stmt.id + " requires " + req + " which no one provides."); 
    135           stmt.requires[j] = stmt_req; 
    136         } 
    137       } 
    138     } 
    139  
    140     /* Phase 3: Recursive sweep and mark to detect cycles. 
    141        We're walking the graph backwards here from dependent to provider, 
    142        but a cycle is a cycle, so this validates the graph. */ 
    143     int mgen = 0; 
    144     for ( StatementNode stmt : stmt_by_id.values() ) 
    145       if(stmt_mark_dag(stmt, ++mgen) < 0) throw new Exception("Statement " + stmt.id + " has cyclic requirements."); 
    146  
    147     /* Phase 4: clean the markings */ 
    148     for ( StatementNode stmt : stmt_by_id.values() ) 
    149       stmt.marked = 0; 
    150  
    151     /* Phase 5: do the load */ 
    152     for ( StatementNode stmt : stmt_by_id.values() ) 
    153       stmt_append_to_list(list, stmt); 
    154  
    155  
    156     /* Phase 6: pull in the queries (which is much simpler) */ 
    157     for (int i=0; i<queries.getLength(); i++) { 
    158       Node node = queries.item(i); 
    159       Node node_id = node.getAttributes().getNamedItem("id"); 
    160       if(node_id == null) continue; 
    161       String id = node_id.getNodeValue(); 
    162       Node node_topic = node.getAttributes().getNamedItem("topic"); 
    163       if(node_topic == null) continue; 
    164       String topic = node_topic.getNodeValue(); 
    165       NodeList nodes_epl = (NodeList) expr_epl.evaluate(node, XPathConstants.NODESET); 
    166       if(nodes_epl.getLength() != 1) continue; 
    167       String statement = nodes_epl.item(0).getTextContent(); 
    168       list.add(new StratconQuery(new String[] { "Q", "", id, topic, statement})); 
    169     } 
    170     return list; 
    171   } 
    172  
    173   protected void stmt_append_to_list(List<StratconMessage> l, StatementNode stmt) throws Exception { 
    174     if(stmt.marked > 0) return; 
    175     for(int i=0; i<stmt.nrequires; i++) 
    176       stmt_append_to_list(l, stmt.requires[i]); 
    177  
    178     l.add(new StratconStatement(new String [] { "D", "", stmt.id, stmt.statement })); 
    179  
    180     stmt.marked = 1; 
    181   } 
    182  
    183   protected int stmt_mark_dag(StatementNode stmt, int mgen) { 
    184     if(stmt.marked >= mgen) return -1; 
    185     if(stmt.marked > 0) return 0; 
    186     stmt.marked = mgen; 
    187     for(int i=0; i<stmt.nrequires; i++) 
    188       if(stmt_mark_dag(stmt.requires[i], mgen) < 0) return -1; 
    189     return 0; 
    19093  } 
    19194 
     
    271174    return null; 
    272175  } 
    273   public ConfigurationDBRef getDBConfig() { 
    274     Properties props = new Properties(); 
    275     props.put("username", getDatabaseParameter("user")); 
    276     props.put("password", getDatabaseParameter("password")); 
    277     props.put("driverClassName", "org.postgresql.Driver"); 
    278     props.put("url", "jdbc:postgresql://" + getDatabaseParameter("host") + 
    279                                       "/" + getDatabaseParameter("dbname")); 
    280     props.put("initialSize", 2); 
    281     props.put("validationQuery", "select 1"); 
    282  
    283     ConfigurationDBRef configDB = new ConfigurationDBRef(); 
    284     configDB.setDataSourceFactory(props, BasicDataSourceFactory.class.getName()); 
    285     configDB.setConnectionLifecycleEnum(ConfigurationDBRef.ConnectionLifecycleEnum.POOLED); 
    286     configDB.setExpiryTimeCache(60, 120); 
    287     configDB.setColumnChangeCase(ConfigurationDBRef.ColumnChangeCaseEnum.LOWERCASE); 
    288     // The UUID needs some help mapping 
    289     configDB.addSqlTypesBinding(1111, "String"); 
    290     return configDB; 
    291   } 
    292176} 
  • src/java/src/com/omniti/reconnoiter/StratconMessage.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    147172    StratconMessage.registerType(NoitBundlev1.class); 
    148173    StratconMessage.registerType(NoitBundlev2.class); 
    149     StratconMessage.registerType(StratconStatement.class); 
    150     StratconMessage.registerType(StratconQuery.class); 
    151     StratconMessage.registerType(StratconQueryStop.class); 
    152174    StratconMessage.ignorePrefix("n"); 
    153175  } 
  • src/java/src/com/omniti/reconnoiter/StratconMessageFactory.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/broker/AMQBroker.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    1439import javax.jms.Destination; 
    1540import javax.jms.MessageConsumer; 
     41import javax.jms.MessageProducer; 
     42import javax.jms.DeliveryMode; 
    1643import javax.jms.Session; 
    1744import javax.jms.Message; 
     
    2047import org.apache.activemq.ActiveMQConnectionFactory; 
    2148 
    22 import com.espertech.esper.client.EPServiceProvider; 
    2349import com.omniti.reconnoiter.IEventHandler; 
    2450import com.omniti.reconnoiter.StratconConfig; 
    25 import com.omniti.reconnoiter.event.StratconQuery; 
    2651 
    2752public class AMQBroker implements IMQBroker { 
     
    3459    this.hostName = config.getBrokerParameter("hostname", "127.0.0.1"); 
    3560    this.portNumber = Integer.parseInt(config.getBrokerParameter("port", "61613")); 
    36     String className = config.getBrokerParameter("listenerClass", "com.omniti.reconnoiter.broker.AMQListener"); 
    37     try { 
    38       this.listenerClass = Class.forName(className); 
    39     } 
    40     catch(java.lang.ClassNotFoundException e) { 
    41     } 
    4261  } 
    4362 
     63  private Session session; 
    4464  private MessageConsumer consumer; 
     65  private MessageProducer producer; 
    4566 
    4667  public void disconnect() { 
     
    5273    Connection connection=connectionFactory.createConnection(); 
    5374    connection.start(); 
    54     Session session=connection.createSession(false, Session.AUTO_ACKNOWLEDGE); 
     75    session=connection.createSession(false, Session.AUTO_ACKNOWLEDGE); 
     76 
    5577    Destination destination=session.createQueue("noit.firehose"); 
    56  
    5778    consumer = session.createConsumer(destination); 
    5879  } 
     
    7091          String xml = textMessage.getText(); 
    7192          eh.processMessage(xml); 
    72         } catch(Exception ie) { 
    73           System.err.println(ie); 
    74         } 
     93        } catch(Exception ie) { ie.printStackTrace(); } 
    7594      } 
    7695    } 
    7796  } 
    7897 
    79   public Class getListenerClass() { return listenerClass; } 
    80   public String getAlertRoutingKey() { return ""; } 
     98  public String getAlertRoutingKey() { return "noit.alerts."; } 
    8199  public String getAlertExchangeName() { return "vm://localhost"; } 
     100 
     101  public void alert(String key, String json) { 
     102    String rk; 
     103    if(key == null) rk = getAlertRoutingKey(); 
     104    else rk = getAlertRoutingKey() + key; 
     105 
     106    try { 
     107      Destination destination = session.createTopic(rk); 
     108      producer = session.createProducer(destination); 
     109      producer.setDeliveryMode(DeliveryMode.PERSISTENT); 
     110      TextMessage message = session.createTextMessage(json); 
     111      producer.send(message); 
     112    } catch (Exception e) { e.printStackTrace(); } 
     113  } 
    82114} 
  • src/java/src/com/omniti/reconnoiter/broker/BrokerFactory.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/broker/IMQBroker.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
    934package com.omniti.reconnoiter.broker; 
    1035 
    11 import com.espertech.esper.client.EPServiceProvider; 
    12 import com.espertech.esper.client.UpdateListener; 
    1336import com.omniti.reconnoiter.IEventHandler; 
    14 import com.omniti.reconnoiter.event.StratconQuery; 
    1537import java.io.IOException; 
    1638 
     
    1941  public void disconnect(); 
    2042  public void consume(IEventHandler eh) throws IOException; 
    21   public Class getListenerClass(); 
    2243  public String getAlertExchangeName(); 
    2344  public String getAlertRoutingKey(); 
     45  public void alert(String key, String json); 
    2446} 
  • src/java/src/com/omniti/reconnoiter/broker/RabbitBroker.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    1439import com.omniti.reconnoiter.IEventHandler; 
    1540import com.omniti.reconnoiter.StratconConfig; 
    16 import com.omniti.reconnoiter.event.StratconQuery; 
    1741import com.rabbitmq.client.Connection; 
    1842import com.rabbitmq.client.Channel; 
     43import com.rabbitmq.client.MessageProperties; 
    1944import com.rabbitmq.client.ConnectionFactory; 
    2045import com.rabbitmq.client.QueueingConsumer; 
     
    4368  private Integer heartBeat; 
    4469  private Integer connectTimeout; 
    45   private Class listenerClass; 
    4670  private boolean exclusiveQueue; 
    4771  private boolean durableQueue; 
     
    6084    this.connectTimeout = Integer.parseInt(config.getBrokerParameter("connect_timeout", "5000")); 
    6185 
    62     String className = config.getBrokerParameter("listenerClass", "com.omniti.reconnoiter.broker.RabbitListener"); 
    63     try { 
    64       this.listenerClass = Class.forName(className); 
    65     } 
    66     catch(java.lang.NoClassDefFoundError e) { } 
    67     catch(java.lang.ClassNotFoundException e) { 
    68       logger.warn("Class " + className + " not found."); 
    69     } 
    70  
    7186    this.exchangeType = config.getMQParameter("exchangetype", "fanout"); 
    7287    this.durableExchange = config.getMQParameter("durableexchange", "false").equals("true"); 
     
    129144 
    130145    channel = conn.createChannel(); 
    131     boolean exclusive = false, internal = false, autoDelete = false; 
     146 
     147    boolean durable = durableExchange, exclusive = false, 
     148            internal = false, autoDelete = false; 
    132149    channel.exchangeDeclare(exchangeName, exchangeType, 
    133                             durableExchange, autoDelete, internal, null); 
     150                            durable, autoDelete, internal, null); 
     151 
     152    internal = false; 
     153    durable = true; 
     154    autoDelete = false; 
     155    channel.exchangeDeclare(getAlertExchangeName(), "topic", durable, autoDelete, internal, null);  
     156 
    134157    autoDelete = true; 
    135  
    136158    returnedQueueName = channel.queueDeclare(queueName, durableQueue, 
    137159                                             exclusiveQueue, autoDelete, null).getQueue(); 
     
    169191  } 
    170192 
    171   public Class getListenerClass() { return listenerClass; } 
    172193  public String getAlertExchangeName() { return alertExchangeName; } 
    173194  public String getAlertRoutingKey() { return alertRoutingKey; } 
     195  public void alert(String key, String json) { 
     196    String routingKey; 
     197    if(key == null) routingKey = getAlertRoutingKey(); 
     198    else routingKey = getAlertRoutingKey() + key; 
     199    try { 
     200      byte[] messageBodyBytes = json.getBytes(); 
     201      channel.basicPublish(getAlertExchangeName(), routingKey, 
     202                           MessageProperties.TEXT_PLAIN, messageBodyBytes); 
     203    } catch (Exception e) { 
     204      e.printStackTrace(); 
     205    } 
     206  } 
    174207} 
  • src/java/src/com/omniti/reconnoiter/event/NoitBundlev1.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2011, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitBundlev2.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2011, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitCheck.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
     
    1035 
    1136import com.omniti.reconnoiter.event.NoitEvent; 
    12  
    1337 
    1438public class NoitCheck extends NoitEvent { 
  • src/java/src/com/omniti/reconnoiter/event/NoitEvent.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitMetric.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitMetricGeneric.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2012, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitMetricNumeric.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitMetricText.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/java/src/com/omniti/reconnoiter/event/NoitStatus.java

    re8b241b rd0a64b6  
    11/* 
    2  * Copyright (c) 2009, OmniTI Computer Consulting, Inc. 
     2 * Copyright (c) 2013, Circonus, Inc. All rights reserved. 
     3 * Copyright (c) 2010, OmniTI Computer Consulting, Inc. 
    34 * All rights reserved. 
    4  * The software in this package is published under the terms of the GPL license 
    5  * a copy of which can be found at: 
    6  * https://labs.omniti.com/reconnoiter/trunk/src/java/LICENSE 
     5 * 
     6 * Redistribution and use in source and binary forms, with or without 
     7 * modification, are permitted provided that the following conditions are 
     8 * met: 
     9 * 
     10 *     * Redistributions of source code must retain the above copyright 
     11 *       notice, this list of conditions and the following disclaimer. 
     12 *     * Redistributions in binary form must reproduce the above 
     13 *       copyright notice, this list of conditions and the following 
     14 *       disclaimer in the documentation and/or other materials provided 
     15 *       with the distribution. 
     16 *     * Neither the name OmniTI Computer Consulting, Inc. nor the names 
     17 *       of its contributors may be used to endorse or promote products 
     18 *       derived from this software without specific prior written 
     19 *       permission. 
     20 * 
     21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    732 */ 
    833 
  • src/modules-lua/proxy.lua

    r89c50bd rd0a64b6  
     1-- Copyright (c) 2012, Circonus, Inc. 
     2-- All rights reserved. 
     3-- 
     4-- Redistribution and use in source and binary forms, with or without 
     5-- modification, are permitted provided that the following conditions are 
     6-- met: 
     7-- 
     8--     * Redistributions of source code must retain the above copyright 
     9--       notice, this list of conditions and the following disclaimer. 
     10--     * Redistributions in binary form must reproduce the above 
     11--       copyright notice, this list of conditions and the following 
     12--       disclaimer in the documentation and/or other materials provided 
     13--       with the distribution. 
     14--     * Neither the name Circonus, Inc. nor the names of its contributors 
     15--       may be used to endorse or promote products derived from this 
     16--       software without specific prior written permission. 
     17-- 
     18-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     19-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     20-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     21-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     22-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     23-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     24-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     25-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     26-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     27-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     28-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     29 
    130module(..., package.seeall) 
    231 
  • src/modules/ganglia.c

    r94e88e1 rd0a64b6  
     1/* 
     2 * Copyright (c) 2013, Circonus, Inc. 
     3 * All rights reserved. 
     4 * 
     5 * Redistribution and use in source and binary forms, with or without 
     6 * modification, are permitted provided that the following conditions are 
     7 * met: 
     8 * 
     9 *     * Redistributions of source code must retain the above copyright 
     10 *       notice, this list of conditions and the following disclaimer. 
     11 *     * Redistributions in binary form must reproduce the above 
     12 *       copyright notice, this list of conditions and the following 
     13 *       disclaimer in the documentation and/or other materials provided 
     14 *       with the distribution. 
     15 *     * Neither the name Circonus, Inc. nor the names 
     16 *       of its contributors may be used to endorse or promote products 
     17 *       derived from this software without specific prior written 
     18 *       permission. 
     19 * 
     20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
     21 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
     22 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
     23 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
     24 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
     25 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
     26 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
     27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
     28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
     29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
     30 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
     31 */ 
    132#include "noit_defines.h" 
    233#include "utils/noit_str.h" 
  • src/modules/librabbitmq/amqp.h

    r1e8ae2b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
     2 
    13#ifndef librabbitmq_amqp_h 
    24#define librabbitmq_amqp_h 
  • src/modules/librabbitmq/amqp_api.c

    r9d3260a rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
     2 
    13#include <stdlib.h> 
    24#include <stdio.h> 
  • src/modules/librabbitmq/amqp_config.h

    r1e8ae2b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
     2 
    13#define VERSION "0.0.1" 
    24 
  • src/modules/librabbitmq/amqp_connection.c

    re3b896b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdlib.h> 
    23#include <stdio.h> 
  • src/modules/librabbitmq/amqp_debug.c

    re3b896b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdio.h> 
    23#include <stdlib.h> 
  • src/modules/librabbitmq/amqp_framing.c

    r9d3260a rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdlib.h> 
    23#include <string.h> 
  • src/modules/librabbitmq/amqp_framing.h

    r1e8ae2b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#ifndef librabbitmq_amqp_framing_h 
    23#define librabbitmq_amqp_framing_h 
  • src/modules/librabbitmq/amqp_mem.c

    r1e8ae2b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdlib.h> 
    23#include <stdio.h> 
  • src/modules/librabbitmq/amqp_private.h

    r1e8ae2b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#ifndef librabbitmq_amqp_private_h 
    23#define librabbitmq_amqp_private_h 
  • src/modules/librabbitmq/amqp_socket.c

    r647ef34 rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdlib.h> 
    23#include <stdio.h> 
  • src/modules/librabbitmq/amqp_table.c

    re3b896b rd0a64b6  
     1/* MOZILLA PUBLIC LICENSE Version 1.1 -- see LICENSE-MPL-RabbitMQ */ 
    12#include <stdlib.h> 
    23#include <stdio.h> 
  • src/stratcon.conf.in

    rb5807d3 rd0a64b6  
    4444    <broker adapter="rabbitmq"> 
    4545      <hostname>mq1,mq2</hostname> 
    46       <username>stratcon</username> 
    47       <password>youllneverguess</password> 
     46      <username>guest</username> 
     47      <password>guest</password> 
    4848    </broker> 
    4949    <mq type="rabbitmq"> 
     
    5252      <exchangetype>topic</exchangetype> 
    5353      <routingkey>check,null</routingkey> 
    54       <username>stratcon</username> 
    55       <password>youllneverguess</password> 
     54      <username>guest</username> 
     55      <password>guest</password> 
    5656    </mq> 
    57     <queries master="iep"> 
    58       <statement id="6cc613a4-7f9c-11de-973f-db7e8ccb2e5c" provides="CheckDetails-ddl"> 
    59         <epl>create window CheckDetails.std:unique(uuid).win:keepall() as NoitCheck</epl> 
    60       </statement> 
    61       <statement id="76598f5e-7f9c-11de-9f5b-ebb4dcb2494e" provides="CheckDetails"> 
    62         <requires>CheckDetails-ddl</requires> 
    63         <epl>insert into CheckDetails select * from NoitCheck</epl> 
    64       </statement> 
    65       <statement id="ba189f08-7f99-11de-9013-733772d37479" provides="UnavailableStream"> 
    66         <requires>CheckDetails</requires> 
    67         <epl>insert into UnavailableStream 
    68              select p.* as delta, cds.target as target, cds.module as module, 
    69                     cds.name as name, p.s.uuid as uuid 
    70              from pattern [ every 
    71                             s=NoitStatus(availability='A') -> 
    72                             ( n0 = NoitStatus(uuid=s.uuid, availability='U') 
    73                               and not NoitStatus(uuid=s.uuid, availability='A')) 
    74                           ].std:lastevent() as p 
    75              inner join CheckDetails as cds on cds.uuid = p.s.uuid 
    76         </epl> 
    77       </statement> 
    78       <query id="ce6bf8d2-3dd7-11de-a45c-a7df160cba9e" topic="status"> 
    79         <epl>select * from NoitStatus</epl> 
    80       </query> 
    81     </queries> 
     57    <riemann> 
     58      <configfile>riemann.config</configfile> 
     59    </riemann> 
    8260  </iep> 
    8361 
  • test/t/108_noit_strat.t

    r114e912 rd0a64b6  
    154154is($@, '', 'json numeric payload'); 
    155155undef $stomp; 
    156 $json ||= {}; 
    157 like($json->{r}->{uuid} || '', $uuid_re, 'numeric match has uuid'); 
    158 is($json->{r}->{check_module} || '', 'selfcheck', 'modules is set'); 
     156$json ||= { tags => [] }; 
     157my %tags; 
     158foreach my $tag (@{$json->{tags}}) { 
     159  $tags{$1} = $2 if $tag =~ /([^:]+):(.*)/; 
     160
     161like($tags{check} || '', $uuid_re, 'numeric match has uuid'); 
     162is($tags{module} || '', 'selfcheck', 'modules is set'); 
    159163 
    160164ok(stop_noit, 'shutdown noit'); 
  • test/t/109_check_cancellation.t

    r114e912 rd0a64b6  
    131131SKIP: { 
    132132  skip "$^O doesn't support deferred, uninterruptable", 5 
    133     if $^O =~ /^(?:linux)$/; 
     133    if $^O =~ /^(?:linux|darwin)$/; 
    134134$uuid = '766fb7a0-3ca3-11e0-a725-37c58e6f62dd'; 
    135135$prefix = 'deferred, uninterruptable'; 
  • test/t/testconfig.pm

    r114e912 rd0a64b6  
    363363  $opts->{iep}->{disabled} ||= 'false'; 
    364364  mkdir("$cwd/logs/$opts->{name}_iep_root"); 
    365   open(my $run, "<$cwd/../../src/java/run-iep.sh") || 
     365  open(my $run, "<$cwd/../../src/java/reconnoiter-riemann/run-iep.sh") || 
    366366    BAIL_OUT("cannot open source run-iep.sh"); 
    367   sysopen(my $newrun, "$cwd/logs/$opts->{name}_iep_root/run-iep.sh", O_WRONLY|O_CREAT, 0755) || 
     367  sysopen(my $newrun, "$cwd/logs/$opts->{name}_iep_root/run-iep.sh", O_WRONLY|O_CREAT|O_TRUNC, 0755) || 
    368368    BAIL_OUT("cannot open target run-iep.sh"); 
    369369  while(<$run>) { 
    370     s%^DIRS="%DIRS="$cwd/../../src/java $cwd/../../src/java/lib %; 
     370    s%^DIRS="%DIRS="$cwd/../../src/java/reconnoiter-riemann/target %; 
    371371    print $newrun $_; 
    372372  } 
    373373  close($run); 
    374374  close($newrun); 
     375 
     376  sysopen(my $rconf, "$cwd/logs/$opts->{name}_iep_root/riemann.config", O_WRONLY|O_CREAT|O_TRUNC, 0755) || 
     377    BAIL_OUT("cannot open target riemann.config"); 
     378  print $rconf $opts->{iep}->{riemann}->{config}; 
     379  close($rconf); 
     380 
    375381  print $o qq{ 
    376382  <iep disabled="$opts->{iep}->{disabled}"> 
     
    380386  foreach my $mqt (keys %{$opts->{iep}->{mq}}) { 
    381387    print $o qq{    <mq type="$mqt">\n}; 
    382     while (my ($k,$v) = each %{$opts->{iep}->{mq}->{mqt}}) { 
     388    while (my ($k,$v) = each %{$opts->{iep}->{mq}->{$mqt}}) { 
    383389      print $o qq{      <$k>$v</$k>\n}; 
    384390    } 
     
    392398    print $o qq{    </broker>\n}; 
    393399  } 
    394   print $o qq{    <queries master="iep">\n}; 
    395   foreach my $s (@{$opts->{iep}->{statements}}) { 
    396     print $o qq{        <statement id="$s->{id}" provides="$s->{id}">\n}; 
    397     print $o qq{            <requires>$s->{requires}</requires>\n} if $s->{requires}; 
    398     print $o qq{            <epl><![CDATA[$s->{epl}]]></epl>\n}; 
    399     print $o qq{        </statement>\n}; 
    400   } 
    401   foreach my $s (@{$opts->{iep}->{queries}}) { 
    402     print $o qq{        <query id="$s->{id}" topic="$s->{topic}">\n}; 
    403     print $o qq{            <epl><![CDATA[$s->{epl}]]></epl>\n}; 
    404     print $o qq{        </query>\n}; 
    405   } 
    406   print $o qq{    </queries>\n}; 
    407400  print $o qq{</iep>\n}; 
    408401} 
     
    494487  $options->{cwd} ||= getcwd(); 
    495488  L("make_stratcon_config in $options->{cwd}"); 
    496   $options->{generics} ||= { 'stomp_driver' => { image => 'stomp_driver' }, 
     489  $options->{generics} ||= { 'rabbitmq_driver' => { image => 'rabbitmq_driver' }, 
     490                             'stomp_driver' => { image => 'stomp_driver' }, 
    497491                             'postgres_ingestor' => { image => 'postgres_ingestor' } }; 
    498492  $options->{rest_acls} ||= [ { type => 'deny', rules => [ { type => 'allow' } ] } ]; 
    499   $options->{iep}->{mq} ||= { 'stomp' => {} }; 
     493  $options->{iep}->{mq} ||= { 'stomp' => {}, 
     494                              'rabbitmq' => { 'hostname' => 'localhost' } }; 
     495  $options->{iep}->{riemann} ||= { 'config' => q~ 
     496(logging/init :file "riemann.log") 
     497(streams  
     498  (where (and (not (tagged "riemann")) 
     499              (not (nil? :metric))) 
     500    (reconnoiter/alert-key "numeric"))) 
     501~ }; 
    500502  my $cwd = $options->{cwd}; 
    501503  my $file = "$cwd/logs/${name}_stratcon.conf";