diff --git a/watcher/LICENSE.txt b/watcher/LICENSE.txt new file mode 100644 index 00000000000..0734b7a7849 --- /dev/null +++ b/watcher/LICENSE.txt @@ -0,0 +1,412 @@ +WATCHER SOFTWARE LICENSE AGREEMENT + +READ THIS AGREEMENT CAREFULLY, WHICH CONSTITUTES A LEGALLY BINDING AGREEMENT AND GOVERNS YOUR USE OF ELASTICSEARCH'S +WATCHER SOFTWARE. BY INSTALLING AND/OR USING THE WATCHER SOFTWARE, YOU ARE INDICATING THAT YOU AGREE TO THE TERMS AND +CONDITIONS SET FORTH IN THIS AGREEMENT. IF YOU DO NOT AGREE WITH SUCH TERMS AND CONDITIONS, YOU MAY NOT INSTALL OR USE +THE WATCHER SOFTWARE. + +This WATCHER SOFTWARE LICENSE AGREEMENT (this "Agreement") is entered into by and between the applicable Elasticsearch +entity referred to in Attachment 1 below ("Elasticsearch") and the person or entity ("You") that has downloaded +Elasticsearch's Watcher software to which this Agreement is attached ("Watcher Software"). This Agreement is effective as +of the date an applicable ordering document ("Order Form") is entered into by Elasticsearch and You (the "Effective +Date"). + +1. SOFTWARE LICENSE AND RESTRICTIONS + +1.1 License Grants. + +(a) 30 Day Free Trial License. Subject to the terms and conditions of this Agreement, Elasticsearch agrees to grant, +and does hereby grant to You for a period of thirty (30) days from the Effective Date (the "Trial Term"), solely for +Your internal business operations, a limited, non-exclusive, non-transferable, fully paid up, right and license +(without the right to grant or authorize sublicenses) to: (i) install and use the object code version of the Watcher +Software; (ii) use, and distribute internally a reasonable number of copies of the documentation, if any, provided with +the Watcher Software ("Documentation"), provided that You must include on such copies all Elasticsearch trademarks, trade +names, logos and notices present on the Documentation as originally provided to You by Elasticsearch; (iii) permit third +party contractors performing services on Your behalf to use the Watcher Software and Documentation as set forth in (i) +and (ii) above, provided that such use must be solely for Your benefit, and You shall be responsible for all acts and +omissions of such contractors in connection with their use of the Watcher Software. For the avoidance of doubt, You +understand and agree that upon the expiration of the Trial Term, Your license to use the Watcher Software will terminate, +unless you purchase a Qualifying Subscription (as defined below) for Elasticsearch support services. + +(b) Fee-Bearing Production License. Subject to the terms and conditions of this Agreement and complete payment of any +and all applicable fees for a Gold or Platinum production subscription for support services for Elasticsearch open +source software (in each case, a "Qualifying Subscription"), Elasticsearch agrees to grant, and does hereby grant to You +during the term of the applicable Qualifying Subscription, and for the restricted scope of this Agreement, solely for +Your internal business operations, a limited, non-exclusive, non-transferable right and license (without the right to +grant or authorize sublicenses) to: (i) install and use the object code version of the Watcher Software, subject to any +applicable quantitative limitations set forth in the applicable Order Form; (ii) use, and distribute internally a +reasonable number of copies of the Documentation, if any, provided with the Watcher Software, provided that You must +include on such copies all Elasticsearch trademarks, trade names, logos and notices present on the Documentation as +originally provided to You by Elasticsearch; (iii) permit third party contractors performing services on Your behalf to +use the Watcher Software and Documentation as set forth in (i) and (ii) above, provided that such use must be solely for +Your benefit, and You shall be responsible for all acts and omissions of such contractors in connection with their use +of the Watcher Software. + +1.2 Reservation of Rights; Restrictions. As between Elasticsearch and You, Elasticsearch owns all right title and +interest in and to the Watcher Software and any derivative works thereof, and except as expressly set forth in Section +1.1 above, no other license to the Watcher Software is granted to You by implication, estoppel or otherwise. You agree +not to: (i) prepare derivative works from, modify, copy or use the Watcher Software in any manner except as expressly +permitted in this Agreement or applicable law; (ii) transfer, sell, rent, lease, distribute, sublicense, loan or +otherwise transfer the Watcher Software in whole or in part to any third party; (iii) use the Watcher Software for +providing time-sharing services, any software-as-a-service offering ("SaaS"), service bureau services or as part of an +application services provider or other service offering; (iv) alter or remove any proprietary notices in the Watcher +Software; or (v) make available to any third party any analysis of the results of operation of the Watcher Software, +including benchmarking results, without the prior written consent of Elasticsearch. The Watcher Software may contain or +be provided with open source libraries, components, utilities and other open source software (collectively, "Open Source +Software"), which Open Source Software may have applicable license terms as identified on a website designated by +Elasticsearch or otherwise provided with the Watcher Software or Documentation. Notwithstanding anything to the contrary +herein, use of the Open Source Software shall be subject to the license terms and conditions applicable to such Open +Source Software, to the extent required by the applicable licensor (which terms shall not restrict the license rights +granted to You hereunder, but may contain additional rights). + +1.3 Open Source. The Watcher Software may contain or be provided with open source libraries, components, utilities and +other open source software (collectively, "Open Source"), which Open Source may have applicable license terms as +identified on a website designated by Elasticsearch or otherwise provided with the applicable Software or Documentation. +Notwithstanding anything to the contrary herein, use of the Open Source shall be subject to the applicable Open Source +license terms and conditions to the extent required by the applicable licensor (which terms shall not restrict the +license rights granted to You hereunder but may contain additional rights). + +1.4 Audit Rights. You agree that Elasticsearch shall have the right, upon five (5) business days' notice to You, to +audit Your use of the Watcher Software for compliance with any quantitative limitations on Your use of the Watcher +Software that are set forth in the applicable Order Form. You agree to provide Elasticsearch with the necessary access +to the Watcher Software to conduct such an audit either (i) remotely, or (ii) if remote performance is not possible, at +Your facilities, during normal business hours and no more than one (1) time in any twelve (12) month period. In the +event any such audit reveals that You have used the Watcher Software in excess of the applicable quantitative +limitations, You agree to promptly pay to Elasticsearch an amount equal to the difference between the fees actually paid +and the fees that You should have paid to remain in compliance with such quantitative limitations. This Section 1.3 +shall survive for a period of two (2) years from the termination or expiration of this Agreement. + +2. TERM AND TERMINATION + +2.1 Term. This Agreement shall commence on the Effective Date, and shall continue in force for the license term set +forth in the applicable Order Form, unless earlier terminated under Section 2.2 below, provided, however, that if You do +not purchase a Qualifying Subscription prior to the expiration of the Trial Term, this Agreement will expire at the end +of the Trial Term. + +2.2 Termination. Either party may, upon written notice to the other party, terminate this Agreement for material +breach by the other party automatically and without any other formality, if such party has failed to cure such material +breach within thirty (30) days of receiving written notice of such material breach from the non-breaching party. +Notwithstanding the foregoing, this Agreement shall automatically terminate in the event that You intentionally breach +the scope of the license granted in Section 1.1 of this Agreement. + +2.3 Post Termination or Expiration. Upon termination or expiration of this Agreement, for any reason, You shall +promptly cease the use of the Watcher Software and Documentation and destroy (and certify to Elasticsearch in writing the +fact of such destruction), or return to Elasticsearch, all copies of the Watcher Software and Documentation then in Your +possession or under Your control. + +2.4 Survival. Sections 2.3, 2.4, 3, 4 and 5 shall survive any termination or expiration of this Agreement. + +3. DISCLAIMER OF WARRANTIES + +TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, THE WATCHER SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +KIND, AND ELASTICSEARCH AND ITS LICENSORS MAKE NO WARRANTIES WHETHER EXPRESSED, IMPLIED OR STATUTORY REGARDING OR +RELATING TO THE WATCHER SOFTWARE OR DOCUMENTATION. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, ELASTICSEARCH +AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NON-INFRINGEMENT WITH RESPECT TO THE WATCHER SOFTWARE AND DOCUMENTATION, AND WITH RESPECT TO THE USE OF THE FOREGOING. +FURTHER, ELASTICSEARCH DOES NOT WARRANT RESULTS OF USE OR THAT THE WATCHER SOFTWARE WILL BE ERROR FREE OR THAT THE USE OF +THE WATCHER SOFTWARE WILL BE UNINTERRUPTED. + +4. LIMITATION OF LIABILITY + +4.1 Disclaimer of Certain Damages. IN NO EVENT SHALL YOU OR ELASTICSEARCH OR ITS LICENSORS BE LIABLE FOR ANY LOSS OF +PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH OR ARISING OUT OF THE USE OR INABILITY TO +USE THE WATCHER SOFTWARE, OR THE PERFORMANCE OF OR FAILURE TO PERFORM THIS AGREEMENT, WHETHER ALLEGED AS A BREACH OF +CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, EVEN IF THE RESPONSIBLE PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. THE LIMITATIONS OF LIABILITY SET FORTH IN THIS SECTION 4.1 SHALL NOT APPLY TO A BREACH THROUGH GROSS +NEGLIGENCE OR INTENTIONAL MISCONDUCT BY YOU OF THE SCOPE OF THE LICENSE GRANTED IN SECTION 1.1 OR TO ANY OTHER LIABILITY +THAT CANNOT BE EXCLUDED OR LIMITED UNDER APPLICABLE LAW. + +4.2 Damages Cap. IN NO EVENT SHALL ELASTICSEARCH'S OR ITS LICENSORS' AGGREGATE, CUMULATIVE LIABILITY UNDER THIS +AGREEMENT EXCEED THE AMOUNT YOU PAID, IN THE TWELVE (12) MONTHS IMMEDIATELY PRIOR TO THE EVENT GIVING RISE TO LIABILITY, +UNDER THE ELASTICSEARCH SUPPORT SERVICES AGREEMENT PURSUANT TO WHICH YOU PURCHASED THE QUALIFYING SUBSCRIPTION, PROVIDED +THAT IF YOU ARE USING THE WATCHER SOFTWARE UNDER A TRIAL LICENSE PURSUANT TO SECTION 1.1(a), IN NO EVENT SHALL +ELASTICSEARCH'S AGGREGATE, CUMULATIVE LIABILITY UNDER THIS AGREEMENT EXCEED ONE THOUSAND DOLLARS ($1,000). + +4.3 YOU AGREE THAT THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS ARE A REASONABLE ALLOCATION OF THE RISK +BETWEEN THE PARTIES AND WILL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS IN ITS +ESSENTIAL PURPOSE. + +5. MISCELLANEOUS + +This Agreement, including Attachment 1 hereto, which is hereby incorporated herein by this reference, completely and +exclusively states the entire agreement of the parties regarding the subject matter herein, and it supersedes, and its +terms govern, all prior proposals, agreements, or other communications between the parties, oral or written, regarding +such subject matter. For the avoidance of doubt, the parties hereby expressly acknowledge and agree that if You issue +any purchase order or similar document in connection with its purchase of a license to the Watcher Software, You will do +so only for Your internal, administrative purposes and not with the intent to provide any contractual terms. This +Agreement may not be modified except by a subsequently dated, written amendment that expressly amends this Agreement and +which is signed on behalf of Elasticsearch and You, by duly authorized representatives. If any provision(s) hereof is +held unenforceable, this Agreement will continue without said provision and be interpreted to reflect the original +intent of the parties. + + +ATTACHMENT 1 + +ADDITIONAL TERMS AND CONDITIONS + +A. The following additional terms and conditions apply to all Customers with principal offices in the United States of +America: + +(1) Applicable Elasticsearch Entity. The entity providing the license is Elasticsearch, Inc., a Delaware corporation. + +(2) Government Rights. The Watcher Software product is "Commercial Computer Software," as that term is defined in 48 +(C.F.R. 2.101, and as the term is used in 48 C.F.R. Part 12, and is a Commercial Item comprised of "commercial computer +(software" and "commercial computer software documentation". If acquired by or on behalf of a civilian agency, the U.S. +(Government acquires this commercial computer software and/or commercial computer software documentation subject to the +(terms of this Agreement, as specified in 48 C.F.R. 12.212 Computer Software) and 12.211 Technical Data) of the Federal +(Acquisition Regulation "FAR") and its successors. If acquired by or on behalf of any agency within the Department of +(Defense "DOD"), the U.S. Government acquires this commercial computer software and/or commercial computer software +(documentation subject to the terms of the Elasticsearch Software License Agreement as specified in 48 C.F.R. 227.7202-3 +(and 48 C.F.R. 227.7202-4 of the DOD FAR Supplement "DFARS") and its successors, and consistent with 48 C.F.R. 227.7202. +(This U.S. Government Rights clause, consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202 is in lieu of, and +(supersedes, any other FAR, DFARS, or other clause or provision that addresses Government rights in computer software, +(computer software documentation or technical data related to the Watcher Software under this Agreement and in any +(Subcontract under which this commercial computer software and commercial computer software documentation is acquired or +(licensed. + +(3) Export Control. You acknowledge that the goods, software and technology acquired from Elasticsearch are subject to +(U.S. export control laws and regulations, including but not limited to the International Traffic In Arms Regulations +("ITAR") 22 C.F.R. Parts 120-130 2010)); the Export Administration Regulations "EAR") 15 C.F.R. Parts 730-774 2010)); +(the U.S. antiboycott regulations in the EAR and U.S. Department of the Treasury regulations; the economic sanctions +(regulations and guidelines of the U.S. Department of the Treasury, Office of Foreign Assets Control, and the USA +(Patriot Act Title III of Pub. L. 107-56, signed into law October 26, 2001), as amended. You are now and will remain in +(the future compliant with all such export control laws and regulations, and will not export, re-export, otherwise +(transfer any Elasticsearch goods, software or technology or disclose any Elasticsearch software or technology to any +(person contrary to such laws or regulations. You acknowledge that remote access to the Watcher Software may in certain +(circumstances be considered a re-export of Watcher Software, and accordingly, may not be granted in contravention of +(U.S. export control laws and regulations. + +(4) Governing Law. This Agreement will be governed by the laws of the State of California, without regard to its +(conflict of laws principles. This Agreement shall not be governed by the 1980 UN Convention on Contracts for the +(International Sale of Goods. All suits hereunder will be brought solely in Federal Court for the Northern District of +(California, or if that court lacks subject matter jurisdiction, in any California State Court located in Santa Clara +(County. The parties hereby irrevocably waive any and all claims and defenses either might otherwise have in any such +(action or proceeding in any of such courts based upon any alleged lack of personal jurisdiction, improper venue, forum +(non conveniens or any similar claim or defense. + +B. The following additional terms and conditions apply to all Customers with principal offices in Canada: + +(1) Applicable Elasticsearch Entity. The entity providing the license is Elasticsearch B.C. Ltd., a corporation +(incorporated under laws of the Province of British Columbia. + +(2) Export Control. You acknowledge that the goods, software and technology acquired from Elasticsearch are subject to +the restrictions and controls set out in Section A(3) above as well as those imposed by the Export and Import Permits +Act (Canada) and the regulations thereunder and that you will comply with all applicable laws and regulations. Without +limitation, You acknowledge that the Marvel Software, or any portion thereof, will not be exported: (a) to any country +on Canada's Area Control List; (b) to any country subject to UN Security Council embargo or action; or (c) contrary to +Canada's Export Control List Item 5505. You are now and will remain in the future compliant with all such export control +laws and regulations, and will not export, re-export, otherwise transfer any Elasticsearch goods, software or technology +or disclose any Elasticsearch software or technology to any person contrary to such laws or regulations. You will not +export or re-export the Marvel Software, or any portion thereof, directly or indirectly, in violation of the Canadian +export administration laws and regulations to any country or end user, or to any end user who you know or have reason to +know will utilize them in the design, development or production of nuclear, chemical or biological weapons. You further +acknowledge that the Marvel Software product may include technical data subject to such Canadian export regulations. +Elasticsearch does not represent that the Marvel Software is appropriate or available for use in all countries. +Elasticsearch prohibits accessing materials from countries or states where contents are illegal. You are using the +Marvel Software on your own initiative and you are responsible for compliance with all applicable laws. You hereby agree +to indemnify Elasticsearch and its affiliates from any claims, actions, liability or expenses (including reasonable +lawyers' fees) resulting from Your failure to act in accordance with the acknowledgements, agreements, and +representations in this Section B(2). + +(3) Governing Law and Dispute Resolution. This Agreement shall be governed by the Province of Ontario and the federal +laws of Canada applicable therein without regard to conflict of laws provisions. The parties hereby irrevocably waive +any and all claims and defenses either might otherwise have in any such action or proceeding in any of such courts based +upon any alleged lack of personal jurisdiction, improper venue, forum non conveniens or any similar claim or defense. +Any dispute, claim or controversy arising out of or relating to this Agreement or the existence, breach, termination, +enforcement, interpretation or validity thereof, including the determination of the scope or applicability of this +agreement to arbitrate, (each, a "Dispute"), which the parties are unable to resolve after good faith negotiations, +shall be submitted first to the upper management level of the parties. The parties, through their upper management level +representatives shall meet within thirty (30) days of the Dispute being referred to them and if the parties are unable +to resolve such Dispute within thirty (30) days of meeting, the parties agree to seek to resolve the Dispute through +mediation with ADR Chambers in the City of Toronto, Ontario, Canada before pursuing any other proceedings. The costs of +the mediator shall be shared equally by the parties. If the Dispute has not been resolved within thirty (30) days of the +notice to desire to mediate, any party may terminate the mediation and proceed to arbitration and the matter shall be +referred to and finally resolved by arbitration at ADR Chambers pursuant to the general ADR Chambers Rules for +Arbitration in the City of Toronto, Ontario, Canada. The arbitration shall proceed in accordance with the provisions of +the Arbitration Act (Ontario). The arbitral panel shall consist of three (3) arbitrators, selected as follows: each +party shall appoint one (1) arbitrator; and those two (2) arbitrators shall discuss and select a chairman. If the two +(2) party-appointed arbitrators are unable to agree on the chairman, the chairman shall be selected in accordance with +the applicable rules of the arbitration body. Each arbitrator shall be independent of each of the parties. The +arbitrators shall have the authority to grant specific performance and to allocate between the parties the costs of +arbitration (including service fees, arbitrator fees and all other fees related to the arbitration) in such equitable +manner as the arbitrators may determine. The prevailing party in any arbitration shall be entitled to receive +reimbursement of its reasonable expenses incurred in connection therewith. Judgment upon the award so rendered may be +entered in a court having jurisdiction or application may be made to such court for judicial acceptance of any award and +an order of enforcement, as the case may be. Notwithstanding the foregoing, Elasticsearch shall have the right to +institute an action in a court of proper jurisdiction for preliminary injunctive relief pending a final decision by the +arbitrator, provided that a permanent injunction and damages shall only be awarded by the arbitrator. The language to +be used in the arbitral proceedings shall be English. + +(4) Language. Any translation of this Agreement is done for local requirements and in the event of a dispute between +(the English and any non-English version, the English version of this Agreement shall govern. At the request of the +(parties, the official language of this Agreement and all communications and documents relating hereto is the English +(language, and the English-language version shall govern all interpretation of the Agreement. Ë la demande des parties, +(la langue officielle de la prŽsente convention ainsi que toutes communications et tous documents s'y rapportant est la +(langue anglaise, et la version anglaise est celle qui rŽgit toute interprŽtation de la prŽsente convention. + +(5) Disclaimer of Warranties. For Customers with principal offices in the Province of QuŽbec, the following new +(sentence is to be added to the end of Section 3: "SOME JURISDICTIONS DO NOT ALLOW LIMITATIONS OR EXCLUSIONS OF CERTAIN +(TYPES OF DAMAGES AND/OR WARRANTIES AND CONDITIONS. THE LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SET FORTH IN THIS +(AGREEMENT SHALL NOT APPLY IF AND ONLY IF AND TO THE EXTENT THAT THE LAWS OF A COMPETENT JURISDICTION REQUIRE +(LIABILITIES BEYOND AND DESPITE THESE LIMITATIONS, EXCLUSIONS AND DISCLAIMERS." + +(6) Limitation of Liability. For Customers with principal offices in the Province of QuŽbec, the following new +(sentence is to be added to the end of Section 4.1: "SOME JURISDICTIONS DO NOT ALLOW LIMITATIONS OR EXCLUSIONS OF +(CERTAIN TYPES OF DAMAGES AND/OR WARRANTIES AND CONDITIONS. THE LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SET FORTH IN +(THIS AGREEMENT SHALL NOT APPLY IF AND ONLY IF AND TO THE EXTENT THAT THE LAWS OF A COMPETENT JURISDICTION REQUIRE +(LIABILITIES BEYOND AND DESPITE THESE LIMITATIONS, EXCLUSIONS AND DISCLAIMERS." + +C. The following additional terms and conditions apply to all Customers with principal offices outside of the United +States of America and Canada: + +(1) Applicable Elasticsearch Entity. The entity providing the license in Germany is Elasticsearch Gmbh; in France is +(Elasticsearch SARL, in the United Kingdom is Elasticsearch Ltd, in Australia is Elasticsearch Pty Ltd., in Japan is +(Elasticsearch KK, and in all other countries is Elasticsearch BV. + +(2) Choice of Law. This Agreement shall be governed by and construed in accordance with the laws of the State of New +(York, without reference to or application of choice of law rules or principles. Notwithstanding any choice of law +(provision or otherwise, the Uniform Computer Information Transactions Act UCITA) and the United Nations Convention on +(the International Sale of Goods shall not apply. + +(3) Arbitration. Any dispute, claim or controversy arising out of or relating to this Agreement or the existence, +(breach, termination, enforcement, interpretation or validity thereof, including the determination of the scope or +(applicability of this agreement to arbitrate, each, a "Dispute") shall be referred to and finally resolved by +(arbitration under the rules and at the location identified below. The arbitral panel shall consist of three 3) +(arbitrators, selected as follows: each party shall appoint one 1) arbitrator; and those two 2) arbitrators shall +(discuss and select a chairman. If the two party-appointed arbitrators are unable to agree on the chairman, the chairman +(shall be selected in accordance with the applicable rules of the arbitration body. Each arbitrator shall be independent +(of each of the parties. The arbitrators shall have the authority to grant specific performance and to allocate between +(the parties the costs of arbitration including service fees, arbitrator fees and all other fees related to the +(arbitration) in such equitable manner as the arbitrators may determine. The prevailing party in any arbitration shall +(be entitled to receive reimbursement of its reasonable expenses incurred in connection therewith. Judgment upon the +(award so rendered may be entered in a court having jurisdiction or application may be made to such court for judicial +(acceptance of any award and an order of enforcement, as the case may be. Notwithstanding the foregoing, Elasticsearch +(shall have the right to institute an action in a court of proper jurisdiction for preliminary injunctive relief pending +(a final decision by the arbitrator, provided that a permanent injunction and damages shall only be awarded by the +(arbitrator. The language to be used in the arbitral proceedings shall be English. + +(a) In addition, the following terms only apply to Customers with principal offices within Europe, the Middle East or +(Africa EMEA): + +Arbitration Rules and Location. Any Dispute shall be referred to and finally resolved by arbitration under the London +Court of International Arbitration ("LCIA") Rules (which Rules are deemed to be incorporated by reference into this +clause) on the basis that the governing law is the law of the State of New York, USA. The seat, or legal place, of +arbitration shall be London, England. + +(b) In addition, the following terms only apply to Customers with principal offices within Asia Pacific, Australia & +(New Zealand: + +Arbitration Rules and Location. Any Dispute shall be referred to and finally resolved by arbitration under the Rules of +Conciliation and Arbitration of the International Chamber of Commerce ("ICC") in force on the date when the notice of +arbitration is submitted in accordance with such Rules (which Rules are deemed to be incorporated by reference into this +clause) on the basis that the governing law is the law of the State of New York, USA. The seat, or legal place, of +arbitration shall be Singapore. + +(c) In addition, the following terms only apply to Customers with principal offices within the Americas excluding North +(America): + +Arbitration Rules and Location. Any Dispute shall be referred to and finally resolved by arbitration under +International Dispute Resolution Procedures of the American Arbitration Association ("AAA") in force on the date when +the notice of arbitration is submitted in accordance with such Procedures (which Procedures are deemed to be +incorporated by reference into this clause) on the basis that the governing law is the law of the State of New York, +USA. The seat, or legal place, of arbitration shall be New York, New York, USA. + +(4) In addition, for Customers with principal offices within the UK, the following new sentence is added to the end of +(Section 4.1: + +Nothing in this Agreement shall have effect so as to limit or exclude a party's liability for death or personal injury +caused by negligence or for fraud including fraudulent misrepresentation and this Section 4.1 shall take effect subject +to this provision. + +(5) In addition, for Customers with principal offices within France, Sections 1.2, 3 and 4.1 of the Agreement are +(deleted and replaced with the following new Sections 1.2, 3 and 4.1: + +1.2 Reservation of Rights; Restrictions. Elasticsearch owns all right title and interest in and to the Watcher Software +and any derivative works thereof, and except as expressly set forth in Section 1.1 above, no other license to the Watcher +Software is granted to You by implication, or otherwise. You agree not to prepare derivative works from, modify, copy or +use the Watcher Software in any manner except as expressly permitted in this Agreement; provided that You may copy the +Watcher Software for archival purposes, only where such software is provided on a non-durable medium; and You may +decompile the Watcher Software, where necessary for interoperability purposes and where necessary for the correction of +errors making the software unfit for its intended purpose, if such right is not reserved by Elasticsearch as editor of +the Watcher Software. Pursuant to article L122-6-1 of the French intellectual property code, Elasticsearch reserves the +right to correct any bugs as necessary for the Watcher Software to serve its intended purpose. You agree not to: (i) +transfer, sell, rent, lease, distribute, sublicense, loan or otherwise transfer the Watcher Software in whole or in part +to any third party; (ii) use the Watcher Software for providing time-sharing services, any software-as-a-service +offering ("SaaS"), service bureau services or as part of an application services provider or other service offering; +(iii) alter or remove any proprietary notices in the Watcher Software; or (iv) make available to any third party any +analysis of the results of operation of the Watcher Software, including benchmarking results, without the prior written +consent of Elasticsearch. + +3. DISCLAIMER OF WARRANTIES + +TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, THE WATCHER SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +KIND, AND ELASTICSEARCH AND ITS LICENSORS MAKE NO WARRANTIES WHETHER EXPRESSED, IMPLIED OR STATUTORY REGARDING OR +RELATING TO THE WATCHER SOFTWARE OR DOCUMENTATION. TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, ELASTICSEARCH +AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE WITH RESPECT TO THE +WATCHER SOFTWARE AND DOCUMENTATION, AND WITH RESPECT TO THE USE OF THE FOREGOING. FURTHER, ELASTICSEARCH DOES NOT +WARRANT RESULTS OF USE OR THAT THE WATCHER SOFTWARE WILL BE ERROR FREE OR THAT THE USE OF THE WATCHER SOFTWARE WILL BE +UNINTERRUPTED. + +4.1 Disclaimer of Certain Damages. IN NO EVENT SHALL YOU OR ELASTICSEARCH OR ITS LICENSORS BE LIABLE FOR ANY LOSS OF +PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT OR +UNFORESEEABLE DAMAGES OF ANY KIND IN CONNECTION WITH OR ARISING OUT OF THE USE OR INABILITY TO USE THE WATCHER SOFTWARE, +OR THE PERFORMANCE OF OR FAILURE TO PERFORM THIS AGREEMENT, WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, +INCLUDING NEGLIGENCE. THE LIMITATIONS OF LIABILITY SET FORTH IN THIS SECTION 4.1 SHALL NOT APPLY TO A BREACH, THROUGH +GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT BY YOU, OF THE SCOPE OF THE LICENSE GRANTED IN SECTION 1.1, OR IN CASE OF +DEATH OR PERSONAL INJURY. + +(6) In addition, for Customers with principal offices within Australia, Sections 4.1, 4.2 and 4.3 of the Agreement are +(deleted and replaced with the following new Sections 4.1, 4.2 and 4.3: + +4.1 Disclaimer of Certain Damages. Subject to clause 4.3, a party is not liable for Consequential Loss however caused +(including by the negligence of that party) suffered or incurred by the other party in connection with this agreement. +"Consequential Loss" means loss of revenues, loss of reputation, indirect loss, loss of profits, consequential loss, +loss of actual or anticipated savings, indirect loss, lost opportunities, including opportunities to enter into +arrangements with third parties, loss or damage in connection with claims against by third parties, or loss or +corruption or data. + +4.2 Damages Cap. SUBJECT TO CLAUSES 4.1 AND 4.3, ANY LIABILITY OF ELASTICSEARCH FOR ANY LOSS OR DAMAGE, HOWEVER CAUSED +(INCLUDING BY THE NEGLIGENCE OF ELASTICSEARCH), SUFFERED BY YOU IN CONNECTION WITH THIS AGREEMENT IS LIMITED TO THE +AMOUNT YOU PAID, IN THE TWELVE (12) MONTHS IMMEDIATELY PRIOR TO THE EVENT GIVING RISE TO LIABILITY, UNDER THE +ELASTICSEARCH SUPPORT SERVICES AGREEMENT IN CONNECTION WITH WHICH YOU OBTAINED THE LICENSE TO USE THE WATCHER SOFTWARE. +THE LIMITATION SET OUT IN THIS SECTION 4.2 IS AN AGGREGATE LIMIT FOR ALL CLAIMS, WHENEVER MADE. + +4.3 Limitation and Disclaimer Exceptions. If the Competition and Consumer Act 2010 (Cth) or any other legislation or +any other legislation states that there is a guarantee in relation to any good or service supplied by Elasticsearch in +connection with this agreement, and Elasticsearch's liability for failing to comply with that guarantee cannot be +excluded but may be limited, Sections 4.1 and 4.2 do not apply to that liability and instead Elasticsearch's liability +for such failure is limited (at Elasticsearch's election) to, in the case of a supply of goods, the Elasticsearch +replacing the goods or supplying equivalent goods or repairing the goods, or in the case of a supply of services, +Elasticsearch supplying the services again or paying the cost of having the services supplied again. + +(7) In addition, for Customers with principal offices within Japan, Sections 1.2, 3 and 4.1 of the Agreement are +(deleted and replaced with the following new Sections 1.2, 3 and 4.1: + +1.2 Reservation of Rights; Restrictions. As between Elasticsearch and You, Elasticsearch owns all right title and +interest in and to the Watcher Software and any derivative works thereof, and except as expressly set forth in Section +1.1 above, no other license to the Watcher Software is granted to You by implication or otherwise. You agree not to: (i) +prepare derivative works from, modify, copy or use the Watcher Software in any manner except as expressly permitted in +this Agreement or applicable law; (ii) transfer, sell, rent, lease, distribute, sublicense, loan or otherwise transfer +the Watcher Software in whole or in part to any third party; (iii) use the Watcher Software for providing time-sharing +services, any software-as-a-service offering ("SaaS"), service bureau services or as part of an application services +provider or other service offering; (iv) alter or remove any proprietary notices in the Watcher Software; or (v) make +available to any third party any analysis of the results of operation of the Watcher Software, including benchmarking +results, without the prior written consent of Elasticsearch. + +3. DISCLAIMER OF WARRANTIES TO THE MAXIMUM EXTENT PERMITTED UNDER APPLICABLE LAW, THE WATCHER SOFTWARE IS PROVIDED "AS +IS" WITHOUT WARRANTY OF ANY KIND, AND ELASTICSEARCH AND ITS LICENSORS MAKE NO WARRANTIES WHETHER EXPRESSED, IMPLIED OR +STATUTORY REGARDING OR RELATING TO THE WATCHER SOFTWARE OR DOCUMENTATION. TO THE MAXIMUM EXTENT PERMITTED UNDER +APPLICABLE LAW, ELASTICSEARCH AND ITS LICENSORS SPECIFICALLY DISCLAIM ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT WITH RESPECT TO THE WATCHER SOFTWARE AND DOCUMENTATION, AND WITH RESPECT TO +THE USE OF THE FOREGOING. FURTHER, ELASTICSEARCH DOES NOT WARRANT RESULTS OF USE OR THAT THE WATCHER SOFTWARE WILL BE +ERROR FREE OR THAT THE USE OF THE WATCHER SOFTWARE WILL BE UNINTERRUPTED. + +4.1 Disclaimer of Certain Damages. IN NO EVENT SHALL YOU OR ELASTICSEARCH OR ITS LICENSORS BE LIABLE FOR ANY LOSS OF +PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY +SPECIALINDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH OR ARISING OUT OF THE USE +OR INABILITY TO USE THE WATCHER SOFTWARE, OR THE PERFORMANCE OF OR FAILURE TO PERFORM THIS AGREEMENT, WHETHER ALLEGED AS +A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, EVEN IF THE RESPONSIBLE PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. THE LIMITATIONS OF LIABILITY SET FORTH IN THIS SECTION 4.1 SHALL NOT APPLY TO A BREACH +THROUGH GROSS NEGLIGENCE OR INTENTIONAL MISCONDUCT BY YOU OF THE SCOPE OF THE LICENSE GRANTED IN SECTION 1.1 OR TO ANY +OTHER LIABILITY THAT CANNOT BE EXCLUDED OR LIMITED UNDER APPLICABLE LAW. diff --git a/watcher/NOTICE.txt b/watcher/NOTICE.txt new file mode 100644 index 00000000000..c53c7b38f95 --- /dev/null +++ b/watcher/NOTICE.txt @@ -0,0 +1,52 @@ +Elasticsearch Watcher +Copyright 2009-2015 Elastic + +--- +This product includes software developed by The Apache Software +Foundation (http://www.apache.org/). + + +--- +This product contains software distributed under +Common Development and Distribution License 1.0 (CDDL) + +JavaMail API 1.5.3 +https://java.net/projects/javamail/pages/Home +https://java.net/projects/javamail/pages/License + +JavaBeans Activation Framework 1.1.1 +http://www.oracle.com/technetwork/articles/java/index-135046.html + +--- + +This product contains software developed by Mike Samuel. The +following is the copyright and notice text for this software: + + Copyright (c) 2011, Mike Samuel + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + Neither the name of the OWASP nor the names of its contributors may + be used to endorse or promote products derived from this software + without specific prior written permission. + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. + diff --git a/watcher/README.asciidoc b/watcher/README.asciidoc new file mode 100644 index 00000000000..96883248ef7 --- /dev/null +++ b/watcher/README.asciidoc @@ -0,0 +1,7 @@ += Elasticsearch Watcher Plugin + +This plugins adds conditioned scheduled tasks features to elasticsearch - such a task is called a `Watch`. + +You can build the plugin with `mvn package`. + +The documentation is put in the `docs/` directory. diff --git a/watcher/bin/watcher/.in.bat b/watcher/bin/watcher/.in.bat new file mode 100644 index 00000000000..837a61d216e --- /dev/null +++ b/watcher/bin/watcher/.in.bat @@ -0,0 +1,97 @@ +@echo off + +rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +rem or more contributor license agreements. Licensed under the Elastic License; +rem you may not use this file except in compliance with the Elastic License. + +REM .in.bat [args,..] + +SETLOCAL + +if NOT DEFINED JAVA_HOME goto err + +set JAVA_CMD=%1 +if "%JAVA_CMD%" == "" goto err_java_cmd + +REM fix args +for /f "usebackq tokens=1*" %%i in (`echo %*`) DO @ set params=%%j +SHIFT + +set SCRIPT_DIR=%~dp0 +for %%I in ("%SCRIPT_DIR%..\..") do set ES_HOME=%%~dpfI + +REM ***** JAVA options ***** + +if "%ES_MIN_MEM%" == "" ( +set ES_MIN_MEM=256m +) + +if "%ES_MAX_MEM%" == "" ( +set ES_MAX_MEM=1g +) + +if NOT "%ES_HEAP_SIZE%" == "" ( +set ES_MIN_MEM=%ES_HEAP_SIZE% +set ES_MAX_MEM=%ES_HEAP_SIZE% +) + +set JAVA_OPTS=%JAVA_OPTS% -Xms%ES_MIN_MEM% -Xmx%ES_MAX_MEM% + +if NOT "%ES_HEAP_NEWSIZE%" == "" ( + set JAVA_OPTS=%JAVA_OPTS% -Xmn%ES_HEAP_NEWSIZE% +) + +if NOT "%ES_DIRECT_SIZE%" == "" ( + set JAVA_OPTS=%JAVA_OPTS% -XX:MaxDirectMemorySize=%ES_DIRECT_SIZE% +) + +set JAVA_OPTS=%JAVA_OPTS% -Xss256k + +REM Enable aggressive optimizations in the JVM +REM - Disabled by default as it might cause the JVM to crash +REM set JAVA_OPTS=%JAVA_OPTS% -XX:+AggressiveOpts + +set JAVA_OPTS=%JAVA_OPTS% -XX:+UseParNewGC +set JAVA_OPTS=%JAVA_OPTS% -XX:+UseConcMarkSweepGC + +set JAVA_OPTS=%JAVA_OPTS% -XX:CMSInitiatingOccupancyFraction=75 +set JAVA_OPTS=%JAVA_OPTS% -XX:+UseCMSInitiatingOccupancyOnly + +REM When running under Java 7 +REM JAVA_OPTS=%JAVA_OPTS% -XX:+UseCondCardMark + +REM GC logging options -- uncomment to enable +REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCDetails +REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCTimeStamps +REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintClassHistogram +REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintTenuringDistribution +REM JAVA_OPTS=%JAVA_OPTS% -XX:+PrintGCApplicationStoppedTime +REM JAVA_OPTS=%JAVA_OPTS% -Xloggc:/var/log/elasticsearch/gc.log + +REM Causes the JVM to dump its heap on OutOfMemory. +set JAVA_OPTS=%JAVA_OPTS% -XX:+HeapDumpOnOutOfMemoryError +REM The path to the heap dump location, note directory must exists and have enough +REM space for a full heap dump. +REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof + +REM Disables explicit GC +set JAVA_OPTS=%JAVA_OPTS% -XX:+DisableExplicitGC +set ES_CLASSPATH=%ES_CLASSPATH%;%ES_HOME%/lib/elasticsearch-1.4.0-SNAPSHOT.jar;%ES_HOME%/lib/*;%ES_HOME%/lib/sigar/*;%ES_HOME%/plugins/watcher/* +set ES_PARAMS=-Des.path.home="%ES_HOME%" + +SET HOSTNAME=%COMPUTERNAME% + +"%JAVA_HOME%\bin\java" %JAVA_OPTS% %ES_JAVA_OPTS% %ES_PARAMS% -cp "%ES_CLASSPATH%" %JAVA_CMD% %PARAMS% +goto finally + +:err +echo JAVA_HOME environment variable must be set! +ENDLOCAL +EXIT /B 1 +:err_java_cmd +echo Can not call .in.bat without specifying a main java class +ENDLOCAL +EXIT /B 1 + +:finally +ENDLOCAL diff --git a/watcher/bin/watcher/croneval b/watcher/bin/watcher/croneval new file mode 100755 index 00000000000..3a8c3fc30c7 --- /dev/null +++ b/watcher/bin/watcher/croneval @@ -0,0 +1,123 @@ +#!/bin/sh + +# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +# or more contributor license agreements. Licensed under the Elastic License; +# you may not use this file except in compliance with the Elastic License. + +SCRIPT="$0" + +# SCRIPT may be an arbitrarily deep series of symlinks. Loop until we have the concrete path. +while [ -h "$SCRIPT" ] ; do + ls=`ls -ld "$SCRIPT"` + # Drop everything prior to -> + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + SCRIPT="$link" + else + SCRIPT=`dirname "$SCRIPT"`/"$link" + fi +done + +# determine elasticsearch home +ES_HOME=`dirname "$SCRIPT"`/../.. + +# make ELASTICSEARCH_HOME absolute +ES_HOME=`cd "$ES_HOME"; pwd` + +# If an include wasn't specified in the environment, then search for one... +if [ "x$ES_INCLUDE" = "x" ]; then + # Locations (in order) to use when searching for an include file. + for include in /usr/share/elasticsearch/elasticsearch.in.sh \ + /usr/local/share/elasticsearch/elasticsearch.in.sh \ + /opt/elasticsearch/elasticsearch.in.sh \ + ~/.elasticsearch.in.sh \ + "`dirname "$0"`"/../elasticsearch.in.sh \ + $ES_HOME/bin/elasticsearch.in.sh; do + if [ -r "$include" ]; then + . "$include" + break + fi + done +# ...otherwise, source the specified include. +elif [ -r "$ES_INCLUDE" ]; then + . "$ES_INCLUDE" +fi + +if [ -x "$JAVA_HOME/bin/java" ]; then + JAVA="$JAVA_HOME/bin/java" +else + JAVA=`which java` +fi + +if [ ! -x "$JAVA" ]; then + echo "Could not find any executable java binary. Please install java in your PATH or set JAVA_HOME" + exit 1 +fi + +if [ -z "$ES_CLASSPATH" ]; then + echo "You must set the ES_CLASSPATH var" >&2 + exit 1 +fi + +# Special-case path variables. +case `uname` in + CYGWIN*) + ES_CLASSPATH=`cygpath -p -w "$ES_CLASSPATH"` + ES_HOME=`cygpath -p -w "$ES_HOME"` + ;; +esac + +# Try to read package config files +if [ -f "/etc/sysconfig/elasticsearch" ]; then + CONF_DIR=/etc/elasticsearch + CONF_FILE=$CONF_DIR/elasticsearch.yml + + . "/etc/sysconfig/elasticsearch" +elif [ -f "/etc/default/elasticsearch" ]; then + CONF_DIR=/etc/elasticsearch + CONF_FILE=$CONF_DIR/elasticsearch.yml + + . "/etc/default/elasticsearch" +fi + +# Parse any long getopt options and put them into properties +ARGCOUNT=$# +COUNT=0 +while [ $COUNT -lt $ARGCOUNT ] +do + case $1 in + --*) properties="$properties $1 $2" + shift ; shift; COUNT=$(($COUNT+2)) + ;; + *) set -- "$@" "$1"; shift; COUNT=$(($COUNT+1)) + esac +done + +# check if properties already has a config file or config dir +if [ -e "$CONF_DIR" ]; then + case "$properties" in + *-Des.default.path.conf=*) ;; + *) + properties="$properties -Des.default.path.conf=$CONF_DIR" + ;; + esac +fi +if [ -e "$CONF_FILE" ]; then + case "$properties" in + *-Des.default.config=*) ;; + *) + properties="$properties -Des.default.config=$CONF_FILE" + ;; + esac +fi + +export HOSTNAME=`hostname -s` + +# include watcher jars in classpath +ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/watcher/*" + +cd $ES_HOME > /dev/null +$JAVA $ES_JAVA_OPTS -cp "$ES_CLASSPATH" org.elasticsearch.watcher.trigger.schedule.tool.CronEvalTool "$@" $properties +status=$? +cd - > /dev/null +exit $status \ No newline at end of file diff --git a/watcher/bin/watcher/croneval.bat b/watcher/bin/watcher/croneval.bat new file mode 100644 index 00000000000..5506999712f --- /dev/null +++ b/watcher/bin/watcher/croneval.bat @@ -0,0 +1,9 @@ +@echo off + +rem Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one +rem or more contributor license agreements. Licensed under the Elastic License; +rem you may not use this file except in compliance with the Elastic License. + +PUSHD %~dp0 +CALL %~dp0.in.bat org.elasticsearch.watcher.trigger.schedule.tool.CronEvalTool %* +POPD \ No newline at end of file diff --git a/watcher/dev-tools/elasticsearch_license_header.txt b/watcher/dev-tools/elasticsearch_license_header.txt new file mode 100644 index 00000000000..c6375ea7693 --- /dev/null +++ b/watcher/dev-tools/elasticsearch_license_header.txt @@ -0,0 +1,14 @@ +ELASTICSEARCH CONFIDENTIAL +__________________ + + [2014] Elasticsearch Incorporated. All Rights Reserved. + +NOTICE: All information contained herein is, and remains +the property of Elasticsearch Incorporated and its suppliers, +if any. The intellectual and technical concepts contained +herein are proprietary to Elasticsearch Incorporated +and its suppliers and may be covered by U.S. and Foreign Patents, +patents in process, and are protected by trade secret or copyright law. +Dissemination of this information or reproduction of this material +is strictly forbidden unless prior written permission is obtained +from Elasticsearch Incorporated. diff --git a/watcher/dev-tools/integration-tests.xml b/watcher/dev-tools/integration-tests.xml new file mode 100644 index 00000000000..ad09092e52f --- /dev/null +++ b/watcher/dev-tools/integration-tests.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + Installing license plugin... + + + + + + Installing plugin ${project.artifactId}... + + + + Starting up external cluster... + + + + + + + + External cluster started PID ${integ.pid} + + diff --git a/watcher/dev-tools/license_header_definition.xml b/watcher/dev-tools/license_header_definition.xml new file mode 100644 index 00000000000..2b4f64e7110 --- /dev/null +++ b/watcher/dev-tools/license_header_definition.xml @@ -0,0 +1,13 @@ + + + + /* + * + */EOL + + (\s|\t)*/\*.*$ + .*\*/(\s|\t)*$ + false + true + + diff --git a/watcher/dev-tools/pmd/custom.xml b/watcher/dev-tools/pmd/custom.xml new file mode 100644 index 00000000000..58788337ae9 --- /dev/null +++ b/watcher/dev-tools/pmd/custom.xml @@ -0,0 +1,20 @@ + + + + Default ruleset for elasticsearch server project + + + + + + + + + + + + + diff --git a/watcher/dev-tools/randomization.yml b/watcher/dev-tools/randomization.yml new file mode 100644 index 00000000000..734b3e17032 --- /dev/null +++ b/watcher/dev-tools/randomization.yml @@ -0,0 +1,22 @@ +randomization: + elasticsearch: + es150: + version: 1.5.0 + branch: tags/v1.5.0 + lucene.version: 4.10.4 + es151: + version: 1.5.1 + branch: tags/v1.5.1 + lucene.version: 4.10.4 + es152: + version: 1.5.2 + branch: tags/v1.5.2 + lucene.version: 4.10.4 + es153: + version: 1.5.3-SNAPSHOT + branch: origin/1.5 + lucene.version: 4.10.4 + es160: + version: 1.6.0-SNAPSHOT + branch: origin/1.x + lucene.version: 4.10.4 \ No newline at end of file diff --git a/watcher/docs/administering-watcher.asciidoc b/watcher/docs/administering-watcher.asciidoc new file mode 100644 index 00000000000..d663be0e010 --- /dev/null +++ b/watcher/docs/administering-watcher.asciidoc @@ -0,0 +1,21 @@ +[[administering-watcher]] +== Administering Watcher + +This section describes how to configure options for watcher, use Shield to secure access to the +Watcher APIs, get information about Watcher, and monitor watch execution. + +include::administering-watcher/configuring-email.asciidoc[] + +include::administering-watcher/configuring-default-throttle-period.asciidoc[] + +include::administering-watcher/configuring-default-http-timeouts.asciidoc[] + +include::administering-watcher/configuring-default-internal-ops-timeouts.asciidoc[] + +include::administering-watcher/integrating-with-shield.asciidoc[] + +include::administering-watcher/integrating-with-logstash.asciidoc[] + +include::administering-watcher/getting-watcher-statistics.asciidoc[] + +include::administering-watcher/monitoring-watch-execution.asciidoc[] diff --git a/watcher/docs/administering-watcher/configuring-default-http-timeouts.asciidoc b/watcher/docs/administering-watcher/configuring-default-http-timeouts.asciidoc new file mode 100644 index 00000000000..4afbf7d8e30 --- /dev/null +++ b/watcher/docs/administering-watcher/configuring-default-http-timeouts.asciidoc @@ -0,0 +1,21 @@ +[[configuring-default-http-timeouts]] +=== Configuring the Default HTTP Timeouts + +All HTTP requests in watcher (e.g. used by the <> and <>) +are associated with two timeouts: + +Connection Timeout :: Determines how long should the request wait for the HTTP + connection to be established before failing the request. + +Read Timeout :: Assuming the connenction was established, this timeout + determines how long should the request wait for a + response before failing the request. + +By default, both timeouts are set to 10 seconds. It is possible to change this +default using the following settings in `elasticsearch.yml`: + +[source,yaml] +-------------------------------------------------- +watcher.http.default_connection_timeout: 5s +watcher.http.default_read_timeout: 20s +-------------------------------------------------- \ No newline at end of file diff --git a/watcher/docs/administering-watcher/configuring-default-internal-ops-timeouts.asciidoc b/watcher/docs/administering-watcher/configuring-default-internal-ops-timeouts.asciidoc new file mode 100644 index 00000000000..0e806378b0a --- /dev/null +++ b/watcher/docs/administering-watcher/configuring-default-internal-ops-timeouts.asciidoc @@ -0,0 +1,22 @@ +[[configuring-default-internal-ops-timeouts]] +=== Configuring the Default Internal Operations Timeouts + +While Watcher is active, it often accesses different indices in Elasticsearch. +These can be internal indices used for its ongoing operation (such as the `.watches` +index where all the watches are stored) or as part of a watch execution via the +<>, <> or the +<>. + +To to ensure that Watcher's workflow doesn't hang on long running search or +indexing operations, these operations time out after a set period of time. You can +change the default timeouts in `elasticsearch.yml`. The timeouts you can configure +are shown in the following table. + +[[default-internal-ops-timeouts]] +[options="header"] +|====== +| Name | Default | Description +| `watcher.internal.ops.search.default_timeout` | 30s | The default timeout for all internal search operations. +| `watcher.internal.ops.index.default_timeout` | 60s | The default timeout for all internal index operations. +| `watcher.internal.ops.bulk.default_timeout` | 120s | The default timeout for all internal bulk operations. +|====== \ No newline at end of file diff --git a/watcher/docs/administering-watcher/configuring-default-throttle-period.asciidoc b/watcher/docs/administering-watcher/configuring-default-throttle-period.asciidoc new file mode 100644 index 00000000000..1b12012152e --- /dev/null +++ b/watcher/docs/administering-watcher/configuring-default-throttle-period.asciidoc @@ -0,0 +1,19 @@ +[[configuring-default-throttle-period]] +=== Configuring the Default Throttle Period + +By default, Watcher uses a default throttle period of 5 seconds. You can override this +for particular actions by setting the throttle period in the action. You can also +define a throttle period on the watch level that will serve as a default period for +all those actions that don't specify a throttle period themselves. + +To change the default throttle period for all actions that are not configured with a +throttle period neither on the action level nor the watch level, you configure the +`watcher.execution.default_throttle_period` setting in `elasticsearch.yml`. + +For example, to set the default throttle period to 15 minutes, add the following entry +to your `elasticsearch.yml` file and restart Elasticsearch: + +[source,yaml] +-------------------------------------------------- +watcher.execution.default_throttle_period: 15m +-------------------------------------------------- \ No newline at end of file diff --git a/watcher/docs/administering-watcher/configuring-email.asciidoc b/watcher/docs/administering-watcher/configuring-email.asciidoc new file mode 100644 index 00000000000..50b5a9a8254 --- /dev/null +++ b/watcher/docs/administering-watcher/configuring-email.asciidoc @@ -0,0 +1,270 @@ +[[email-services]] +=== Configuring Watcher to Send Email +You can configure Watcher to send email from any SMTP email service. Email messages can contain +basic HTML tags. You can control which tags are allowed by +<>. + +[[email-account]] +==== Configuring Email Accounts +You configure the accounts Watcher can use to send email in your `elasticsearch.yml` configuration file. +Each account configuration has a unique name and specifies all of the SMTP information needed +to send email from that account. You can also specify defaults for all emails that are sent through +the account. For example, you can set defaults for the `from` and `bcc` fields to ensure that all +emails are sent from the same address and always blind copied to the same address. + +IMPORTANT: If your email account is configured to require two step verification, + you need to generate and use a unique App Password to send email from + Watcher. Authentication will fail if you use your primary password. + +If you configure multiple email accounts, you specify which account the email should be sent +with in the <> action. If there is only one account configured, you +do not have to specify the `account` attribute in the action definition. However, if you configure +multiple accounts and omit the `account` attribute, there is no guarantee which account will be +used to send the email. + +To add an email account, set the `watcher.actions.email.service.account` property in +`elasticsearch.yml`. See <> for the +supported attributes. + +For example, the following snippet configures a single Gmail account named `work`. + +[source,yaml] +-------------------------------------------------- +watcher.actions.email.service.account: + work: + profile: gmail + email_defaults: + from: 'John Doe ' + bcc: archive@host.domain + smtp: + auth: true + starttls.enable: true + host: smtp.gmail.com + port: 587 + user: + password: +-------------------------------------------------- + +[[email-profile]] +The _email profile_ defines a strategy for building a MIME message. As with almost every standard +out there, different email systems interpret the MIME standard differently and have slightly +different ways of structuring MIME messages. Watcher provides three email profiles: `standard` +(default), `gmail`, and `outlook`. + +If you are using Gmail or Outlook, we recommend using the corresponding profile. Use the `standard` +profile if you are using some other email system. For more information about configuring Watcher +to work with different email systems, see: + +* <> +* <> +* <> +* <> + +[[email-account-attributes]] +.Email Account Attributes +[options="header"] +|====== +| Name | Required | Default | Description +| `profile` | no | standard | The <> to use to + build the MIME messages that are sent from + the account. Valid values: `standard` + (default), `gmail` and `outlook`. +| `email_defaults.*` | no | - | An optional set of email attributes to use + as defaults for the emails sent from the + account. See <> for the supported + attributes. for the possible email + attributes) +| `smtp.auth` | no | false | When `true`, attempt to authenticate the + user using the AUTH command. +| `smtp.host` | yes | - | The SMTP server to connect to. +| `smtp.port` | no | 25 | The SMTP server port to connect to. +| `smtp.user` | yes | - | The user name for SMTP. +| `smtp.password` | no | - | The password for the specified SMTP user. +| `smtp.starttls.enable` | no | false | When `true`, enables the use of the + `STARTTLS` command (if supported by + the server) to switch the connection to a + TLS-protected connection before issuing any + login commands. Note that an appropriate + trust store must configured so that the + client will trust the server's certificate. + Defaults to `false`. +| `smtp.*` | no | - | SMTP attributes that enable fine control + over the SMTP protocol when sending messages. + See https://javamail.java.net/nonav/docs/api/com/sun/mail/smtp/package-summary.html[com.sun.mail.smtp] + for the full list of SMTP properties you can + set. +|====== + +[[gmail]] +===== Sending Email From Gmail + +Use the following email account settings to send email from the https://mail.google.com[Gmail] +SMTP service: + +[source,yaml] +-------------------------------------------------- +watcher.actions.email.service.account: + gmail_account: + profile: gmail + smtp: + auth: true + starttls.enable: true + host: smtp.gmail.com + port: 587 + user: + password: +-------------------------------------------------- + +If you get an authentication error that indicates that you need to continue the +sign-in process from a web browser when Watcher attempts to send email, you need +to configure Gmail to https://support.google.com/accounts/answer/6010255?hl=en[Allow Less +Secure Apps to access your account]. + +If two-step verification is enabled for your account, you must generate and use +a unique App Password to send email from Watcher.See +https://support.google.com/accounts/answer/185833?hl=en[Sign in using App Passwords] +for more information. + +[[outlook]] +===== Sending Email from Outlook.com + +Use the following email account settings to send email action from the +https://www.outlook.com/[Outlook.com] SMTP service: + +[source,yaml] +-------------------------------------------------- +watcher.actions.email.service.account: + outlook_account: + profile: outlook + smtp: + auth: true + starttls.enable: true + host: smtp-mail.outlook.com + port: 587 + user: + password: +-------------------------------------------------- + +NOTE: You need to use a unique App Password if two-step verification is enabled. + See http://windows.microsoft.com/en-us/windows/app-passwords-two-step-verification[App + passwords and two-step verification] for more information. + +[[amazon-ses]] +===== Sending Email from Amazon SES (Simple Email Service) + +Use the following email account settings to send email from the +http://aws.amazon.com/ses[Amazon Simple Email Service] (SES) SMTP service: + +[source,yaml] +-------------------------------------------------- +watcher.actions.email.service.account: + ses_account: + smtp: + auth: true + starttls.enable: true + starttls.required: true + host: email-smtp.us-east-1.amazonaws.com <1> + port: 587 + user: + password: +-------------------------------------------------- + +<1> `smtp.host` varies depending on the region + +NOTE: You need to use your Amazon SES SMTP credentials to send email through + Amazon SES. For more information, see http://docs.aws.amazon.com/ses/latest/DeveloperGuide/smtp-credentials.html[Obtaining Your Amazon SES SMTP Credentials]. + +[[exchange]] +===== Sending Email from Microsoft Exchange + +Use the following email account settings to send email action from Microsoft Exchange: + +[source,yaml] +-------------------------------------------------- +watcher.actions.email.service.account: + exchange_account: + profile: outlook + email_defaults: + from: <1> + smtp: + auth: true + starttls.enable: true + host: + port: 587 + user: <2> + password: +-------------------------------------------------- + +<1> Some organizations configure Exchange to validate that the `from` field is a + valid local email account. +<2> Many organizations support use of your email address as your username, though + it is a good idea to check with your system administrator if you receive + authentication-related failures. + + +// [[postfix]] +// ===== Sending Email from Postfix + +// Use the following email account settings to send email from the http://www.postfix.org[Postfix] SMTP service: + +// [source,yaml] +// -------------------------------------------------- +// TODO +// -------------------------------------------------- + +[[email-html-sanitization]] +==== Configuring HTML Sanitization Options + +The `email` action supports sending messages with an HTML body. However, for security reasons, +Watcher https://en.wikipedia.org/wiki/HTML_sanitization[sanitizes] the HTML. + +You can control which HTML features are allowed or disallowed by configuring the +`watcher.actions.email.html.sanitization.allow` and +`watcher.actions.email.html.sanitization.disallow` settings in `elasticsearch.yml`. You can specify +individual HTML elements and the feature groups described in the following table. By default, +Watcher allows the following features: `body`, `head`, `_tables`, `_links`, `_blocks`, `_formatting` +and `img:embedded`. + + +[options="header"] +|====== +| Name | Description + +| `_tables` | All table related elements: ``, `` and `
`, `
`. + +| `_blocks` | The following block elements: `

`, `

`, `

`, `

`, `

`, + `

`, `

`, `
`, `