├── .gitignore ├── License └── license.txt ├── README.md ├── appd-analytics-agent ├── Dockerfile ├── README.md ├── appdynamics.env ├── build.sh ├── deploy │ └── java-init-analytics.yaml ├── startup.sh └── updateAnalyticsAgentConfig.sh ├── appd-cluster-agent ├── Dockerfile ├── Dockerfile-rhel ├── README.md └── start-appdynamics ├── appd-db-agent ├── Dockerfile ├── build.sh ├── deploy │ ├── db-agent.yaml │ ├── db-config.yaml │ ├── db-log-config.yaml │ └── proxy.yaml └── startup.sh ├── appd-dotnet-agent ├── Dockerfile ├── README.md ├── build.sh └── deploy │ ├── dotnet-app.yaml │ └── dotnet-config.yaml ├── appd-java-agent ├── Dockerfile ├── Dockerfile-rhel ├── LICENSE ├── README.md ├── build.sh └── deploy │ └── java-init.yaml ├── appd-java ├── .gitignore ├── appdynamics.env ├── docker-compose.yml ├── jetty │ └── 9 │ │ ├── jre8-alpine │ │ └── Dockerfile │ │ └── jre8 │ │ └── Dockerfile ├── openjdk │ ├── 7 │ │ ├── jdk │ │ │ ├── alpine │ │ │ │ └── Dockerfile │ │ │ └── slim │ │ │ │ └── Dockerfile │ │ └── jre │ │ │ ├── alpine │ │ │ └── Dockerfile │ │ │ └── slim │ │ │ └── Dockerfile │ ├── 8 │ │ ├── jdk │ │ │ ├── alpine │ │ │ │ └── Dockerfile │ │ │ └── slim │ │ │ │ └── Dockerfile │ │ └── jre │ │ │ ├── alpine │ │ │ └── Dockerfile │ │ │ └── slim │ │ │ └── Dockerfile │ └── 9 │ │ └── jre │ │ └── slim │ │ └── Dockerfile ├── setenv.sh └── tomcat │ ├── 7 │ ├── jre7-alpine │ │ └── Dockerfile │ ├── jre8-alpine │ │ └── Dockerfile │ └── jre8 │ │ └── Dockerfile │ ├── 8 │ ├── jre7-alpine │ │ └── Dockerfile │ ├── jre8-alpine │ │ └── Dockerfile │ └── jre8 │ │ └── Dockerfile │ └── 9 │ ├── jre7-alpine │ └── Dockerfile │ ├── jre8-alpine │ └── Dockerfile │ └── jre8 │ └── Dockerfile ├── appd-machine-agent-analytics ├── Dockerfile ├── Dockerfile-alpine ├── Dockerfile-rhel ├── LICENSE ├── README.md ├── build.sh ├── deploy │ ├── ma-config.yaml │ ├── ma-log-config.yaml │ ├── machine-agent-os.yaml │ ├── machine-agent-pks.yaml │ ├── machine-agent-sec.yaml │ ├── machine-agent.yaml │ ├── rbac-openshift.yaml │ └── rbac.yaml ├── startup.sh ├── updateAnalyticsAgent.sh └── windows │ ├── Dockerfile │ ├── build.ps1 │ ├── env.list │ ├── start-agent.ps1 │ └── updateAnalyticsAgentConfig.ps1 ├── appd-machine-agent-netviz ├── Dockerfile ├── README.md ├── build.sh ├── deploy │ ├── ma-config.yaml │ ├── ma-log-config.yaml │ └── machine-agent.yaml ├── startup.sh ├── updateAnalyticsAgent.sh └── updateNetViz.sh ├── appd-machine ├── .gitignore ├── Dockerfile ├── Dockerfile-alpine ├── Dockerfile-alpine-root ├── Dockerfile-root ├── README.md ├── appdynamics.env ├── docker-compose.yml └── env ├── appd-netviz-agent ├── Dockerfile ├── Dockerfile-rhel ├── LICENSE ├── build.sh ├── machine-agent-pks.yaml ├── machine-agent.yaml ├── netviz-config.yaml ├── netviz-simple.yaml └── netviz.yaml ├── appd-netviz ├── centos7 │ └── x86 │ │ └── Dockerfile ├── docker-compose.yml └── start.sh └── appd-python-init ├── Dockerfile └── run-with-agent.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /License/license.txt: -------------------------------------------------------------------------------- 1 | APPDYNAMICS 2 | END USER LICENSE AGREEMENT 3 | 4 | 1. SOFTWARE LICENSE. 5 | 6 | 1.1 LICENSE GRANT. 7 | 8 | This End User License Agreement (this “Agreement”) between AppDynamics LLC, a limited liability company with its principal place of business located at 303 Second Street, North Tower, 8th Floor, San Francisco, CA 94107 (“AppDynamics”) and the customer set forth in the Order Form (as defined below) (“End User”) is effective as of the date the initial Order Form is executed or the date this Agreement is referenced by the applicable purchase order (the “Effective Date”). This Agreement shall govern each order form, sales quotation, proposal, purchase order or other ordering document that references this Agreement (each an “Order Form”). Each Order Form will form part of this Agreement. Subject to the terms of this Agreement, AppDynamics grants to End User, during the License Term (as defined below), a non-exclusive, non-transferable, non-sublicensable right and license to use AppDynamics’ software product, including one Controller (as defined in Exhibit B), as designated in the Order Form(s) (the “Software”) for internal business purposes only for the quantity of units in the Order Form. The “License Term” begins on the date AppDynamics delivers the Software license keys to End User and lasts for the period specified in the applicable Order Form (unless terminated earlier in accordance with this Agreement). This Agreement supersedes any other agreement (including any click-through or electronic agreements within the Software) between AppDynamics and End User with respect to the Software. Any references in the Order Form to an “agreement” or “EULA” or other similar term shall be deemed to refer to this Agreement. 9 | 10 | 1.2 RESTRICTIONS ON USE. 11 | 12 | AppDynamics Test & Dev Edition licenses shall only be used in test-only non-production environments. Except as otherwise expressly provided in this Agreement, End User shall not (and shall not permit any third party to): (a) sublicense, sell, resell, transfer, assign, distribute, share, lease, make any external commercial use of, outsource, use on a timeshare or service bureau basis, or use in an application service provider or managed service provider environment, or otherwise generate income from the Software; (b) copy the Software onto any public or distributed network, except for secure cloud computing environments; (c) cause the decompiling, disassembly, or reverse engineering of any portion of the Software, or attempt to discover any source code or other operational mechanisms of the Software (except where such restriction is expressly prohibited by law without the possibility of waiver, and then only upon prior written notice to AppDynamics); (d) modify, adapt, translate or create derivative works based on all or any part of the Software; (e) use any Third Party Software (as defined below) provided with the Software other than with the Software; (f) modify any proprietary rights notices that appear in the Software or components thereof; (g) publish the results of any benchmarking tests run on any Third Party Software; (h) use the Software in violation of any applicable laws and regulations; (i) use the Software in support of any nuclear proliferation, chemical weapon, biological weapon or missile proliferation activity; (j) configure the Software to collect any (1) social security numbers or other government-issued identification numbers, (2) unencrypted passwords or other authentication credentials, (3) health information, biometric data, genetic data or any other such information subject to HIPAA requirements (4) payment, financial information, or any other such information subject to PCI security standards, (5) any data relating to a person under the age of 13 years old, or (6) any other data that is subject to regulatory or contractual handling requirements pursuant to the Gramm-Leach-Bliley Act) (collectively, “Prohibited Data”); or (k) use the Software to (1) store, download or transmit infringing, libelous, or otherwise unlawful or tortious material, or malicious code or malware, or (2) engage in phishing, spamming, denial-of-service attacks or other fraudulent or criminal activity, (3) interfere with or disrupt the integrity or performance of third party systems, or the Software or data contained therein, or (4) attempt to gain unauthorized access to the Software or AppDynamics' systems or networks, or (5) perform, or engage any third party to perform, authenticated or unauthenticated penetration testing, vulnerability assessments or other security assessments on the SaaS version of the Software. 13 | 14 | 1.3 EVALUATION USE. 15 | 16 | If End User accesses any software provided by AppDynamics pursuant to a no-fee or beta evaluation (“Beta Software”), then the License Term is for the period enabled by the license key for the Beta Software. AppDynamics shall have the right to terminate, downgrade, limit or otherwise modify the Beta Software at any time without notice or compensation, and no warranty, indemnity, availability, Maintenance or Support obligations of AppDynamics will apply to Beta Software. End User may use the number and type of licenses enabled by End User’s specific license key, but only to test and evaluate the Beta Software for its intended purpose. End User agrees to provide feedback related to the Beta Software as reasonably requested by AppDynamics. End User grants to AppDynamics, without charge, the fully paid-up, perpetual, sublicensable right to exploit such feedback for any purpose. The provision of Beta Software is not a guarantee of future product features or the availability of any future product and should not be relied upon in making any purchasing decisions. The Beta Software is subject to the terms of Section 1.2 (Restrictions on Use) to the same extent as the Software. 17 | 18 | 1.4 AFFILIATE USE. 19 | 20 | “Affiliate” means, in relation to a party, any entity that directly or indirectly controls, is controlled by, or is under direct or indirect common control with such party, or which is a wholly owned subsidiary of such party, where “control” means owning, directly or indirectly, at least 51% of the equity securities or equity interests of such entity. 21 | 22 | (a) End User Affiliates will have the right to make purchases pursuant to this Agreement by executing an Order Form (or issuing a purchase order referencing an Order Form) and agreeing to be bound by this Agreement. Where an Affiliate makes a purchase pursuant to this Agreement, references to each party in the Agreement shall be read as references to the Affiliate of each party stated on the Order Form. If an End User Affiliate purchases under this Agreement, then a separate Agreement will be deemed made between AppDynamics (or its Affiliate, as applicable) and such End User Affiliate. 23 | 24 | (b) End User may also permit Affiliates to use the Software provided that: (1) End User shall procure that its Affiliates comply with the terms of this Agreement, and End User shall remain liable for all acts and omissions of its Affiliates; (2) only End User may bring actions against AppDynamics with respect to any losses, damage or liabilities suffered or incurred by any Affiliate caused by the Software; and (3i) the exclusions and limitations of liability in this Agreement will apply to End User and End User Affiliates as a whole, so that they apply to all liabilities incurred under or in connection with this Agreement by AppDynamics to End User and End User Affiliates in aggregate. 25 | 26 | 27 | 1.5 MAINTENANCE AND SUPPORT. 28 | 29 | “Support” is defined as AppDynamics' obligations to respond to support requests as described in Exhibit A (Enterprise Support). “Maintenance” has the meaning given in the Exhibit A. Subject to End User’s payment of the fees set forth in the applicable Order Form(s), AppDynamics will (a) provide Maintenance and Support for the Software; and (b) solely if End User has purchased access to the software-as-a-service version of the Software, provide Availability (as defined in Exhibit B) in accordance with Exhibit B (Availability). For time-limited licenses for the Software (as set forth in an Order Form, “Subscription Licenses”), the fees for Maintenance and Support are included in the fees for the Software. For perpetual licenses, (a) AppDynamics shall invoice End User the applicable fees for Maintenance and Support (“Maintenance and Support Fees”) upon execution of the Order Form, and (b) subject to payment of the Maintenance and Support Fees, AppDynamics will provide Support for the Maintenance and Support period set forth in the Order Form (the “Maintenance and Support Term”). If Maintenance and Support terminates with respect to any perpetual licenses, then End User may reinstate Maintenance and Support on payment of the cumulative Maintenance and Support Fees applicable for the period during which Maintenance and Support lapsed, plus Maintenance and Support Fees for the reinstated Maintenance and Support Term. 30 | 31 | 1.6 SERVICES. 32 | 33 | AppDynamics will provide training, enablement and/or other services described in an Order Form (or statement of work referencing this Agreement), if any (“Services”). The license in Section 1.1 applies to any educational, training and other informational materials resulting from the Services. All Services will be rendered on a time and materials basis. AppDynamics will not exceed the total time purchased without prior written approval from End User. If not used, pre-purchased Services and expenses expire 12 months after the date purchased (unless otherwise agreed in the applicable Order Form). End User agrees to provide reasonable cooperation and information as necessary to permit AppDynamics to perform the Services. End User will reimburse AppDynamics for travel and expenses (at cost) incurred in connection with the Services (if any) by the Invoice Due Date (as defined below). Services will be performed on business days (a business day means Monday through Friday, excluding national holidays, during working hours, in the location where the Services are delivered). Saturday Services, and hours worked during the week that exceed the local working hours in a week, will only be worked with prior approval from End User and will be charged at 1.5 x the agreed rate. Services performed on Sundays or national holidays will be charged at 2 x the agreed rate. If End User cancels or delays any scheduled Services less than ten business days before the start date of such Services, then AppDynamics will use reasonable efforts to reallocate the resource for the cancelled Services. If AppDynamics is unable to reallocate such resources AppDynamics may deduct from End User's pre-paid Services (or End User will pay for) the amount of Services that were scheduled in any of the ten business days following the date of cancellation (or notification of the delay, as applicable), and End User will fully reimburse AppDynamics for any reasonable travel and expenses incurred by AppDynamics for such Services (and for any Services rescheduled by End User) for which AppDynamics is unable to obtain a refund. 34 | 35 | 1.7 EXPORT. 36 | 37 | The Software and Documentation are subject to local and extraterritorial export control laws and regulations. Each party will comply with such laws and regulations governing use, export, re-export, and transfer of the Software and Documentation and will obtain all required local and extraterritorial authorizations, permits or licenses. 38 | 39 | 2. FEES. 40 | 41 | 2.1 PRICING. 42 | 43 | End User will be invoiced for the amounts and set forth in an Order Form (the “Fees”). If End User’s usage of the Software is in excess of those amounts set forth in the Order Form, End User may be billed for those overages. If AppDynamics believes in good faith that End User’s usage of the Software exceeds that set forth on the applicable Order Form, for on-premises deployments, End User agrees to report to AppDynamics (or allow AppDynamics to audit) the quantity of Software license units used by End User, upon at least three business days’ notice. AppDynamics may monitor at any time the quantity of Software license units used by End User for SaaS deployments of the Software. 44 | 45 | 2.2 PAYMENTS. 46 | 47 | End User shall pay invoices within 30 days of the invoice date (the “Invoice Due Date”). All payment obligations are non-cancelable and all amounts paid are non-refundable, except as otherwise set forth in this Agreement. The Fees are exclusive of any relevant local sales taxes for which End User shall be responsible. AppDynamics shall have no responsibility for any Fees that are not received due to inaccurate or missing information provided by End User. End User shall pay interest on all payments not received by the Invoice Due Date at a rate of 1% per month or the maximum amount allowed by law, whichever is lesser. All amounts due under this Agreement shall be paid by End User in full without any set-off, counterclaim, deduction or withholding (other than any deduction or withholding of tax as required by law). If requested by AppDynamics, End User will obtain and furnish to AppDynamics tax receipts or other certificates issued by the competent taxation office showing the payments of the withholding tax within a reasonable time after payment. Following notice, AppDynamics may suspend End User’s access to the Software if payments are not received within 30 days of the Invoice Due Date. If End User purchases the Software, Services or both from an authorized partner of AppDynamics, the payment terms in the agreement between the partner and End User will apply. 48 | 49 | 3. CONFIDENTIALITY 50 | 51 | 3.1 SCOPE AND RESTRICTIONS. 52 | 53 | “Confidential Information” means all information of a party (“Disclosing Party”) disclosed to the other party (“Receiving Party”) that is identified as confidential at the time of disclosure or should be reasonably known by the Receiving Party to be confidential due to the nature of the information and the circumstances surrounding the disclosure. The Receiving Party will: (a) not use the Disclosing Party’s Confidential Information for any purpose outside of this Agreement; (b) not disclose such Confidential Information to any person or entity, other than its affiliates, employees, consultants, agents and professional advisers who have a “need to know” for the Receiving Party to exercise its rights or perform its obligations hereunder, provided that such affiliates, employees, consultants, and agents are bound by agreements or, in the case of professional advisers, ethical duties respecting such Confidential Information in accordance with the terms of this Section 3; and (c) use reasonable measures to protect the confidentiality of such Confidential Information. If the Receiving Party is required by applicable law or court order to make any disclosure of such Confidential Information, it will first give written notice of such requirement to the Disclosing Party, and, to the extent within its control, permit the Disclosing Party to intervene in any relevant proceedings to protect its interests in its Confidential Information, and provide cooperation to the Disclosing Party in seeking to obtain such protection. 54 | 55 | 3.2 This Section 3 will not apply to information that the Receiving Party can document: (a) was rightfully in its possession or known to it prior to receipt without any restriction on its disclosure; (b) is or has become public knowledge or publicly available through no fault of the Receiving Party; (c) is rightfully obtained by the Receiving Party from a third party without breach of any confidentiality obligation; or (d) is independently developed by employees of the Receiving Party who had no access to such information. 56 | 57 | 3.3 EQUITABLE RELIEF. 58 | 59 | The Receiving Party acknowledges that unauthorized disclosure of the Disclosing Party’s Confidential Information could cause substantial harm to the Disclosing Party for which damages alone might not be a sufficient remedy and, therefore, that upon any such disclosure by the Receiving Party, the Disclosing Party may seek appropriate equitable relief in addition to whatever other remedies it might have at law or equity. 60 | 61 | 4. PROPRIETARY RIGHTS. 62 | 63 | AppDynamics and its suppliers shall retain all intellectual property rights in and to the Software and the results of any Services. Certain “free” or “open source” software (the “FOSS Software”) and third party software are included with the Software (the “Third Party Software”). A list of the FOSS Software and Third Party Software, and any applicable license terms, is available at https://docs.appdynamics.com/display/DASH/Legal+Notices. The Software and Third Party Software may only be used by End User as prescribed by the AppDynamics documentation located at http://docs.appdynamics.com/ (as it may be updated from time to time, the “Documentation”). 64 | 65 | 5. TERM AND TERMINATION. 66 | 67 | The term of this Agreement begins on the Effective Date and will remain in effect until all Subscription Licenses (and Maintenance and Support Terms, if applicable) expire or until this Agreement is otherwise terminated in accordance with the terms hereof, whichever occurs first (the “Term”). If either party commits a material breach of this Agreement, and such breach has not been cured within 30 days after receipt of written notice thereof, the non-breaching party may terminate this Agreement, except that AppDynamics may immediately terminate this Agreement and/or End User’s license to the Software upon End User’s breach of Section 1.2(c). Either party may also terminate this Agreement upon written notice if the other party suspends payment of its debts or experiences any other insolvency or bankruptcy-type event. Upon expiration or termination of this Agreement for any reason: (a) with respect to Subscription Licenses, all rights granted to End User shall terminate and End User shall destroy any copies of the Software and Documentation within End User’s possession and control; (b) with respect to perpetual licenses, these will survive termination of this Agreement unless AppDynamics terminates the Agreement for End User’s breach of this Agreement in which case all rights granted to End User shall terminate and End User shall destroy any copies of the Software and Documentation within End User’s possession and control; and (c) each Receiving Party will destroy the Disclosing Party’s Confidential Information in the Receiving Party’s possession or control. All fees that have accrued as of such expiration or termination, and Sections 1.2, 1.3, 1.4, 2, 3, 4, 5, 6.2 and 8 through 12, will survive any expiration or termination hereof. 68 | 69 | 6. WARRANTIES. 70 | 71 | 6.1 LIMITED WARRANTY. 72 | 73 | AppDynamics warrants that during the first 30 days following the date the Software is purchased, the Software will, in all material respects, conform to the functionality described in the then-current Documentation for the applicable Software version. AppDynamics’ sole and exclusive obligation, and End User’s sole and exclusive remedy, for a breach of this warranty shall be that AppDynamics shall be required to repair or replace the Software to conform in all material respects to the Documentation, and if AppDynamics is unable to materially restore such functionality within 30 days from the date of written notice of such breach, End User may terminate the license to the affected Software upon written notice and AppDynamics shall promptly provide a pro-rata refund of the Software license fees (or Maintenance and Support Fees, for perpetual licenses) that have been paid in advance for the remainder of the License Term for the applicable Software (beginning on the date of termination). End User must notify AppDynamics in accordance with Section 12 of any warranty breaches within such warranty period, and End User must have installed and configured the Software in accordance with the Documentation to be eligible for the foregoing remedy. 74 | 75 | 6.2 WARRANTY DISCLAIMER. 76 | 77 | Except as expressly provided in this Section 6.1, all software, documentation, maintenance and support and services are provided “as is” and AppDynamics and its suppliers expressly disclaim any and all other representations and warranties, either express, implied, statutory, or otherwise with respect thereto. AppDynamics expressly disclaims any warranty as to the accuracy or completeness of any information or data accessed or used in connection with the software, documentation, maintenance and support, or services or that the software will be compatible or work with any end user or third party software or hardware. Each party acknowledges that, in entering into this Agreement, it has not relied on, and shall have no right or remedy in respect of, any statement, representation, assurance or warranty (whether made negligently or innocently) other than as expressly set out in this Agreement. The Software is not fault-tolerant and is not designed or intended for use in hazardous environments, including without limitation, in the operation of aircraft or other modes of human mass transportation, nuclear or chemical facilities, life support systems, implantable medical equipment, motor vehicles or weaponry systems, or any other application in which failure of the Software could lead to death or serious bodily injury of a person, or to severe physical or environmental damage (each, a “High Risk Use”). AppDynamics expressly disclaims any express or implied warranty or representation of fitness for High Risk Use. AppDynamics shall not be liable to End User for any loss, damage or harm suffered by End User that is directly or indirectly caused by End User’s unauthorized use of the Software to process Prohibited Data. 78 | 79 | 7. INDEMNIFICATION. 80 | 81 | 7.1 BY APPDYNAMICS. 82 | 83 | Subject to Section 7.2 and End User’s compliance with Section 7.4, AppDynamics agrees at its expense to defend End User against (or, at AppDynamics’ option, settle), any third party claim to the extent such claim alleges that the Software infringes or misappropriates any patent, copyright, trademark or trade secret of a third party, and AppDynamics shall pay all costs and damages finally awarded against End User by a court of competent jurisdiction as a result of any such claim. If the use of the Software is, or in AppDynamics’ sole opinion is likely to become, subject to such a claim, AppDynamics, at its option and expense, may (a) replace the applicable Software with functionally equivalent non-infringing technology, (b) obtain a license for End User’s continued use of the applicable Software, or (c) terminate the license and provide a pro-rata refund of the Software license fees (or Maintenance and Support Fees, for perpetual licenses) that have been paid in advance for the remainder of the License Term for the applicable Software (beginning on the date of termination). The foregoing indemnification obligation of AppDynamics will not apply: (a) if the Software is modified by End User or its agent; (b) if the Software is combined with other non-AppDynamics products, applications, or processes, but solely to the extent the alleged infringement is caused by such combination; or (c) to any unauthorized use of the Software. The foregoing shall be End User’s sole remedy with respect to any claim of infringement of third party intellectual property rights. 84 | 85 | 7.2 BY END USER. 86 | 87 | Subject to AppDynamics’ compliance with Section 7.3, End User agrees to defend, at its expense, AppDynamics and its affiliates, its suppliers and its resellers against any third party claim to the extent such claim arises from or is made in connection with End User’s breach of Section 1 or End User’s negligence or willful misconduct, and End User shall pay all costs and damages finally awarded against AppDynamics by a court of competent jurisdiction as a result of any such claim. 88 | 89 | 7.3 INDEMNIFICATION REQUIREMENTS. 90 | 91 | The following are conditions to any claim for indemnification under this Section 7. The indemnified party must promptly provide the indemnifying party with notice of any claim that the indemnified party believes is within the scope of the obligation to indemnify, provided, that the failure to provide such notice shall not relieve the indemnifying party of its obligations under this Section 7, except to the extent that such failure materially prejudices the indemnifying party’s defense of such claim. The indemnified party may, at its own expense, assist in the defense if it so chooses, but the indemnifying party shall control the defense and all negotiations related to the settlement of any such claim. Any such settlement intended to bind either party shall not be final without the other party’s written consent, which consent shall not be unreasonably withheld, conditioned or delayed; provided that, End User’s consent shall not be required when AppDynamics is the indemnifying party if the settlement involves only the payment of money by AppDynamics. 92 | 93 | 8. LIMITATION OF LIABILITY. 94 | 95 | 8.1 Subject to Section 8.3, in no event shall either party be liable for any indirect, incidental, special, punitive or consequential damages, including damages for loss of revenues or profits, loss of use, business interruption, or loss of data, whether in an action in contract or tort (including negligence), even if the other party has been advised of the possibility of such damages. 96 | 97 | 8.2 Subject to Section 8.1 and 8.3, neither party’s liability for any damages (whether for breach of contract, misrepresentations, negligence, strict liability, other torts or otherwise) under this agreement shall exceed an amount equal to 100% of the total fees paid (plus Fees payable) to AppDynamics during the 12 months immediately preceding the claim giving rise to such damages. This limitation of liability is aggregate and not per incident. If End User has made an upfront payment of Fees for the entire License Term, the 100% cap shall be calculated by using 12 times the pro rata monthly fee of the fees paid upfront. These limitations shall apply notwithstanding any failure of essential purpose of any remedy. 98 | 99 | 8.3 Nothing in this Agreement will limit or exclude either party’s liability for: (a) any other matter which by law may not be excluded or limited; (b) in the case of End User, for (1) breach of Section 1.2 (c); and (2) payment of the Fees. 100 | 101 | 9. FORCE MAJEURE. 102 | 103 | Except for payment obligations, neither party hereto will be liable for defaults or delays due to acts of God or the public enemy, acts or demands of any government or governmental agency, fires, earthquakes, floods, other natural disasters, accidents, or other unforeseeable causes beyond its reasonable control and not due to its fault or negligence. 104 | 105 | 10. DATA COLLECTION. 106 | 107 | 10.1 Subject to AppDynamics’ compliance with data protection laws applicable to it, End User acknowledges that AppDynamics may collect information generated by instrumentation and logging systems created through the use and operation of the Software which AppDynamics may use for its internal business purposes.If End User provides AppDynamics with any personally identifiable information (“PII”), End User represents and warrants that such information has been collected in accordance with the provisions of all applicable data protection legislation and that End User has all right and consents necessary to provide such PII to AppDynamics. 108 | 109 | 10.2 If End User is subject to Regulation 2016/679 of the European Parliament and of the Council on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation), the terms of Exhibit C shall apply. 110 | 111 | 11. US GOVERNMENT MATTERS. 112 | 113 | As defined in FAR section 2.101, the Software and Documentation are “commercial items” and according to DFAR section 252.227 7014(a)(1) and (5) are deemed to be “commercial computer software” and “commercial computer software documentation.” Consistent with DFAR section 227.7202 and FAR section 12.212, any use modification, reproduction, release, performance, display, or disclosure of such commercial software or commercial software documentation by the U.S. Government will be governed solely by the terms of this Agreement and will be prohibited except to the extent expressly permitted by the terms of this Agreement. 114 | 115 | 12. MISCELLANEOUS. 116 | 117 | This Agreement shall be governed by and construed under the laws of the State of California, U.S.A. Failure by either Party to exercise any of its rights under, or to enforce any provision of, this Agreement will not be deemed a waiver or forfeiture of such rights or ability to enforce such provision. If any provision of this Agreement is held by a court of competent jurisdiction to be illegal, invalid or unenforceable, such provision will be amended to achieve as nearly as possible the same economic effect of the original provision and the remainder of this Agreement will remain in full force and effect. This Agreement and its exhibits, together with the Order Form(s) and any statements of work incorporating this Agreement, if applicable, represent the entire agreement between the parties and supersede any previous or contemporaneous oral or written agreements or communications regarding the subject matter of this Agreement. The person signing or otherwise accepting this Agreement for each party represents that s/he is duly authorized by all necessary and appropriate corporate action to enter this Agreement. Any modification to this Agreement must be in writing and signed by a duly authorized signatory of both parties and no previous, contemporaneous or future oral statements will be deemed to modify this Agreement. Neither the Uniform Commercial Code (UCC) nor the Uniform Computer Information Transactions Act (UCITA) will apply to this Agreement. This Agreement shall control over additional or different terms of any purchase order, confirmation, invoice, statement of work or similar document (other than an AppDynamics Order Form, which will take precedence), even if accepted in writing by both parties, and waivers and amendments to this Agreement shall be effective only if made by non-pre-printed agreements clearly understood by both parties to be an amendment or waiver to this Agreement. For purposes of this Agreement, “including” means “including without limitation.” The rights and remedies of the parties hereunder will be deemed cumulative and not exclusive of any other right or remedy conferred by this Agreement or by law or equity. No joint venture, partnership, employment, or agency relationship exists between the parties as a result of this Agreement or use of the Software. AppDynamics reserves the right to perform its obligations from locations and/or through use of affiliates and subcontractors, worldwide, provided that AppDynamics will be responsible for such parties. End User may not assign this Agreement without the prior written approval of AppDynamics and any purported assignment in violation of this section shall be void; AppDynamics may assign, transfer or subcontract this Agreement in whole or in part. Upon any assignment of this Agreement by End User that is approved by AppDynamics, any licenses that contain an “unlimited” aspect will, with respect to End User or the successor entity, as applicable, be capped at the number of authorized Software units in use immediately prior to such assignment. End User agrees that AppDynamics may refer to End User by its trade name and logo, and may briefly describe End User’s business, in AppDynamics’ marketing materials and website. AppDynamics may give notice to End User by electronic mail to End User’s email address on record in End User’s account information, or by letter sent by nationally recognized overnight delivery service to End User’s address on record in End User’s account information. End User may give notice to AppDynamics at any time by letter sent by nationally recognized overnight delivery service or first class postage prepaid mail to AppDynamics at the following address or such other address as may be notified to End User from time to time: AppDynamics, 303 Second Street, North Tower, 8th Floor, San Francisco, CA 94107, Attn: Legal Department. Notice under this Agreement shall be deemed given: (a) when received, if personally delivered; (b) when receipt is electronically confirmed, if transmitted by email; (c) the next business day after it is sent, if sent by first class postage prepaid post; (d) five business days following postage if sent by pre-paid mail; and (e) upon receipt, if sent by certified or registered mail, return receipt requested. 118 | 119 | EXHIBIT A 120 | 121 | ENTERPRISE SUPPORT 122 | 123 | GENERAL REQUIREMENTS. 124 | 125 | AppDynamics will provide access to a ticketing system that will be available 24 hours per day, seven days per week. The ticketing system will be maintained by qualified support specialists, who shall provide technical support regarding the Software. 126 | 127 | ERROR CLASSIFICATION. 128 | 129 | Any reported errors are classified in the following manner, in each case when caused by the Software: 130 | 131 | Error Classification Criteria 132 | ==================== ======== 133 | Urgent End User production application is down or there is a 134 | major malfunction, resulting in a business revenue loss and 135 | impacting the End User application functionality for a 136 | majority of users. 137 | 138 | High Critical loss of End User application functionality or 139 | performance, impacting the application functionality for a 140 | high number of users. 141 | 142 | Normal Moderate loss of End User application functionality or 143 | performance, impacting multiple users. 144 | 145 | Low Minor loss of End User application functionality or 146 | product feature in question. 147 | 148 | 149 | ERROR DEFINITION. 150 | 151 | An “error” means a reproducible malfunction in the Software that is reported by End User through AppDynamics’ ticketing system that prevents the Software from performing in accordance with the operating specifications described in the then-current Documentation. 152 | 153 | AUTHORIZED SUPPORT CONTACTS. 154 | 155 | Maintenance and Support will be provided to End User’s designated support contacts. 156 | 157 | END USER’S OBLIGATION TO ASSIST. 158 | 159 | If End User reports a purported error in the Software to AppDynamics, AppDynamics’ ticketing system will request the following minimum information: 160 | A general description of the operating environment 161 | A list of all hardware components, operating systems and networks 162 | A reproducible test case 163 | Any log files, trace and systems files 164 | 165 | End User’s failure to provide this information may prevent or significantly delay AppDynamics’ ability to identify and fix the reported error. AppDynamics’ time to respond to any error will begin when AppDynamics has received all requested information from the End User and is able to reproduce the error. 166 | 167 | 168 | ERROR RESOLUTION. 169 | 170 | If AppDynamics determines there is an error in the Software, AppDynamics may, at its sole option, repair that error in the version of the Software that End User is currently using or instruct End User to install a newer version of the Software with that error repaired. AppDynamics reserves the right to provide End User with a workaround in lieu of fixing an error. 171 | 172 | 173 | MAINTENANCE. Provided End User is current on Fees AppDynamics will make available to End User updates and upgrades to the Software that it, in its sole discretion, makes generally commercially available to all customers. 174 | 175 | RESPONSE TIME. AppDynamics shall respond to error tickets in accordance with the tables set forth below. AppDynamics will use reasonable means to repair the error and keep End User informed of progress. AppDynamics makes no representations as to when a full resolution of the error may be made. 176 | 177 | Error Initial Response Manager Escalation VP Escalation Email Status Updates 178 | ===== ================ ================== ============= ==================== 179 | Urgent 1 Hour 1 Business Day 1 Week Daily 180 | High 6 Hours 1 Week 2 Weeks Weekly 181 | Normal 1 Business Day Quarterly Review None None 182 | Low 2 Business Days Semi-Annual Review None None 183 | 184 | 185 | MAINTENANCE AND SUPPORT POLICY: The Maintenance and Support policy is as follows: 186 | 187 | AppDynamics provides Maintenance and Support for each version of the Software for a period of 12 months after the generally available release of the next major version of the Software (a major release is a change in the first number to the right of the decimal point). For example, if version 4.1 is released on January 1, 2015, then AppDynamics will provide Maintenance and Support for version 4.0 until January 1, 2016. AppDynamics does not provide Maintenance or Support for any customized software (or components thereof). 188 | 189 | For third party software or technology used by End User with the Software but not included with the Software (a “Platform”, such as Java Virtual Machines), AppDynamics will follow the end-of-life (“EOL”) support timeline announced by the third party vendor of such Platform. AppDynamics will stop providing Maintenance and Support for an EOL’d Platform version when the Platform vendor stops providing maintenance and support for that Platform version. 190 | 191 | 192 | 193 | EXHIBIT B 194 | AVAILABILITY 195 | 196 | The terms set forth in this Exhibit B apply only if End User has purchased access to the online software-as-a-service (“SaaS”) version of the Software, as indicated on the Order Form. 197 | 198 | AVAILABILITY. 199 | 200 | AppDynamics will provide Availability (as defined below) of 99.5% (the “Availability SLA”), excluding situations identified as “Exclusions” below. For purposes of the Availability SLA, the AppDynamics network extends to, includes and terminates at the data center located router that provides the outside interface of each of AppDynamics’ WAN connections to its backbone providers (the “AppDynamics Network”). A report on the actual Availability is located at https://status.appdynamics.com. The “Controller” is the central repository and analytics engine where all performance data is stored, baselined, and analyzed. 201 | 202 | Exclusions” means any outage that results from any of the following: 203 | a. Any Maintenance performed by AppDynamics during AppDynamics’ standard Maintenance windows. AppDynamics will notify End User within 48 hours of any standard Maintenance and within 24 hours for other non-standard emergency Maintenance (collectively referred to herein as “Scheduled Maintenance”). 204 | 205 | b. End User’s information content or application programming, or the acts or omissions of End User or its agents, including, without limitation, the following: 206 | 1. End User’s use of any programs not supplied by AppDynamics; 207 | 2. End User’s failure to provide AppDynamics with reasonable prior written notice of any significant deployments of new nodes or change in configurations resulting in greater than 30% change in a one week period or greater than 50% change in a month in the number of key objects collected; or 208 | 3. End User’s failure to upgrade AppDynamics’ application server and machine software agents (the “Agents”) to a supported version (i.e. that has not been end of life’d by AppDynamics) 209 | c. Failures of the Internet backbone itself and the network by which End User connects to the Internet backbone or any other network unavailability outside of the AppDynamics Network, such as misconfigurations, proxies or firewalls. 210 | d. Any problems resulting from End User combining or merging the Software with any hardware or software not supplied by AppDynamics or not identified by AppDynamics in the Documentation as being compatible with the Software. 211 | e.End User’s or any third party’s use of the Software in an unauthorized or unlawful manner. 212 | 213 | Remedies for Excessive Downtime: 214 | 215 | If Availability falls below the Availability SLA in a given calendar quarter, AppDynamics will pay End User a service credit (“Service Credit”) as follows, corresponding to the actual Availability during the applicable calendar quarter (on pro-rated basis): if the Availability is 99.5% or greater, End User is entitled to receive no credits; if the Availability is 97.0% - 99.49%, then End User is entitled to receive Service Credits equal to five percent of the fees for the applicable calendar quarter; if the Availability is 95.0% - 96.9%, then End User is entitled to receive Service Credits equal to ten percent of the fees for the applicable calendar quarter; and if the Availability is less than 95.0%, then End User is entitled to receive Service Credits equal to twenty percent of the fees for the applicable calendar quarter. receive Service Credits, End User must submit a written request to AppDynamics (to legal@appdynamics.com) within 15 days after the end of the quarter in which failure to meet Availability occurred, or End User’s right to receive the relevant Service Credits will be waived. Such Service Credit will be issued as a credit against any fees owed by End User for the calendar quarter of the License Term after the request for a Service Credit, or, if End User does not owe any additional fees, then AppDynamics will pay End User the amount of the applicable Service Credit within 30 days after the end of the calendar month in which End User has requested the Service Credit. The remedies stated in this section are End User’s sole and exclusive remedies and AppDynamics’ sole and exclusive obligations for service interruption or unavailability. 216 | 217 | “Availability” is measured by the following formula: (n - y) *100 / n 218 | 219 | (1) “n” is the total number of minutes in the given calendar quarter minus the Exclusions (as defined above); and “y” is the total number of minutes in the given calendar quarter that the Controller is not accessible by End User (as determined by AppDynamics’ tools). 220 | 221 | (2) Specifically excluded from “n and “y” in this calculation are the Exclusions. 222 | 223 | 224 | EXHIBIT C 225 | DATA PROTECTION 226 | 227 | This Exhibit shall apply to the ‘processing’ of any ‘personal data’ (each as defined below) by AppDynamics in the course of providing the SaaS (as defined below) version of the Software and/or support to the End User. 228 | Data Protection 229 | 230 | The terms of this Exhibit apply only if: (i) End User is subject to Data Protection Law (as defined below); and 231 | (ii) End User has purchased access to the online software-as-a-service (“SaaS”) version of the Software, as indicated on the Order Form, 232 | 233 | 1. DEFINITIONS. 234 | 235 | In this Exhibit, the following terms shall have the following meanings: 236 | 237 | "controller", "processor", "data subject", "personal data" and "processing" (and "process") shall have the meanings given in the Data Protection Law; 238 | 239 | "Data Protection Law" shall mean Regulation 2016/679 of the European Parliament and of the Council on the protection of natural persons with regard to the processing of personal data and on the free movement of such data, and repealing Directive 95/46/EC (General Data Protection Regulation); and 240 | 241 | “Standard Contractual Clauses” shall mean the terms at https://trust.appdynamics.com/privacy/dataprotectionclauses which form part of this Exhibit pursuant the European Commission Decision C(2010)593 of 5 February 2010. 242 | 243 | 2. RELATIONSHIP OF THE PARTIES. 244 | 245 | End User (the controller) appoints AppDynamics as a processor to process the personal data described in Annex A (the "Data"). Each party shall comply with the obligations that apply to it under Data Protection Law. 246 | 247 | 3. PURPOSE LIMITATION. 248 | 249 | AppDynamics shall process the Data as a processor as necessary to perform its obligations under this Agreement and strictly in accordance with the documented instructions of the End User (the "Permitted Purpose"), except where otherwise required by any law. Taking into account the nature of the processing and the Software, AppDynamics shall promptly, after becoming aware, inform End User if in AppDynamics’ opinion an instruction from or on behalf of End User infringes Data Protection Law. 250 | 251 | 4. INTERNATIONAL TRANSFERS. 252 | 253 | Where End User’s Controller is hosted on AppDynamics’ EU based SaaS platform, AppDynamics shall not transfer the Data (nor permit the Data to be transferred) outside of the European Economic Area ("EEA") unless (i) it has first obtained the End User's prior written consent; and (ii) it takes measures to ensure the transfer is in compliance with Data Protection Law; and (iii) for the purposes of providing Support. The Standard Contractual Clauses will apply only to personal data that is transferred outside the EEA, either directly or via onward transfer, to any country not recognised by the European Commission as providing an adequate level of protection for personal data (as described in the Data Protection Laws). The Standard Contractual Clauses will not apply if AppDynamics has adopted an alternative recognised compliance standard for the lawful transfer of personal data (as defined in the Data Protection Laws) outside the EEA. 254 | 255 | 5. CONFIDENTIALITY OF PROCESSING. 256 | 257 | AppDynamics shall ensure that any person that it authorises to process the Data (including AppDynamics' staff, agents and subcontractors) (an "Authorised Person") shall be subject to a duty of confidentiality (whether a contractual duty or a statutory duty). 258 | 259 | 6. SECURITY. 260 | 261 | The processor shall implement appropriate controls, including technical, organisational, and other measures, designed to protect the Data (i) from accidental or unlawful destruction, and (ii) loss, alteration, unauthorised disclosure of, or access to the Data (a "Security Incident"). 262 | 263 | 7. SUBCONTRACTING. 264 | 265 | AppDynamics shall not subcontract any processing of the Data to a third-party subcontractor without the prior written consent of the End User. Notwithstanding this, the End User consents to AppDynamics engaging third-party subcontractors to process the Data provided that: (i) AppDynamics provides at least 7 days' notice prior to the addition or removal of any subcontractor (including details of the processing it performs or will perform and the location of the subcontractor), which may be given by posting details of such addition or removal at the following URL: https://trust.appdynamics.com/privacy/subprocessors; (ii) AppDynamics imposes data protection terms on any subcontractor it appoints that protect the Data to the same standard provided for by this paragraph; and (iii) AppDynamics remains fully liable for any breach of this paragraph that is caused by its subcontractor. A list of approved subcontractors and subcontractor locations as at the date of this Agreement is at https://trust.appdynamics.com/privacy/subprocessors. If the End User refuses to consent to AppDynamics' appointment of a third-party subcontractor on reasonable grounds relating to the protection of the Data, then End User may terminate this Agreement by giving no less than 30 days’ written notice. 266 | 267 | 8. DATA SUBJECTS' RIGHTS. 268 | 269 | AppDynamics shall provide reasonable assistance to the End User (at the End User's expense) to enable the End User to respond to any request from a data subject to exercise any of its rights under Data Protection Law (including its rights of access, correction, objection, erasure and data portability, as applicable). 270 | 271 | 9. DATA PROTECTION IMPACT ASSESSMENT. 272 | 273 | If the End User reasonably believes that AppDynamics' processing of the Data will result in a high risk to the data protection rights and freedoms of data subjects, it shall promptly inform AppDynamics and AppDynamics shall, if requested by the End User, provide the End User with reasonable information to enable the End User to conduct a data protection impact assessment (taking into account the nature of the processing and the information available to AppDynamics). 274 | 275 | 10. SECURITY INCIDENTS. 276 | 277 | Upon becoming aware of a confirmed Security Incident, AppDynamics shall inform the End User without undue delay and shall provide all such timely information and cooperation as the End User may reasonably require in order for the End User to fulfil its data breach reporting obligations under (and in accordance with the timescales required by) Data Protection Law. AppDynamics shall further take such measures and actions as it considers necessary to remedy or mitigate the effects of the Security Incident and shall keep the End User informed in connection with the Security Incident. 278 | 279 | 11. DELETION OF DATA. 280 | 281 | AppDynamics will effectively destroy all relevant Data along with any medium or document containing said Data within 14 days from receiving a written request from End User. Upon termination or expiry of this Agreement, AppDynamics will effectively destroy all Data within the time periods stated in the Licence Entitlements and Restrictions for the relevant version of the Software as set out at https://docs.appdynamics.com/display/PAA/Product+Announcements+and+Alerts+Home. AppDynamics shall send the End User written confirmation thereof on written request. 282 | 283 | 12. RETURN OF DATA. 284 | 285 | AppDynamics provides End User with access to its Data in industry standard formats including CSV, XML, and JSON via REST API. End User may use the AppDynamics APIs to export its Data from the Software at any time. For more information, please see https://docs.appdynamics.com. 286 | 287 | 13. END USER AUDIT. 288 | 289 | AppDynamics engages a qualified and independent third-party auditor to conduct semi-annual SOC 2 Type II audits in order to evaluate the adequacy of AppDynamics’ information security program. Each such audit results in the generation of an audit report (“Report”), which shall be AppDynamics’ Confidential Information. During the Licence Term, AppDynamics shall: (i) maintain SOC 2 Type II certification (or other industry-recognized successor certification); (ii) at End User’s written request, not more than once per calendar year, provide End User with the then-current Report; and (iii) at End User’s expense, promptly (taking into account the nature of the request and to the extent reasonably feasible from a technical perspective) comply with any request of End User for information (including any books and/or records) relating to the Software and/or Services as necessary for End User to enable it to comply with Data Protection Law or any request from a regulator. End User agrees that any audit and inspection rights it may have under Data Protection Law shall be satisfied by the obligations in this paragraph 13. 290 | 291 | 14. FURTHER SECURITY INFORMATION. 292 | 293 | At End User’s expense, AppDynamics shall further provide detailed written responses (on a confidential basis) to all reasonable requests for information made by End User, including responses to information security and audit questionnaires, that are necessary to confirm AppDynamics’ compliance with this Agreement. 294 | 295 | 15. REGULATOR AUDITS. 296 | 297 | If a regulator wishes to carry out any audit or inspection of AppDynamics or its activities under this Agreement, End User shall provide AppDynamics at least 30 days’ advance notice of any audit, except where the regulator has given less notice to End User or AppDynamics. AppDynamics shall provide access for any audit or investigation by regulator(s) or law enforcement agent(s) as they require. 298 | 299 | 300 | ANNEX A TO EXHIBIT C 301 | 302 | SUBJECT MATTER OF PROCESSING 303 | 304 | The extraction, collection, storage and analysis of Data generated by, and through, the use of End User’s software applications. 305 | 306 | Further information about what processing of Data each Software product can be used for can be found at www.appdynamics.com/product and in the Documentation. 307 | 308 | DURATION OF PROCESSING 309 | 310 | For the Licence Term of the SaaS Software licence. 311 | 312 | NATURE AND PURPOSE OF PROCESSING 313 | 314 | The Data will be processed by AppDynamics SaaS Software platform in order to improve the efficiency and functioning of monitored website(s), software and/or server(s) of End User. 315 | 316 | The Software enables the End User to: 317 | a. Measure and track response time, load, error rate, slow rate, and stalls for application transactions. 318 | b. Auto-discover and map application tiers and services, and see the relationships between them. 319 | c. Learn "normal" performance behavior and "normal" code execution paths for application transactions and application services over time so that anomalies can be detected automatically. 320 | d. Follow the flow of application transactions across tiers and services (even in a highly distributed environment) to allow the identification of bottlenecks. 321 | e. Identify the root cause of errors in applications. 322 | f. View reports and obtain visibility into application performance for understanding the service levels of such applications. 323 | g. View operational dashboards to help information technology teams understand the health and performance of application environments. 324 | h. View agile release comparisons so that developers understand the business impact of application releases, for the purpose of identifying regression and learning from production deployments. 325 | 326 | In the course of monitoring End User’s website(s), software and/or server(s), AppDynamics will necessarily ingest and process the Data described above in this Annex A for the purpose of providing the Software and its functions. 327 | 328 | TYPE OF PERSONAL DATA AND CATEGORIES OF PERSONAL DATA 329 | 330 | Depending on the End User’s configuration of the Software the following types and categories of personal data that might be collected are: 331 | 332 | Personal details 333 | Included in this category are classes of data which identify the data subject and their personal characteristics. Examples are names, addresses, job title, employer, contact details, age, sex, date of birth, physical descriptions, identifiers issued by public bodies, e.g. NI number. 334 | 335 | Family, lifestyle and social circumstances 336 | Included in this category are any matters relating to the family of the data subject and the data subject’s lifestyle and social circumstances. Examples are details about current marriage and partnerships and marital history, details of family and other household members, habits, housing, travel details, leisure activities, membership of charitable or voluntary organisations. 337 | 338 | Education and training details 339 | Included in this category are any matters which relate to the education and any professional training of the data subject. Examples are academic records, qualifications, skills, training records, professional expertise, student and pupil records. 340 | 341 | Employment details 342 | Included in this category are any matters relating to the employment of the data subject. Examples are employment and career history, recruitment and termination details, attendance record, health and safety records, performance appraisals, training records, security records. 343 | 344 | Financial details 345 | Included in this category are any matters relating to the financial affairs of the data subject. Examples are income, salary, assets and investments, payments, creditworthiness, loans, benefits, grants, insurance details, pension information. 346 | 347 | Goods or services provided 348 | Included in this category are classes of data relating to goods and services which have been provided. Examples are details of the goods or services supplied, licences issued, agreements and contracts. 349 | 350 | IT information 351 | Included in this category is any information relating to an individual’s use of technology or software including IP addresses, any information about the computing or mobile device a person is using, location data gathered from such devices, usernames and passwords, social media handles. 352 | 353 | CATEGORIES OF DATA SUBJECTS 354 | 355 | Customers and/or employees of End User depending on whether End User uses the Software to monitor customer and/or employee facing software applications. 356 | 357 | AppDynamics Proprietary and Confidential * Revision 2019.09 358 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AppDynamics Official Docker Images 2 | 3 | Official AppDynamics docker images for our APM and Server Agents. These images are available from the Docker Store and can be downloaded using `docker pull`; see below for the image names and tags that can be downloaded. We currently provide images that have the Java Agent pre-installed, using certified base images for OpenJDK, Tomcat and Jetty. Additional images that include APM Agents for other language runtimes will be available shortly. We also provide an official image for our Server Agent, pre-configured to run our Integrated Docker Visibility monitoring. Please see the [documentation](https://docs.appdynamics.com/) for more information about AppDynamics [Java APM](https://docs.appdynamics.com/display/PRO45/Application+Monitoring) and [Server Visibility](https://docs.appdynamics.com/display/PRO45/Server+Visibility) monitoring. 4 | 5 | To use the images, you need either an on-premise installation of AppDynamics or an AppDynamics SaaS account: please visit [AppDynamics.com](https://www.appdynamics.com/) for details. 6 | 7 | ## Java APM Agent 8 | 9 | ### How to build the Java APM Agent Images 10 | 11 | To build the Java Agent images, you will need to supply: 12 | 13 | 1. The installer for the Java Agent - Sun and JRockit JVM 14 | 2. The SHA256 checksum to verify the image 15 | 16 | These can both be obtained from the [AppDynamics Download Site](https://download.appdynamics.com) 17 | 18 | Set the following environment variables - these will be passed automatically to `docker-compose` at build time : 19 | 20 | * `APPD_AGENT_VERSION`: the 4-digit version string 21 | * `APPD_AGENT_SHA256`: the SHA256 checksum for the installer 22 | 23 | Change directory to the appd-java folder and run `docker-compose build` 24 | 25 | This will build the following images: 26 | 27 | ***Tomcat-based Images*** 28 | 29 | * `appdynamics/java:_tomcat7-jre7-alpine` 30 | * `appdynamics/java:_tomcat7-jre8-alpine` 31 | * `appdynamics/java:_tomcat8-jre7-alpine` 32 | * `appdynamics/java:_tomcat8-jre8-alpine` 33 | * `appdynamics/java:_tomcat9-jre8-alpine` 34 | * `appdynamics/java:_tomcat7-jre8` 35 | * `appdynamics/java:_tomcat8-jre8` 36 | * `appdynamics/java:_tomcat9-jre8` 37 | 38 | ***Jetty-based Images*** 39 | 40 | * `appdynamics/java:_jetty9-jre8-alpine` 41 | * `appdynamics/java:_jetty9-jre8` 42 | 43 | ***OpenJDK-based Images*** 44 | 45 | * `appdynamics/java:_jre9-slim` 46 | * `appdynamics/java:_jdk7-alpine` 47 | * `appdynamics/java:_jdk8-alpine` 48 | * `appdynamics/java:_jdk8-slim` 49 | * `appdynamics/java:_jre8-slim` 50 | * `appdynamics/java:_jre7-alpine` 51 | * `appdynamics/java:_jdk7-slim` 52 | * `appdynamics/java:_jre8-alpine` 53 | * `appdynamics/java:_jre7-slim` 54 | 55 | ### How to run the Java APM Agent Images 56 | 57 | ***Tomcat and Jetty-based images*** 58 | 59 | The agent is initialized using AppDynamics node environment variables as described in the product [documentation](https://docs.appdynamics.com/display/PRO45/Use+Environment+Variables+for+Java+Agent+Settings). These can be passed to the container at run-time using environment variables (`-e` or `--env`) or env-file (`--env-file`): there is an example env-file (`appdynamics.env`) included with this repo that gives the environment variables that must be set in order for the agent to connect to the AppDynamics Controller. 60 | 61 | If setting a fixed node name is desired, you can set one with the `APPDYNAMICS_AGENT_NODE_NAME` environment variable, however please note that node names need to be unique within an AppDynamics tier so this approach will not work for scale-out scenarios. 62 | 63 | For scale-out scenarios, the presence of the `APPDYNAMICS_NODE_PREFIX` variable causes the start scripts within the docker images to request dynamic node naming (see "Dynamic Node Naming" in the [documentation](https://docs.appdynamics.com/display/PRO45/Java+Agent+Configuration+Properties) for more details about this option. If you set both `APPDYNAMICS_AGENT_NODE_NAME` and `APPDYNAMICS_NODE_PREFIX` then the agent will name the node according to the dynamic naming rules, but the agent log directory within the container will be named per the `APPDYNAMICS_AGENT_NODE_NAME` variable. 64 | 65 | For both the Tomcat and Jetty-based images, the app server will start automatically and the AppDynamics agent will connect to the Controller, provided that the correct connection parameters are passed to the container, as described above. The images can be extended to include the application archives, or these can be copied to a running container using `docker cp`. Please see the [Tomcat](https://store.docker.com/images/tomcat) and [Jetty](https://store.docker.com/images/jetty) documentation on the Docker store for details of those base images. 66 | 67 | ***OpenJDK-based Images*** 68 | 69 | These images are provided for you to customize your own container builds. They use OpenJDK base images (JRE and JDK variants are provided), with the AppDynamics Java Agent pre-installed in the /opt/appdynamics folder. Please see the [OpenJDK](https://store.docker.com/images/openjdk) documentation on the Docker Store for details of the base image. With these images, it is up to you how to configure the AppDynamics Agent: you can use the AppDynamics node environment variables as described in the product [documentation](https://docs.appdynamics.com/display/PRO45/Use+Environment+Variables+for+Java+Agent+Settings). See above for information on how to pass environment variables to the container at runtime. 70 | 71 | ## Server Agent 72 | 73 | ### How to build the Server Agent Image 74 | 75 | To build the Server Agent image, you will need to supply: 76 | 77 | 1. The installer for the Machine Agent (zip version - no JRE) 78 | 2. The SHA256 checksum to verify the image 79 | 80 | These can both be obtained from the [AppDynamics Download Site](https://download.appdynamics.com) 81 | 82 | Set the following environment variables - these will be passed automatically to `docker-compose` at build time : 83 | 84 | * `APPD_AGENT_VERSION`: the 4-digit version string 85 | * `APPD_AGENT_SHA256`: the SHA256 checksum for the installer 86 | 87 | Change directory to the appd-machine folder and run `docker-compose build` 88 | 89 | This will build the following images: 90 | 91 | * `appdynamics/machine:` 92 | 93 | ### How to run the Server Agent Image 94 | 95 | The agent is initialized using machine agent environment variables as described in the product [documentation](https://docs.appdynamics.com/display/PRO45/Standalone+Machine+Agent+Configuration+Properties). These can be passed to the container at run-time using environment variables (`-e` or `--env`) or env-file (`--env-file`): note that you do not need to pass either a node or tier name to run the Server Agent with Integrated Docker Visibility. 96 | 97 | The `MACHINE_AGENT_PROPERTIES` environment variable can be set to pass additional values to the machine agent at startup. This allows you to run the container in three different ways: 98 | 99 | 1. Standalone Machine Agent 100 | 2. Server Agent (SIM-enabled) 101 | 3. Server Agent (SIM-enabled) with Integrated Docker Visibility 102 | 103 | To enable Integrated Docker Visibility, you must run the container with two volume mounts that provide access to the host file system (read-only) and the UNIX domain socket for the Docker Engine API. In addition, the following property must be set: 104 | 105 | `MACHINE_AGENT_PROPERTIES=-Dappdynamics.sim.enabled=true -Dappdynamics.docker.enabled=true` 106 | 107 | The example env-file (`appdynamics.env`) included in the *appd-machine* folder gives the environment variables that must be set in order for the agent to connect to the AppDynamics Controller. 108 | 109 | The following example shows how to run the Server Agent container with Integrated Docker Visibility using environment variables: 110 | 111 | ``` 112 | docker run -d \ 113 | -e APPDYNAMICS_CONTROLLER_HOST_NAME= \ 114 | -e APPDYNAMICS_CONTROLLER_PORT= \ 115 | -e APPDYNAMICS_CONTROLLER_SSL_ENABLED= \ 116 | -e APPDYNAMICS_AGENT_ACCOUNT_NAME= \ 117 | -e APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY= \ 118 | -e MACHINE_AGENT_PROPERTIES="-Dappdynamics.sim.enabled=true -Dappdynamics.docker.enabled=true" \ 119 | -v /proc:/hostroot/proc:ro -v /sys:/hostroot/sys:ro -v /etc:/hostroot/etc:ro -v /var/run/docker.sock:/var/run/docker.sock \ 120 | appdynamics/machine: 121 | ``` 122 | -------------------------------------------------------------------------------- /appd-analytics-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM openjdk:8-jdk-alpine 3 | 4 | RUN apk add --no-cache bash gawk sed grep bc coreutils bind-tools 5 | 6 | ARG APPD_AGENT_VERSION 7 | ARG APPD_AGENT_SHA256 8 | 9 | RUN mkdir -p /opt/appdynamics 10 | 11 | COPY analytics-agent-${APPD_AGENT_VERSION}.zip / 12 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 13 | echo "${APPD_AGENT_SHA256} *analytics-agent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 14 | && sha256sum -c appd_checksum \ 15 | && rm appd_checksum \ 16 | && unzip -oq analytics-agent-${APPD_AGENT_VERSION}.zip -d /opt/appdynamics; \ 17 | else \ 18 | unzip -oq analytics-agent-${APPD_AGENT_VERSION}.zip -d /opt/appdynamics; \ 19 | fi 20 | 21 | 22 | ENV ANALYTICS_AGENT_HOME /opt/appdynamics/analytics-agent 23 | 24 | COPY updateAnalyticsAgentConfig.sh /opt/appdynamics/updateAnalyticsAgentConfig.sh 25 | RUN chmod +x /opt/appdynamics/updateAnalyticsAgentConfig.sh 26 | 27 | COPY startup.sh /opt/appdynamics/startup.sh 28 | RUN chmod +x /opt/appdynamics/startup.sh 29 | 30 | RUN chgrp -R 0 /opt && \ 31 | chmod -R g=u /opt 32 | 33 | USER 1001 34 | 35 | EXPOSE 9090 36 | 37 | CMD "/opt/appdynamics/startup.sh" -------------------------------------------------------------------------------- /appd-analytics-agent/README.md: -------------------------------------------------------------------------------- 1 | ### Analytics Agent Image 2 | 3 | * Download the latest agent bundle from https://download.appdynamics.com/download/ 4 | 5 | * Make a note of sha256 checksum value and the full version of the agent (e.g. 4.5.9.2096) 6 | 7 | * Run ./build.sh passing the version and the checksum. The checksum can be left blank to avoid validation. It is a best practice to validate the package integrity. 8 | 9 | An example yaml spec `deploy/java-init-analytics.yaml` is provided to demonstrate how to deploy the analytics agent as a sidecar 10 | to an application instrumented with the AppDynamics java agent. 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /appd-analytics-agent/appdynamics.env: -------------------------------------------------------------------------------- 1 | APPDYNAMICS_CONTROLLER_SSL_ENABLED=true 2 | APPDYNAMICS_AGENT_APPLICATION_NAME= 3 | APPDYNAMICS_CONTROLLER_HOST_NAME= 4 | APPDYNAMICS_CONTROLLER_PORT=443 5 | APPDYNAMICS_EVENTS_API_URL=https://xyz.saas.appdynamics.com 6 | APPDYNAMICS_AGENT_ACCOUNT_NAME= 7 | APPDYNAMICS_GLOBAL_ACCOUNT_NAME= 8 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY= 9 | 10 | 11 | -------------------------------------------------------------------------------- /appd-analytics-agent/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/analytics-agent 4 | if [ "x$3" != "x" ]; then 5 | IMAGE_NAME=$3 6 | fi 7 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache . 8 | -------------------------------------------------------------------------------- /appd-analytics-agent/deploy/java-init-analytics.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: java-init-biq 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | tier: client-web 11 | name: java-init-analytics 12 | spec: 13 | serviceAccountName: app-user-sa 14 | initContainers: 15 | - name: appd-agent 16 | command: 17 | - cp 18 | - -ra 19 | - /opt/temp/. 20 | - /opt/appd/ 21 | image: appdynamics/java-agent:v4.5 22 | imagePullPolicy: IfNotPresent 23 | resources: 24 | limits: 25 | cpu: 200m 26 | memory: 100M 27 | requests: 28 | cpu: 100m 29 | memory: 50M 30 | volumeMounts: 31 | - mountPath: /opt/appd 32 | name: appd-agent-repo 33 | containers: 34 | - name: java-init-analytics 35 | image: java-service:v1 36 | imagePullPolicy: IfNotPresent 37 | envFrom: 38 | - configMapRef: 39 | name: apm-config 40 | env: 41 | - name: ACCOUNT_ACCESS_KEY 42 | valueFrom: 43 | secretKeyRef: 44 | key: appd-key 45 | name: appd-secret 46 | - name: APPLICATION_NAME 47 | value: JavaInit 48 | - name: TIER_NAME 49 | value: Web 50 | - name: JAVA_OPTS 51 | value: " -Dappdynamics.agent.accountAccessKey=$(ACCOUNT_ACCESS_KEY) 52 | -Dappdynamics.controller.hostName=$(CONTROLLER_HOST) 53 | -Dappdynamics.controller.port=$(CONTROLLER_PORT) 54 | -Dappdynamics.controller.ssl.enabled=$(CONTROLLER_SSL_ENABLED) 55 | -Dappdynamics.agent.accountName=$(ACCOUNT_NAME) 56 | -Dappdynamics.agent.applicationName=$(APPLICATION_NAME) 57 | -Dappdynamics.agent.tierName=$(TIER_NAME) 58 | -Dappdynamics.agent.reuse.nodeName=true 59 | -Dappdynamics.agent.reuse.nodeName.prefix=$(TIER_NAME) 60 | -javaagent:/opt/appd/javaagent.jar " 61 | volumeMounts: 62 | - mountPath: /var/log 63 | name: appd-volume 64 | - mountPath: /opt/appd 65 | name: appd-agent-repo 66 | ports: 67 | - containerPort: 8080 68 | - name: analytics-agent 69 | image: analytics-agent:v4.5 70 | imagePullPolicy: IfNotPresent 71 | resources: 72 | limits: 73 | cpu: 200m 74 | memory: 100M 75 | requests: 76 | cpu: 100m 77 | memory: 50M 78 | envFrom: 79 | - configMapRef: 80 | name: apm-config 81 | env: 82 | - name: ACCOUNT_ACCESS_KEY 83 | valueFrom: 84 | secretKeyRef: 85 | key: appd-key 86 | name: appd-secret 87 | - name: APPLICATION_NAME 88 | value: 89 | - name: TIER_NAME 90 | value: 91 | volumeMounts: 92 | - mountPath: /applogs 93 | name: appd-volume 94 | ports: 95 | - containerPort: 9090 96 | 97 | restartPolicy: Always 98 | volumes: 99 | - name: appd-volume 100 | emptyDir: {} 101 | - name: appd-agent-repo 102 | emptyDir: {} 103 | 104 | --- 105 | apiVersion: v1 106 | kind: Service 107 | metadata: 108 | name: client-web 109 | spec: 110 | selector: 111 | tier: client-web 112 | ports: 113 | - name: "8080" 114 | port: 8080 115 | targetPort: 8080 116 | status: 117 | loadBalancer: {} -------------------------------------------------------------------------------- /appd-analytics-agent/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #update the secret in analytics agent config 3 | /opt/appdynamics/updateAnalyticsAgentConfig.sh $ANALYTICS_AGENT_HOME 4 | 5 | # Start Analytics Agent 6 | $ANALYTICS_AGENT_HOME/bin/analytics-agent.sh start -------------------------------------------------------------------------------- /appd-analytics-agent/updateAnalyticsAgentConfig.sh: -------------------------------------------------------------------------------- 1 | ANALYTICS_AGENT_PROPERTIES="${1}/conf/analytics-agent.properties" 2 | ANALYTICS_AGENT_CONFIG="${1}/monitor.xml" 3 | 4 | replaceText () { 5 | 6 | sed -i "s|$1|$2|g" $3 7 | } 8 | 9 | sed -i 's/false/true/g' $ANALYTICS_AGENT_CONFIG 10 | 11 | PROTOCOL="http" 12 | 13 | if [ "${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" = "true" ]; then 14 | PROTOCOL="https" 15 | fi 16 | 17 | replaceText 'ad.agent.name=analytics-agent1' "ad.agent.name=analytics-${APPDYNAMICS_AGENT_APPLICATION_NAME}" $ANALYTICS_AGENT_PROPERTIES 18 | 19 | replaceText 'ad.controller.url=http://localhost:8090' "ad.controller.url=$PROTOCOL://${APPDYNAMICS_CONTROLLER_HOST_NAME}:${APPDYNAMICS_CONTROLLER_PORT}" $ANALYTICS_AGENT_PROPERTIES 20 | 21 | replaceText 'http.event.endpoint=http://localhost:9080' "http.event.endpoint=${APPDYNAMICS_EVENTS_API_URL}" $ANALYTICS_AGENT_PROPERTIES 22 | 23 | replaceText 'http.event.name=customer1' "http.event.name=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 24 | 25 | replaceText 'http.event.accountName=analytics-customer1' "http.event.accountName=${APPDYNAMICS_GLOBAL_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 26 | 27 | replaceText 'http.event.accessKey=your-account-access-key' "http.event.accessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" $ANALYTICS_AGENT_PROPERTIES 28 | 29 | if [ "x${PROXY_HOST}" != "x" ]; then 30 | replaceText 'http.event.proxyHost=' "http.event.proxyHost=${APPDYNAMICS_CONTROLLER_PROXY_HOST}" $ANALYTICS_AGENT_PROPERTIES 31 | fi 32 | 33 | if [ "x${PROXY_PORT}" != "x" ]; then 34 | replaceText 'http.event.proxyPort=' "http.event.proxyPort=${APPDYNAMICS_CONTROLLER_PROXY_PORT}" $ANALYTICS_AGENT_PROPERTIES 35 | fi 36 | -------------------------------------------------------------------------------- /appd-cluster-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | # Make sure that the cluster agent image has the same environment on which it was built on because the 2 | # binary is dependent on the os and architecture on which it was built. 3 | ARG version=latest 4 | FROM alpine:$version 5 | 6 | MAINTAINER AppDynamics 7 | 8 | LABEL name="AppDynamics Cluster Agent" \ 9 | vendor="AppDynamics" \ 10 | version="23.9.0" \ 11 | release="1" \ 12 | url="https://www.appdynamics.com" \ 13 | summary="AppDynamics monitoring solution for applications deployed to Kubernetes clusters" \ 14 | description="The ClusterAgent monitors state of Kubernetes or openshift resources and derives metrics to provide visibility into common application impacting issues." 15 | 16 | # Install required packages 17 | RUN apk --update add --no-cache unzip ca-certificates && update-ca-certificates && \ 18 | apk upgrade --no-cache 19 | 20 | # Install AppDynamics Cluster Agent 21 | ENV CLUSTER_AGENT_HOME /opt/appdynamics/cluster-agent/ 22 | COPY cluster-agent.zip /tmp/cluster-agent.zip 23 | COPY LICENSE /licenses/ 24 | 25 | # Create a group and user 26 | RUN addgroup -S -g 1001 appdynamics && \ 27 | adduser -S -s /bin/sh -G appdynamics -u 1001 appdynamics && \ 28 | mkdir -p ${CLUSTER_AGENT_HOME} && \ 29 | unzip -oq /tmp/cluster-agent.zip -d ${CLUSTER_AGENT_HOME} && \ 30 | rm /tmp/cluster-agent.zip && \ 31 | rm -rf /opt/appdynamics/cluster-agent/config/agent-monitoring.yml && \ 32 | rm -rf /opt/appdynamics/cluster-agent/config/instrumentation.yml && \ 33 | mkdir /opt/appdynamics/cluster-agent/config/agent-monitoring && \ 34 | touch /opt/appdynamics/cluster-agent/config/agent-monitoring/agent-monitoring.yml && \ 35 | ln -s /opt/appdynamics/cluster-agent/config/agent-monitoring/agent-monitoring.yml /opt/appdynamics/cluster-agent/config/agent-monitoring.yml && \ 36 | mkdir /opt/appdynamics/cluster-agent/config/instrumentation && \ 37 | touch /opt/appdynamics/cluster-agent/config/instrumentation/instrumentation.yml && \ 38 | ln -s /opt/appdynamics/cluster-agent/config/instrumentation/instrumentation.yml /opt/appdynamics/cluster-agent/config/instrumentation.yml 39 | 40 | # Include start script to configure and start Cluster Agent at runtime 41 | COPY start-appdynamics ${CLUSTER_AGENT_HOME} 42 | RUN mkdir -p /opt/appdynamics/cluster-agent/logs && chmod 774 /opt/appdynamics/cluster-agent/logs && \ 43 | chmod 744 /opt/appdynamics/cluster-agent/start-appdynamics && \ 44 | chown -R appdynamics:0 /opt/appdynamics && \ 45 | chmod -R 774 /opt/appdynamics 46 | 47 | USER 1001 48 | 49 | # Changing directory to CLUSTER_AGENT_HOME 50 | WORKDIR ${CLUSTER_AGENT_HOME} 51 | 52 | # Decided system shell an ENTRYPOINT because to run command to debug the container whenever required 53 | # execute the start-appdynamics.sh script in the shell and start the cluster agent 54 | ENTRYPOINT ["/bin/sh"] 55 | CMD ["-c", "./start-appdynamics"] 56 | 57 | -------------------------------------------------------------------------------- /appd-cluster-agent/Dockerfile-rhel: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi-minimal 2 | 3 | MAINTAINER AppDynamics 4 | 5 | LABEL name="AppDynamics Cluster Agent" \ 6 | vendor="AppDynamics" \ 7 | version="23.9.0" \ 8 | release="1" \ 9 | url="https://www.appdynamics.com" \ 10 | summary="AppDynamics monitoring solution for applications deployed to Kubernetes clusters" \ 11 | description="The ClusterAgent monitors state of Kubernetes or openshift resources and derives metrics to provide visibility into common application impacting issues." 12 | 13 | # Install required packages 14 | RUN microdnf install unzip shadow-utils --nodocs && microdnf clean all 15 | 16 | # Install AppDynamics Cluster Agent 17 | ENV CLUSTER_AGENT_HOME /opt/appdynamics/cluster-agent/ 18 | COPY cluster-agent.zip /tmp/cluster-agent.zip 19 | COPY LICENSE /licenses/ 20 | 21 | # Create a group and user 22 | RUN groupadd -g 1001 appdynamics && \ 23 | useradd appdynamics -g appdynamics -u 1001 && \ 24 | mkdir -p ${CLUSTER_AGENT_HOME} && \ 25 | unzip -oq /tmp/cluster-agent.zip -d ${CLUSTER_AGENT_HOME} && \ 26 | rm /tmp/cluster-agent.zip && \ 27 | rm -rf /opt/appdynamics/cluster-agent/config/agent-monitoring.yml && \ 28 | rm -rf /opt/appdynamics/cluster-agent/config/instrumentation.yml && \ 29 | mkdir /opt/appdynamics/cluster-agent/config/agent-monitoring && \ 30 | touch /opt/appdynamics/cluster-agent/config/agent-monitoring/agent-monitoring.yml && \ 31 | ln -s /opt/appdynamics/cluster-agent/config/agent-monitoring/agent-monitoring.yml /opt/appdynamics/cluster-agent/config/agent-monitoring.yml && \ 32 | mkdir /opt/appdynamics/cluster-agent/config/instrumentation && \ 33 | touch /opt/appdynamics/cluster-agent/config/instrumentation/instrumentation.yml && \ 34 | ln -s /opt/appdynamics/cluster-agent/config/instrumentation/instrumentation.yml /opt/appdynamics/cluster-agent/config/instrumentation.yml 35 | 36 | # Include start script to configure and start Cluster Agent at runtime 37 | COPY start-appdynamics ${CLUSTER_AGENT_HOME} 38 | RUN mkdir -p /opt/appdynamics/cluster-agent/logs && chmod 774 /opt/appdynamics/cluster-agent/logs && \ 39 | chmod 744 /opt/appdynamics/cluster-agent/start-appdynamics && \ 40 | chown -R appdynamics:0 /opt/appdynamics && \ 41 | chmod -R 774 /opt/appdynamics 42 | 43 | USER 1001 44 | 45 | # Changing directory to CLUSTER_AGENT_HOME 46 | WORKDIR ${CLUSTER_AGENT_HOME} 47 | 48 | # Decided system shell an ENTRYPOINT because to run command to debug the container whenever required 49 | # execute the start-appdynamics.sh script in the shell and start the cluster agent 50 | ENTRYPOINT ["/bin/sh"] 51 | CMD ["-c", "./start-appdynamics"] 52 | -------------------------------------------------------------------------------- /appd-cluster-agent/README.md: -------------------------------------------------------------------------------- 1 | ## ⚠️ Deprecation Notice 2 | This is a notice for sunsetting this public facing repository containing AppDynamics dockerfiles in Github. 3 | 4 | The docker files in this repository will be maintained till October 31st 2023, post which it will not be updated. After this date, the latest docker files will continue to be made available via the [AppDynamics download portal](https://download.appdynamics.com/) for customers who would like to continue to build their own docker images. 5 | 6 | ### Building Cluster Agent Image 7 | 8 | To build the cluster agent Image to deploy it on K8s or Openshift. Please follow the below steps: 9 | 10 | 1. Get the cluster agent packages from [AppDynamics download portal](https://download.appdynamics.com/). 11 | The available packages on download portal are: 12 | 13 | a) One based on Alpine Linux version 3.11.6 (appdynamics-cluster-agent-alpine-linux-\.zip) 14 | 15 | b) One based on Rhel Linux version 7 (appdynamics-cluster-agent-rhel-linux-\.zip) 16 | 17 | Download the above package according to the Image type you want to build. 18 | If you want to build Alpine based cluster agent Image then download appdynamics-cluster-agent-alpine-linux-\.zip file and if you want to build Rhel based cluster agent Image then download appdynamics-cluster-agent-rhel-linux-\.zip. 19 | 20 | 2. Now Extract the zip file which you have downloaded from Appdynamics Download Portal. Then open the extracted file and go to the docker folder and get the cluster-agent.zip file. 21 | 22 | 3. Copy the cluster-agent.zip file to the folder where you have cloned the appd-cluster-agent repo. Make sure that now you have below files before going to the next step. 23 | 24 | a) Dockerfile 25 | 26 | b) Dockerfile-rhel 27 | 28 | c) start-appdynamics 29 | 30 | d) cluster-agent.zip 31 | 32 | 4. Build and tag a docker image using this syntax: 33 | 34 | a) For Alpine Linux 3.11.6 35 | 36 | docker build -t //cluster-agent: . 37 | 38 | For Example: 39 | 40 | docker build -t docker.io/johndoe/cluster-agent:20.6.0 . 41 | 42 | b) For Rhel Linux 7 43 | 44 | docker build -t //cluster-agent: -f Dockerfile-rhel . 45 | 46 | For Example: 47 | 48 | docker build -t docker.io/johndoe/cluster-agent:20.6.0 -f Dockerfile-rhel . 49 | 50 | 5. When the build is successful, check that the image appears in your local Docker repository. 51 | 52 | 6. Now, you are able to use the cluster agent Image. 53 | 54 | 7. You can push the Image to any docker repository of your choice 55 | 56 | **NOTE**: You can also use a pre-built Alpine based Cluster Agent Image or Rhel based Cluster Agent Image. Please refer to the link https://docs.appdynamics.com/display/PRO45/Build+the+Cluster+Agent+Container+Image and go to the section **Use Pre-Built Cluster Agent Image** and follow the instructions. 57 | -------------------------------------------------------------------------------- /appd-cluster-agent/start-appdynamics: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Initializing CA_PROPERTIES variable 4 | CLUSTER_AGENT_HOME_DIRECTORY=${PWD} 5 | 6 | # Start Cluster Agent 7 | cd $CLUSTER_AGENT_HOME_DIRECTORY 8 | 9 | CA_PROPERTIES="" 10 | 11 | # Account Name 12 | if [ -n "$APPDYNAMICS_AGENT_ACCOUNT_NAME" ]; then 13 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.accountName=$APPDYNAMICS_AGENT_ACCOUNT_NAME" 14 | fi 15 | 16 | # Controller host 17 | if [ -n "$APPDYNAMICS_CONTROLLER_HOST_NAME" ]; then 18 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.controller.hostName=$APPDYNAMICS_CONTROLLER_HOST_NAME" 19 | fi 20 | 21 | # Controller port 22 | if [ -n "$APPDYNAMICS_CONTROLLER_PORT" ]; then 23 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.controller.port=$APPDYNAMICS_CONTROLLER_PORT" 24 | fi 25 | 26 | # ssl enabled 27 | if [ -n "$APPDYNAMICS_CONTROLLER_SSL_ENABLED" ]; then 28 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.controller.ssl.enabled=$APPDYNAMICS_CONTROLLER_SSL_ENABLED" 29 | fi 30 | 31 | # Cluster Name 32 | if [ -n "$APPDYNAMICS_CLUSTER_NAME" ]; then 33 | export APPDYNAMICS_AGENT_CLUSTER_NAME=$APPDYNAMICS_CLUSTER_NAME 34 | fi 35 | 36 | # Monitored Resources 37 | if [ -n "$APPDYNAMICS_CLUSTER_MONITORED_RESOURCES" ]; then 38 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.monitoredResources=$APPDYNAMICS_CLUSTER_MONITORED_RESOURCES" 39 | fi 40 | 41 | # Monitored Namespaces 42 | if [ -n "$APPDYNAMICS_CLUSTER_MONITORED_NAMESPACES" ]; then 43 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.monitoredNamespaces=$APPDYNAMICS_CLUSTER_MONITORED_NAMESPACES" 44 | fi 45 | 46 | # Event Upload Interval 47 | if [ -n "$APPDYNAMICS_CLUSTER_EVENT_UPLOAD_INTERVAL" ]; then 48 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.event.upload.interval=$APPDYNAMICS_CLUSTER_EVENT_UPLOAD_INTERVAL" 49 | fi 50 | 51 | # Container Registration Interval 52 | if [ -n "$APPDYNAMICS_CLUSTER_CONTAINER_REGISTRATION_INTERVAL" ]; then 53 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.docker.container.registration.interval=$APPDYNAMICS_CLUSTER_CONTAINER_REGISTRATION_INTERVAL" 54 | fi 55 | 56 | # Http Client Timeout Interval 57 | if [ -n "$APPDYNAMICS_CLUSTER_HTTP_CLIENT_TIMEOUT_INTERVAL" ]; then 58 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.httpClient.timeout.interval=$APPDYNAMICS_CLUSTER_HTTP_CLIENT_TIMEOUT_INTERVAL" 59 | fi 60 | 61 | # log output directory 62 | if [ -n "$APPDYNAMICS_CLUSTER_LOG_OUTPUT_DIRECTORY" ]; then 63 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.logOutputDirectory=$APPDYNAMICS_CLUSTER_LOG_OUTPUT_DIRECTORY" 64 | fi 65 | 66 | # Additional properties for the cluster agent 67 | if [ -n "$APPDYNAMICS_CLUSTER_ADDITIONAL_PROPERTIES" ]; then 68 | CA_PROPERTIES="${CA_PROPERTIES} $APPDYNAMICS_CLUSTER_ADDITIONAL_PROPERTIES" 69 | fi 70 | 71 | echo "CA_PROPERTIES=$CA_PROPERTIES" 72 | echo "APPDYNAMICS_AGENT_CLUSTER_NAME=$APPDYNAMICS_AGENT_CLUSTER_NAME" 73 | 74 | # access key 75 | if [ -n "$APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY" ]; then 76 | CA_PROPERTIES="${CA_PROPERTIES} -appdynamics.agent.accountAccessKey=$APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY" 77 | echo "Property -appdynamics.agent.accountAccessKey successfully read and added to CA_PROPERTIES" 78 | fi 79 | 80 | ./cluster-agent ${CA_PROPERTIES} -------------------------------------------------------------------------------- /appd-db-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM openjdk:8-jre-slim AS builder 3 | 4 | ARG APPD_AGENT_VERSION 5 | ARG APPD_AGENT_SHA256 6 | 7 | 8 | RUN apt-get update -y; \ 9 | apt-get install -y unzip 10 | 11 | COPY dbagent-${APPD_AGENT_VERSION}.zip / 12 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 13 | echo "${APPD_AGENT_SHA256} *dbagent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 14 | && sha256sum -c appd_checksum \ 15 | && rm appd_checksum \ 16 | && unzip -oq dbagent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 17 | else \ 18 | unzip -oq dbagent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 19 | fi 20 | 21 | COPY LICENSE /tmp 22 | 23 | FROM openjdk:8-jre-slim 24 | 25 | ARG APPD_AGENT_VERSION 26 | 27 | MAINTAINER support@appdynamics.com 28 | 29 | LABEL name="AppDynamics DB Agent" \ 30 | vendor="AppDynamics" \ 31 | version="${APPD_AGENT_VERSION}" \ 32 | release="1" \ 33 | url="https://www.appdynamics.com" \ 34 | summary="AppDynamics solution for monitoring databases" \ 35 | description="The DB Agent monitors database health and correlates it with the application performance" 36 | 37 | 38 | COPY --from=builder /tmp /opt/appdynamics 39 | 40 | ENV DB_AGENT_HOME /opt/appdynamics 41 | 42 | WORKDIR ${DB_AGENT_HOME} 43 | 44 | 45 | COPY startup.sh ./startup.sh 46 | RUN chmod +x ./startup.sh 47 | 48 | 49 | RUN chgrp -R 0 /opt && \ 50 | chmod -R g=u /opt 51 | 52 | 53 | CMD "./startup.sh" -------------------------------------------------------------------------------- /appd-db-agent/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/db-agent 4 | if [ "x$3" != "x" ]; then 5 | IMAGE_NAME=$3 6 | fi 7 | FILE="Dockerfile" 8 | if [ "x$4" != "x" ]; then 9 | FILE=$4 10 | fi 11 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache -f ${FILE} . -------------------------------------------------------------------------------- /appd-db-agent/deploy/db-agent.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: Deployment 3 | metadata: 4 | name: db-agent 5 | spec: 6 | selector: 7 | matchLabels: 8 | name: db-agent 9 | template: 10 | metadata: 11 | labels: 12 | name: db-agent 13 | spec: 14 | serviceAccountName: appdynamics-infraviz 15 | containers: 16 | - name: db-agent 17 | image: appdynamics/db-agent:4.5.16 18 | imagePullPolicy: Always 19 | env: 20 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 21 | valueFrom: 22 | secretKeyRef: 23 | key: appd-key 24 | name: appd-secret 25 | - name: APPDYNAMICS_DB_AGENT_NAME 26 | value: MyDBAgent 27 | envFrom: 28 | - configMapRef: 29 | name: db-config 30 | resources: 31 | limits: 32 | cpu: "2" 33 | memory: "2G" 34 | requests: 35 | cpu: "1" 36 | memory: "1G" 37 | volumeMounts: 38 | - name: db-log-volume 39 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 40 | subPath: log4j.xml 41 | restartPolicy: Always 42 | volumes: 43 | - name: db-log-volume 44 | configMap: 45 | name: db-log-config 46 | -------------------------------------------------------------------------------- /appd-db-agent/deploy/db-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | APPDYNAMICS_AGENT_ACCOUNT_NAME: customer1 4 | APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME: f48ef359-59fa-4cf2-a798-314e2e040de7 5 | APPDYNAMICS_CONTROLLER_HOST_NAME: saas.appdynamics.com 6 | APPDYNAMICS_CONTROLLER_PORT: "443" 7 | APPDYNAMICS_CONTROLLER_SSL_ENABLED: "true" 8 | APPDYNAMICS_AGENT_PROXY_HOST: "" #optional 9 | APPDYNAMICS_AGENT_PROXY_PORT: "" #optional 10 | APPDYNAMICS_AGENT_PROXY_USER: "" #optional 11 | APPDYNAMICS_AGENT_PROXY_PASS: "" #optional 12 | kind: ConfigMap 13 | metadata: 14 | name: db-config -------------------------------------------------------------------------------- /appd-db-agent/deploy/db-log-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | log4j.xml: "\n\n\n\n 5 | \ \n 6 | \ \n \n \n 8 | \ \n\n \n 9 | \ \n \n \n \n \n \n \n\n 13 | \ \n 14 | \ \n 15 | \ \n \n \n \n 17 | \ \n\n \n \n 18 | \ \n\n \n \n 19 | \ \n\n \n 21 | \ \n 22 | \ \n \n\n \n \n \n 25 | \ \n \n \n \n 26 | \ \n \n\n \n 27 | \ \n \n \n \n \n \n \n 30 | \ \n\n \n \n \n \n \n\n\n" 32 | kind: ConfigMap 33 | metadata: 34 | name: db-log-config -------------------------------------------------------------------------------- /appd-db-agent/deploy/proxy.yaml: -------------------------------------------------------------------------------- 1 | kind: Service 2 | apiVersion: v1 3 | metadata: 4 | name: mysql-promotions 5 | spec: 6 | type: ExternalName 7 | externalName: mysql-promotions.dev.svc.cluster.local 8 | ports: 9 | - port: 3306 10 | targetPort: 3306 -------------------------------------------------------------------------------- /appd-db-agent/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | DB_PROPERTIES=${APPDYNAMICS_DB_PROPERTIES} 5 | DB_PROPERTIES+=" -Ddbagent.name=${APPDYNAMICS_DB_AGENT_NAME}" 6 | DB_PROPERTIES+=" -Dappdynamics.controller.hostName=${APPDYNAMICS_CONTROLLER_HOST_NAME}" 7 | DB_PROPERTIES+=" -Dappdynamics.controller.port=${APPDYNAMICS_CONTROLLER_PORT}" 8 | DB_PROPERTIES+=" -Dappdynamics.agent.accountName=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" 9 | DB_PROPERTIES+=" -Dappdynamics.agent.accountAccessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" 10 | DB_PROPERTIES+=" -Dappdynamics.controller.ssl.enabled=${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" 11 | 12 | 13 | 14 | 15 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 16 | DB_PROPERTIES+=" -Dappdynamics.http.proxyHost=${APPDYNAMICS_AGENT_PROXY_HOST}" 17 | fi 18 | 19 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 20 | DB_PROPERTIES+=" -Dappdynamics.http.proxyPort=${APPDYNAMICS_AGENT_PROXY_PORT}" 21 | fi 22 | 23 | if [ "x${APPDYNAMICS_AGENT_PROXY_USER}" != "x" ]; then 24 | DB_PROPERTIES+=" -Dappdynamics.http.proxyUser=${APPDYNAMICS_AGENT_PROXY_USER}" 25 | fi 26 | 27 | if [ "x${APPDYNAMICS_AGENT_PROXY_PASS}" != "x" ]; then 28 | DB_PROPERTIES+=" -Dappdynamics.http.proxyPasswordFile=${APPDYNAMICS_AGENT_PROXY_PASS}" 29 | fi 30 | 31 | 32 | 33 | # Start Machine Agent 34 | java ${DB_PROPERTIES} -jar ${DB_AGENT_HOME}/db-agent.jar -------------------------------------------------------------------------------- /appd-dotnet-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apk --no-cache add unzip 7 | 8 | ADD LICENSE /licenses/ 9 | 10 | COPY AppDynamics-DotNetCore-${APPD_AGENT_VERSION}.zip / 11 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 12 | echo "${APPD_AGENT_SHA256} *AppDynamics-DotNetCore-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppDynamics-DotNetCore-${APPD_AGENT_VERSION}.zip -d /tmp; \ 16 | else \ 17 | unzip -oq AppDynamics-DotNetCore-${APPD_AGENT_VERSION}.zip -d /tmp; \ 18 | fi 19 | 20 | FROM alpine 21 | 22 | ARG APPD_AGENT_VERSION 23 | 24 | MAINTAINER support@appdynamics.com 25 | 26 | LABEL name="AppDynamics Agent for .Net Core on Linux" \ 27 | vendor="AppDynamics" \ 28 | version="${APPD_AGENT_VERSION}" \ 29 | release="1" \ 30 | url="https://www.appdynamics.com" \ 31 | summary="AppDynamics solution for monitoring applications in .Net Core on Linux" \ 32 | description="This agent monitors applications developed in.Net Core on Linux" 33 | 34 | 35 | RUN apk update && apk upgrade && rm -f /var/cache/apk/* 36 | 37 | COPY --from=builder /tmp /opt/appdynamics 38 | 39 | COPY --from=builder /licenses/ /opt/appdynamics/licenses/ -------------------------------------------------------------------------------- /appd-dotnet-agent/README.md: -------------------------------------------------------------------------------- 1 | ### .Net Core Agent Image 2 | 3 | * Download the latest agent bundle from https://download.appdynamics.com/download/#version=&apm=dotnet%2Cdotnet-core&os=&platform_admin_os=&appdynamics_cluster_os=&events=&eum=&page=1 4 | 5 | * Make a note of sha256 checksum value and the full version of the agent (e.g. 4.5.8.0) 6 | 7 | * Run `./build.sh` passing the version and the checksum. The checksum can be left blank to avoid validation. 8 | It is a best practice to validate the package integrity. 9 | 10 | 11 | An example yaml spec is provided to demonstrate how to deploy the AppDynamics .Net Core agent in the init container and pass it to the application to be instrumented. 12 | It is located in the `deploy` folder along with a template confgMap with required environment variables. -------------------------------------------------------------------------------- /appd-dotnet-agent/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | IMAGE_NAME=appdynamics/dotnet-core-agent 3 | if [ "x$3" != "x" ]; then 4 | IMAGE_NAME=$3 5 | fi 6 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache . -------------------------------------------------------------------------------- /appd-dotnet-agent/deploy/dotnet-app.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: dotnet-app 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | name: dotnet-app 11 | spec: 12 | serviceAccountName: app-user-sa 13 | initContainers: 14 | - name: appd-agent 15 | command: 16 | - cp 17 | - -ra 18 | - /opt/temp/. 19 | - /opt/appd 20 | image: dotnet-agent:v1 21 | imagePullPolicy: IfNotPresent 22 | volumeMounts: 23 | - mountPath: /opt/appd 24 | name: appd-agent-repo 25 | containers: 26 | - name: dotnet-app 27 | image: microsoft/dotnet-samples:aspnetapp 28 | imagePullPolicy: IfNotPresent 29 | envFrom: 30 | - configMapRef: 31 | name: dotnet-config 32 | env: 33 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 34 | valueFrom: 35 | secretKeyRef: 36 | name: appd-secret 37 | key: appd-key 38 | ports: 39 | - containerPort: 80 40 | volumeMounts: 41 | - mountPath: /opt/appd 42 | name: appd-agent-repo 43 | restartPolicy: Always 44 | volumes: 45 | - name: appd-agent-repo 46 | emptyDir: {} 47 | 48 | 49 | --- 50 | apiVersion: v1 51 | kind: Service 52 | metadata: 53 | name: dotnet-app 54 | spec: 55 | selector: 56 | name: dotnet-app 57 | ports: 58 | - name: "80" 59 | port: 80 60 | targetPort: 80 61 | type: NodePort -------------------------------------------------------------------------------- /appd-dotnet-agent/deploy/dotnet-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | CORECLR_PROFILER: "{57e1aa68-2229-41aa-9931-a6e93bbc64d8}" 4 | CORECLR_ENABLE_PROFILING: "1" 5 | CORECLR_PROFILER_PATH: "/opt/appdynamics/libappdprofiler.so" 6 | APPDYNAMICS_AGENT_ACCOUNT_NAME: customer1 7 | APPDYNAMICS_AGENT_APPLICATION_NAME: DotNetApp 8 | APPDYNAMICS_AGENT_TIER_NAME: Web 9 | APPDYNAMICS_AGENT_REUSE_NODE_NAME: "true" 10 | APPDYNAMICS_AGENT_REUSE_NODE_NAME_PREFIX: "Node" 11 | APPDYNAMICS_CONTROLLER_HOST_NAME: 12 | APPDYNAMICS_CONTROLLER_PORT: "8090" 13 | APPDYNAMICS_CONTROLLER_SSL_ENABLED: "true" 14 | kind: ConfigMap 15 | metadata: 16 | name: dotnet-config -------------------------------------------------------------------------------- /appd-java-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | 7 | RUN apk --no-cache add unzip 8 | 9 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 10 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 11 | echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 15 | else \ 16 | unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 17 | fi 18 | 19 | ADD LICENSE /tmp 20 | 21 | FROM alpine 22 | 23 | ARG APPD_AGENT_VERSION 24 | 25 | MAINTAINER support@appdynamics.com 26 | 27 | LABEL name="AppDynamics Java Agent" \ 28 | vendor="AppDynamics" \ 29 | version="${APPD_AGENT_VERSION}" \ 30 | release="1" \ 31 | url="https://www.appdynamics.com" \ 32 | summary="AppDynamics solution for monitoring Java applications" \ 33 | description="AppDynamics agent for monitoring Java applications" 34 | 35 | 36 | COPY --from=builder /tmp /opt/appdynamics 37 | 38 | CMD [ "echo", "Delivering the Java Agent. Copy the contents of /opt/appdynamics to the application container" ] -------------------------------------------------------------------------------- /appd-java-agent/Dockerfile-rhel: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | 7 | RUN apk --no-cache add unzip 8 | 9 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 10 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 11 | echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 15 | else \ 16 | unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 17 | fi 18 | 19 | ADD LICENSE /licenses/ 20 | 21 | FROM registry.access.redhat.com/rhel7-minimal 22 | 23 | ARG APPD_AGENT_VERSION 24 | 25 | MAINTAINER support@appdynamics.com 26 | 27 | LABEL name="AppDynamics Java Agent" \ 28 | vendor="AppDynamics" \ 29 | version="${APPD_AGENT_VERSION}" \ 30 | release="1" \ 31 | url="https://www.appdynamics.com" \ 32 | summary="AppDynamics solution for monitoring Java applications" \ 33 | description="AppDynamics agent for monitoring Java applications" 34 | 35 | 36 | COPY --from=builder /tmp /opt/appdynamics 37 | COPY --from=builder /licenses /opt/appdynamics/licenses 38 | COPY --from=builder /licenses /licenses 39 | USER 1000 40 | 41 | CMD [ "echo", "Delivering the Java Agent. Copy the contents of /opt/appdynamics to the application container" ] -------------------------------------------------------------------------------- /appd-java-agent/README.md: -------------------------------------------------------------------------------- 1 | ### Java Agent Image 2 | 3 | * Download the latest agent bundle from https://download.appdynamics.com/download/ 4 | 5 | * Make a note of sha256 checksum value and the full version of the agent (e.g. 4.5.9.2096) 6 | 7 | * Run `./build.sh` passing the version and the checksum. The checksum can be left blank to avoid validation. 8 | It is a best practice to validate the package integrity. 9 | 10 | An example yaml spec `deploy/java-init.yaml` is provided to demonstrate how to deploy the AppDynamics java agent in the init container and pass it to the application to be instrumented. 11 | The example assumes that the application makes use of `$JAVA_OPTS` env var -------------------------------------------------------------------------------- /appd-java-agent/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/java-agent 4 | if [ "x$3" != "x" ]; then 5 | IMAGE_NAME=$3 6 | fi 7 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache . -------------------------------------------------------------------------------- /appd-java-agent/deploy/java-init.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: Deployment 3 | metadata: 4 | name: java-init-biq 5 | spec: 6 | replicas: 1 7 | template: 8 | metadata: 9 | labels: 10 | tier: client-web 11 | name: java-init 12 | spec: 13 | serviceAccountName: app-user-sa 14 | initContainers: 15 | - name: appd-agent 16 | command: 17 | - cp 18 | - -ra 19 | - /opt/temp/. 20 | - /opt/appd/ 21 | image: appdynamics/java-agent:v4.5 22 | imagePullPolicy: IfNotPresent 23 | resources: 24 | limits: 25 | cpu: 200m 26 | memory: 100M 27 | requests: 28 | cpu: 100m 29 | memory: 50M 30 | volumeMounts: 31 | - mountPath: /opt/appd 32 | name: appd-agent-repo 33 | containers: 34 | - name: java-init 35 | image: java-service:v1 36 | imagePullPolicy: IfNotPresent 37 | envFrom: 38 | - configMapRef: 39 | name: apm-config 40 | env: 41 | - name: ACCOUNT_ACCESS_KEY 42 | valueFrom: 43 | secretKeyRef: 44 | key: appd-key 45 | name: appd-secret 46 | - name: APPLICATION_NAME 47 | value: JavaInit 48 | - name: TIER_NAME 49 | value: Web 50 | - name: JAVA_OPTS 51 | value: " -Dappdynamics.agent.accountAccessKey=$(ACCOUNT_ACCESS_KEY) 52 | -Dappdynamics.controller.hostName=$(CONTROLLER_HOST) 53 | -Dappdynamics.controller.port=$(CONTROLLER_PORT) 54 | -Dappdynamics.controller.ssl.enabled=$(CONTROLLER_SSL_ENABLED) 55 | -Dappdynamics.agent.accountName=$(ACCOUNT_NAME) 56 | -Dappdynamics.agent.applicationName=$(APPLICATION_NAME) 57 | -Dappdynamics.agent.tierName=$(TIER_NAME) 58 | -Dappdynamics.agent.reuse.nodeName=true 59 | -Dappdynamics.agent.reuse.nodeName.prefix=$(TIER_NAME) 60 | -javaagent:/opt/appd/javaagent.jar " 61 | volumeMounts: 62 | - mountPath: /opt/appd 63 | name: appd-agent-repo 64 | ports: 65 | - containerPort: 8080 66 | restartPolicy: Always 67 | volumes: 68 | - name: appd-agent-repo 69 | emptyDir: {} 70 | 71 | --- 72 | apiVersion: v1 73 | kind: Service 74 | metadata: 75 | name: client-web 76 | spec: 77 | selector: 78 | tier: client-web 79 | ports: 80 | - name: "8080" 81 | port: 8080 82 | targetPort: 8080 83 | status: 84 | loadBalancer: {} -------------------------------------------------------------------------------- /appd-java/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore Agent installers 2 | *.zip 3 | -------------------------------------------------------------------------------- /appd-java/appdynamics.env: -------------------------------------------------------------------------------- 1 | APPDYNAMICS_AGENT_ACCOUNT_NAME= 2 | APPDYNAMICS_CONTROLLER_SSL_ENABLED= 3 | APPDYNAMICS_AGENT_TIER_NAME= 4 | APPDYNAMICS_AGENT_APPLICATION_NAME= 5 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY= 6 | APPDYNAMICS_CONTROLLER_HOST_NAME= 7 | APPDYNAMICS_CONTROLLER_PORT= 8 | # If setting a fixed node name is desired, you can set one with the APPDYNAMICS_AGENT_NODE_NAME environment variable, however please note that 9 | # node names need to be unique within an AppDynamics tier so this approach will not work for scale-out scenarios. 10 | #APPDYNAMICS_AGENT_NODE_NAME= 11 | # 12 | # For scale-out scenarios, the presence of the APPDYNAMICS_NODE_PREFIX variable causes the start scripts within the docker images to request dynamic node naming 13 | # by adding -Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${APPDYNAMICS_NODE_PREFIX} to the JVM command line 14 | # If you set both APPDYNAMICS_AGENT_NODE_NAME and APPDYNAMICS_NODE_PREFIX then the agent will name the node according to the dynamic naming rules, but the agent log directory 15 | # within the container will be named per the APPDYNAMICS_AGENT_NODE_NAME variable 16 | APPDYNAMICS_NODE_PREFIX=Test-Node 17 | -------------------------------------------------------------------------------- /appd-java/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | jre8-alpine: 5 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_jre8-alpine 6 | build: 7 | context: . 8 | dockerfile: ./openjdk/8/jre/alpine/Dockerfile 9 | args: 10 | APPD_AGENT_VERSION: 11 | APPD_AGENT_SHA256: 12 | 13 | jre8-slim: 14 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_jre8-slim 15 | build: 16 | context: . 17 | dockerfile: ./openjdk/8/jre/slim/Dockerfile 18 | args: 19 | APPD_AGENT_VERSION: 20 | APPD_AGENT_SHA256: 21 | 22 | jdk8-alpine: 23 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_jdk8-alpine 24 | build: 25 | context: . 26 | dockerfile: ./openjdk/8/jdk/alpine/Dockerfile 27 | args: 28 | APPD_AGENT_VERSION: 29 | APPD_AGENT_SHA256: 30 | 31 | jdk8-slim: 32 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_jdk8-slim 33 | build: 34 | context: . 35 | dockerfile: ./openjdk/8/jdk/slim/Dockerfile 36 | args: 37 | APPD_AGENT_VERSION: 38 | APPD_AGENT_SHA256: 39 | 40 | tomcat8-jre8-alpine: 41 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_tomcat8-jre8-alpine 42 | build: 43 | context: . 44 | dockerfile: ./tomcat/8/jre8-alpine/Dockerfile 45 | args: 46 | APPD_AGENT_VERSION: 47 | APPD_AGENT_SHA256: 48 | 49 | tomcat9-jre8-alpine: 50 | image: appdynamics/java:${APPD_AGENT_MAJOR_VERSION}_tomcat9-jre8-alpine 51 | build: 52 | context: . 53 | dockerfile: ./tomcat/9/jre8-alpine/Dockerfile 54 | args: 55 | APPD_AGENT_VERSION: 56 | APPD_AGENT_SHA256: 57 | 58 | -------------------------------------------------------------------------------- /appd-java/jetty/9/jre8-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM jetty:9-jre8-alpine 17 | 18 | USER root 19 | RUN apk update && apk upgrade 20 | 21 | USER jetty 22 | COPY --from=builder /tmp /opt/appdynamics 23 | ENV JAVA_AGENT -javaagent:/opt/appdynamics/javaagent.jar 24 | 25 | CMD ["sh", "-c", "java $JAVA_AGENT ${APPDYNAMICS_NODE_PREFIX:+-Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${APPDYNAMICS_NODE_PREFIX}} -jar /usr/local/jetty/start.jar"] 26 | 27 | -------------------------------------------------------------------------------- /appd-java/jetty/9/jre8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM jetty:9-jre8 18 | 19 | USER root 20 | RUN apt-get update && apt-get -y upgrade 21 | 22 | USER jetty 23 | COPY --from=builder /tmp /opt/appdynamics 24 | ENV JAVA_AGENT -javaagent:/opt/appdynamics/javaagent.jar 25 | 26 | CMD ["sh", "-c", "java $JAVA_AGENT ${APPDYNAMICS_NODE_PREFIX:+-Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${APPDYNAMICS_NODE_PREFIX}} -jar /usr/local/jetty/start.jar"] 27 | -------------------------------------------------------------------------------- /appd-java/openjdk/7/jdk/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM openjdk:7-jdk-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | -------------------------------------------------------------------------------- /appd-java/openjdk/7/jdk/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM openjdk:7-jdk-slim 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | -------------------------------------------------------------------------------- /appd-java/openjdk/7/jre/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM openjdk:7-jre-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | -------------------------------------------------------------------------------- /appd-java/openjdk/7/jre/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM openjdk:7-jre-slim 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | -------------------------------------------------------------------------------- /appd-java/openjdk/8/jdk/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM openjdk:8-jdk-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | -------------------------------------------------------------------------------- /appd-java/openjdk/8/jdk/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM openjdk:8-jdk-slim 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | -------------------------------------------------------------------------------- /appd-java/openjdk/8/jre/alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM openjdk:8-jre-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | -------------------------------------------------------------------------------- /appd-java/openjdk/8/jre/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM openjdk:8-jre-slim 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | -------------------------------------------------------------------------------- /appd-java/openjdk/9/jre/slim/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_ZIP 7 | ARG APPD_AGENT_SHA256 8 | 9 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 10 | && rm -rf /var/lib/apt/lists/* 11 | 12 | COPY ${APPD_AGENT_ZIP} / 13 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 14 | && sha256sum -c appd_checksum \ 15 | && rm appd_checksum \ 16 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 17 | 18 | FROM openjdk:9-jre-slim 19 | RUN apt-get update && apt-get -y upgrade 20 | COPY --from=builder /tmp /opt/appdynamics 21 | -------------------------------------------------------------------------------- /appd-java/setenv.sh: -------------------------------------------------------------------------------- 1 | # Set AppDynamics Java Agent environment variables using docker run -e, --env or --env-file 2 | # https://docs.appdynamics.com/display/PRO43/Use+Environment+Variables+for+Java+Agent+Settings 3 | export CATALINA_OPTS="$CATALINA_OPTS -javaagent:/opt/appdynamics/javaagent.jar ${APPDYNAMICS_NODE_PREFIX:+-Dappdynamics.agent.reuse.nodeName=true -Dappdynamics.agent.reuse.nodeName.prefix=${APPDYNAMICS_NODE_PREFIX}}" 4 | -------------------------------------------------------------------------------- /appd-java/tomcat/7/jre7-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:7-jre7-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/7/jre8-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:7-jre8-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/7/jre8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM tomcat:7-jre8 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | COPY setenv.sh ${CATALINA_HOME}/bin/ 21 | -------------------------------------------------------------------------------- /appd-java/tomcat/8/jre7-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:8-jre7-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/8/jre8-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:8-jre8-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/8/jre8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM tomcat:8-jre8 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | COPY setenv.sh ${CATALINA_HOME}/bin/ 21 | -------------------------------------------------------------------------------- /appd-java/tomcat/9/jre7-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:9.0-jre7-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/9/jre8-alpine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apk --no-cache add unzip 9 | 10 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 15 | 16 | FROM tomcat:9-jre8-alpine 17 | RUN apk update && apk upgrade 18 | COPY --from=builder /tmp /opt/appdynamics 19 | COPY setenv.sh ${CATALINA_HOME}/bin/ 20 | -------------------------------------------------------------------------------- /appd-java/tomcat/9/jre8/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian AS builder 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | RUN apt-get update && apt-get install -y --no-install-recommends unzip \ 9 | && rm -rf /var/lib/apt/lists/* 10 | 11 | COPY AppServerAgent-${APPD_AGENT_VERSION}.zip / 12 | RUN echo "${APPD_AGENT_SHA256} *AppServerAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq AppServerAgent-${APPD_AGENT_VERSION}.zip -d /tmp 16 | 17 | FROM tomcat:9-jre8 18 | RUN apt-get update && apt-get -y upgrade 19 | COPY --from=builder /tmp /opt/appdynamics 20 | COPY setenv.sh ${CATALINA_HOME}/bin/ 21 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:11-jre-slim AS builder 2 | 3 | ARG APPD_AGENT_SHA256 4 | ARG APPD_AGENT_VERSION 5 | 6 | 7 | RUN apt-get update -y; \ 8 | apt-get install -y unzip 9 | 10 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 12 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 16 | else \ 17 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 18 | fi 19 | 20 | ADD LICENSE /licenses/ 21 | 22 | FROM openjdk:11-jre-slim 23 | 24 | ARG APPD_AGENT_VERSION 25 | 26 | MAINTAINER support@appdynamics.com 27 | 28 | LABEL name="AppDynamics MachineAgent" \ 29 | vendor="AppDynamics" \ 30 | version="${APPD_AGENT_VERSION}" \ 31 | release="1" \ 32 | url="https://www.appdynamics.com" \ 33 | summary="AppDynamics solution for monitoring infrastructure" \ 34 | description="The MachineAgent monitors resource utilization, server load and processes on the host." 35 | 36 | FROM openjdk:11-jre-slim 37 | RUN groupadd -g 1001 appdynamics && \ 38 | useradd appdynamics -g appdynamics -u 1001 && \ 39 | apt-get update && apt-get -y upgrade && \ 40 | apt-get install -y \ 41 | apt-utils \ 42 | bash \ 43 | bc \ 44 | coreutils \ 45 | dnsutils \ 46 | dumb-init \ 47 | gawk \ 48 | grep \ 49 | iproute2 \ 50 | procps \ 51 | sed \ 52 | sysstat \ 53 | unzip \ 54 | && rm -rf /var/lib/{apt,dpkg,cache,log}/ 55 | 56 | COPY --from=builder /tmp /opt/appdynamics 57 | COPY --from=builder /licenses /licenses 58 | 59 | RUN chown -R appdynamics:0 /opt/appdynamics && \ 60 | chmod -R 774 /opt/appdynamics 61 | 62 | ENV MACHINE_AGENT_HOME /opt/appdynamics 63 | 64 | WORKDIR ${MACHINE_AGENT_HOME} 65 | 66 | COPY updateAnalyticsAgent.sh ./updateAnalyticsAgent.sh 67 | RUN chmod +x ./updateAnalyticsAgent.sh 68 | 69 | COPY startup.sh ./startup.sh 70 | RUN chmod +x ./startup.sh 71 | 72 | USER 1001 73 | 74 | EXPOSE 9090 75 | 76 | CMD "./startup.sh" -------------------------------------------------------------------------------- /appd-machine-agent-analytics/Dockerfile-alpine: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apk update \ 7 | && apk upgrade \ 8 | && apk add unzip 9 | 10 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 12 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 16 | else \ 17 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 18 | fi 19 | 20 | ADD LICENSE /licenses/ 21 | 22 | FROM alpine 23 | 24 | RUN addgroup -g 1001 appdynamics && \ 25 | adduser appdynamics --ingroup appdynamics --uid 1001 --disabled-password && \ 26 | apk update \ 27 | && apk upgrade \ 28 | && apk add bash \ 29 | bc \ 30 | coreutils \ 31 | bind-tools \ 32 | dumb-init \ 33 | gawk \ 34 | grep \ 35 | iproute2 \ 36 | procps \ 37 | sed \ 38 | sysstat \ 39 | unzip \ 40 | openjdk11-jre \ 41 | eudev \ 42 | && rm -rf /var/cache/apk/* 43 | 44 | COPY --from=builder /tmp /opt/appdynamics 45 | COPY --from=builder /licenses /licenses 46 | 47 | RUN chown -R appdynamics:0 /opt/appdynamics && \ 48 | chmod -R 774 /opt/appdynamics 49 | 50 | ENV MACHINE_AGENT_HOME /opt/appdynamics 51 | 52 | WORKDIR ${MACHINE_AGENT_HOME} 53 | 54 | COPY updateAnalyticsAgent.sh ./updateAnalyticsAgent.sh 55 | RUN chmod +x ./updateAnalyticsAgent.sh 56 | 57 | COPY startup.sh ./startup.sh 58 | RUN chmod +x ./startup.sh 59 | 60 | USER 1001 61 | 62 | EXPOSE 9090 63 | 64 | CMD "./startup.sh" -------------------------------------------------------------------------------- /appd-machine-agent-analytics/Dockerfile-rhel: -------------------------------------------------------------------------------- 1 | 2 | FROM registry.access.redhat.com/rhel7-minimal 3 | 4 | MAINTAINER support@appdynamics.com 5 | 6 | LABEL name="AppDynamics MachineAgent" \ 7 | vendor="AppDynamics" \ 8 | version="4.5.18" \ 9 | release="1" \ 10 | url="https://www.appdynamics.com" \ 11 | summary="AppDynamics solution for monitoring infrastructure" \ 12 | description="The MachineAgent monitors resource utilization, server load and process on the host." 13 | 14 | ARG APPD_AGENT_VERSION 15 | ARG APPD_AGENT_SHA256 16 | 17 | RUN microdnf --enablerepo=rhel-7-server-rpms install bash procps sysstat sed coreutils unzip shadow-utils iproute java-1.8.0-openjdk-headless --nodocs 18 | RUN microdnf clean all 19 | 20 | ENV MACHINE_AGENT_HOME /opt/appdynamics 21 | WORKDIR ${MACHINE_AGENT_HOME} 22 | 23 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 24 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 25 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 26 | && sha256sum -c appd_checksum \ 27 | && rm appd_checksum \ 28 | && unzip -oq /MachineAgent-${APPD_AGENT_VERSION}.zip -d ${MACHINE_AGENT_HOME}; \ 29 | else \ 30 | unzip -oq /MachineAgent-${APPD_AGENT_VERSION}.zip -d ${MACHINE_AGENT_HOME}; \ 31 | fi 32 | 33 | ADD LICENSE /licenses/ 34 | 35 | 36 | RUN groupadd appdynamics && \ 37 | useradd appdynamics -g appdynamics 38 | 39 | COPY updateAnalyticsAgent.sh ./updateAnalyticsAgent.sh 40 | RUN chmod +x ./updateAnalyticsAgent.sh 41 | 42 | COPY startup.sh ./startup.sh 43 | RUN chmod +x ./startup.sh 44 | 45 | RUN chown -R appdynamics:appdynamics ${MACHINE_AGENT_HOME} && chmod 744 ${MACHINE_AGENT_HOME} 46 | 47 | RUN chgrp -R 0 ${MACHINE_AGENT_HOME} && chmod -R g+w ${MACHINE_AGENT_HOME} 48 | 49 | USER appdynamics 50 | 51 | EXPOSE 9090 52 | 53 | CMD "./startup.sh" 54 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/README.md: -------------------------------------------------------------------------------- 1 | ## Machine Agent 2 | 3 | ### Pre-built images 4 | The prebuilt images are available from the Docker Hub. 5 | 6 | `appdynamics/machine-agent-analytics:latest` or 7 | 8 | `appdynamics/machine-agent-analytics:4.5.9` to get a specific version of the agent 9 | 10 | ### Build your own image 11 | 12 | * Download the latest agent bundle from the [AppDynamics Official Download Site](https://download.appdynamics.com/download/) 13 | * Make a note of sha256 checksum value for the download 14 | * Rename the file to MachineAgent-x.x.x, substituing `x` with the version number, e.g. `MachineAgent-4.5.10.zip` 15 | * Run ./build.sh passing the version, as it appears in the name of the zip file, and the checksum: 16 | `./build.sh 4.5.10 d472dfc75469c` 17 | 18 | The checksum can be left blank to avoid validation. 19 | It is a best practice to validate the package integrity. 20 | 21 | By default the image is tagged `appdynamics/machine-agent-analytics`. To change the image tag, pass the new name as the 3rd parameter to the build.sh: 22 | `./build.sh 4.5.10 d472dfc75469c ` 23 | 24 | ### Deploy the AppDynamics MachineAgent 25 | 26 | * Create namespace for the AppDynamics MachineAgent. In this example, it is called `appdynamics` 27 | 28 | ``` 29 | $ kubectl create ns appdynamics 30 | ``` 31 | 32 | ``` 33 | # in OpenShift 34 | $ oc new-project appdynamics 35 | ``` 36 | 37 | * Create a secret to hold the AppDynamics controller access key 38 | 39 | ``` 40 | kubectl -n appdynamics create secret generic appd-secret \ 41 | --from-literal=appd-key= 42 | ``` 43 | 44 | * Populate the configMap in ma-config.yaml with values specific to your environment. The following values are required: 45 | * 46 | * Create the configMap 47 | ``` 48 | kubectl create -f deploy/ma-config.yaml 49 | ``` 50 | 51 | Deploy the configMap with logging settings 52 | ``` 53 | kubectl create -f deploy/ma-log-config.yaml 54 | ``` 55 | 56 | * Create a service account with appropriate RBAC permissions. By default, the account name is `appdynamics-infraviz`. 57 | The account needs to be privileged and have a read-only access to cluster entities 58 | 59 | ``` 60 | $ kubectl create -f deploy/rbac.yaml 61 | ``` 62 | 63 | ``` 64 | # For OpenShift 65 | $ oc create -f deploy/rbac-openshift.yaml 66 | ``` 67 | 68 | * Update the spec machine-agent.yaml with the reference to the newly built image. By default, the image name is set to: 69 | `appdynamics/machine-agent-analytics` 70 | 71 | * deploy the daemon set 72 | 73 | ``` 74 | $ kubectl create -f deploy/machine-agent.yaml 75 | 76 | ``` 77 | 78 | ``` 79 | # on PKS run: 80 | $ kubectl create -f deploy/machine-agent-pks.yaml 81 | ``` 82 | 83 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/machine-agent-analytics 4 | if [ "x$3" != "x" ]; then 5 | IMAGE_NAME=$3 6 | fi 7 | FILE="Dockerfile" 8 | if [ "x$4" != "x" ]; then 9 | FILE=$4 10 | fi 11 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache -f ${FILE} . -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/ma-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | APPDYNAMICS_AGENT_ACCOUNT_NAME: customer1 4 | APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME: ebed97fd-fa0d-41f8-9811-2558b9252555 5 | APPDYNAMICS_CONTROLLER_HOST_NAME: saas.appdynamics.com 6 | APPDYNAMICS_CONTROLLER_PORT: "443" 7 | APPDYNAMICS_CONTROLLER_SSL_ENABLED: "true" 8 | EVENT_ENDPOINT: https://analytics.api.appdynamics.com 9 | APPDYNAMICS_SIM_ENABLED: "true" 10 | APPDYNAMICS_DOCKER_ENABLED: "false" 11 | APPDYNAMICS_AGENT_ENABLE_CONTAINERIDASHOSTID: "false" #optional 12 | APPDYNAMICS_MACHINE_HIERARCHY_PATH: "" #optional 13 | APPDYNAMICS_AGENT_UNIQUE_HOST_ID: "" #optional 14 | APPDYNAMICS_AGENT_PROXY_HOST: "" #optional 15 | APPDYNAMICS_AGENT_PROXY_PORT: "" #optional 16 | APPDYNAMICS_AGENT_PROXY_USER: "" #optional 17 | APPDYNAMICS_AGENT_PROXY_PASS: "" #optional 18 | APPDYNAMICS_AGENT_METRIC_LIMIT: "" #optional 19 | kind: ConfigMap 20 | metadata: 21 | name: ma-config 22 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/ma-log-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | log4j.xml: | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | kind: ConfigMap 45 | metadata: 46 | name: ma-log-config -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/machine-agent-os.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | selector: 7 | matchLabels: 8 | name: appd-infra-agent 9 | template: 10 | metadata: 11 | labels: 12 | name: appd-infra-agent 13 | spec: 14 | serviceAccountName: appdynamics-infraviz 15 | containers: 16 | - name: appd-infra-agent 17 | image: appdynamics/machine-agent-analytics:latest 18 | imagePullPolicy: IfNotPresent 19 | env: 20 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 21 | valueFrom: 22 | secretKeyRef: 23 | key: appd-key 24 | name: appd-secret 25 | envFrom: 26 | - configMapRef: 27 | name: ma-config 28 | securityContext: 29 | privileged: true 30 | resources: 31 | limits: 32 | cpu: "0.6" 33 | memory: "2Gi" 34 | requests: 35 | cpu: "0.3" 36 | memory: "1G" 37 | ports: 38 | - containerPort: 9090 39 | volumeMounts: 40 | - name: ma-log-volume 41 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 42 | subPath: log4j.xml 43 | - mountPath: /hostroot 44 | name: hostroot 45 | readOnly: true 46 | restartPolicy: Always 47 | volumes: 48 | - name: ma-log-volume 49 | configMap: 50 | name: ma-log-config 51 | - name: hostroot 52 | hostPath: 53 | path: / 54 | type: Directory 55 | 56 | --- 57 | apiVersion: v1 58 | kind: Service 59 | metadata: 60 | name: appd-infra-agent-service 61 | spec: 62 | selector: 63 | name: appd-infra-agent 64 | ports: 65 | - name: "9090" 66 | port: 9090 67 | targetPort: 9090 68 | status: 69 | loadBalancer: {} 70 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/machine-agent-pks.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: appd-infra-agent 10 | spec: 11 | serviceAccountName: appdynamics-infraviz 12 | containers: 13 | - name: appd-infra-agent 14 | image: appdynamics/machine-agent-analytics:latest 15 | imagePullPolicy: IfNotPresent 16 | args: 17 | - echo starting; mkdir -p /var/run/; ln -s /mnt/run/docker/docker.sock /var/run/docker.sock; 18 | /opt/appdynamics/startup.sh 19 | command: 20 | - /bin/sh 21 | - -c 22 | env: 23 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 24 | valueFrom: 25 | secretKeyRef: 26 | key: appd-key 27 | name: appd-secret 28 | envFrom: 29 | - configMapRef: 30 | name: ma-config 31 | securityContext: 32 | privileged: true 33 | resources: 34 | limits: 35 | cpu: "0.6" 36 | memory: "2Gi" 37 | requests: 38 | cpu: "0.3" 39 | memory: "1G" 40 | ports: 41 | - containerPort: 9090 42 | volumeMounts: 43 | - name: ma-log-volume 44 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 45 | subPath: log4j.xml 46 | - mountPath: /mnt 47 | name: docker-sock 48 | readOnly: true 49 | - mountPath: /hostroot 50 | name: hostroot 51 | readOnly: true 52 | restartPolicy: Always 53 | volumes: 54 | - name: ma-log-volume 55 | configMap: 56 | name: ma-log-config 57 | - name: hostroot 58 | hostPath: 59 | path: / 60 | type: Directory 61 | - name: docker-sock 62 | hostPath: 63 | path: /var/vcap/data/sys 64 | type: Directory 65 | 66 | --- 67 | apiVersion: v1 68 | kind: Service 69 | metadata: 70 | name: appd-infra-agent-service 71 | spec: 72 | selector: 73 | name: appd-infra-agent 74 | ports: 75 | - name: "9090" 76 | port: 9090 77 | targetPort: 9090 78 | status: 79 | loadBalancer: {} 80 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/machine-agent-sec.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: appd-infra-agent 10 | spec: 11 | serviceAccountName: appdynamics-infraviz 12 | containers: 13 | - name: appd-infra-agent 14 | image: appdynamics/machine-agent-analytics:4.5.9 15 | imagePullPolicy: IfNotPresent 16 | env: 17 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 18 | valueFrom: 19 | secretKeyRef: 20 | key: appd-key 21 | name: appd-secret 22 | envFrom: 23 | - configMapRef: 24 | name: ma-config 25 | securityContext: 26 | privileged: true 27 | resources: 28 | limits: 29 | cpu: "0.6" 30 | memory: "2Gi" 31 | requests: 32 | cpu: "0.3" 33 | memory: "1G" 34 | ports: 35 | - containerPort: 9090 36 | volumeMounts: 37 | - name: ma-log-volume 38 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 39 | subPath: log4j.xml 40 | - mountPath: /hostroot/sys 41 | name: hostroot-sys 42 | readOnly: true 43 | - mountPath: /hostroot/proc 44 | name: hostroot-proc 45 | readOnly: true 46 | - mountPath: /hostroot/etc 47 | name: hostroot-etc 48 | readOnly: true 49 | - mountPath: /var/run/docker.sock 50 | name: docker-sock 51 | restartPolicy: Always 52 | volumes: 53 | - name: ma-log-volume 54 | configMap: 55 | name: ma-log-config 56 | - name: hostroot-proc 57 | hostPath: 58 | path: /proc 59 | type: Directory 60 | - name: hostroot-sys 61 | hostPath: 62 | path: /sys 63 | type: Directory 64 | - name: hostroot-etc 65 | hostPath: 66 | path: /etc 67 | type: Directory 68 | - name: docker-sock 69 | hostPath: 70 | path: /var/run/docker.sock 71 | type: Socket 72 | 73 | --- 74 | apiVersion: v1 75 | kind: Service 76 | metadata: 77 | name: appd-infra-agent-service 78 | spec: 79 | selector: 80 | name: appd-infra-agent 81 | ports: 82 | - name: "9090" 83 | port: 9090 84 | targetPort: 9090 85 | status: 86 | loadBalancer: {} 87 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/machine-agent.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: apps/v1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | selector: 7 | matchLabels: 8 | name: appd-infra-agent 9 | template: 10 | metadata: 11 | labels: 12 | name: appd-infra-agent 13 | spec: 14 | serviceAccountName: appdynamics-infraviz 15 | containers: 16 | - name: appd-infra-agent 17 | image: appdynamics/machine-agent-analytics:latest 18 | imagePullPolicy: IfNotPresent 19 | env: 20 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 21 | valueFrom: 22 | secretKeyRef: 23 | key: appd-key 24 | name: appd-secret 25 | envFrom: 26 | - configMapRef: 27 | name: ma-config 28 | securityContext: 29 | privileged: true 30 | resources: 31 | limits: 32 | cpu: "0.6" 33 | memory: "2Gi" 34 | requests: 35 | cpu: "0.3" 36 | memory: "1G" 37 | ports: 38 | - containerPort: 9090 39 | volumeMounts: 40 | - name: ma-log-volume 41 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 42 | subPath: log4j.xml 43 | - mountPath: /hostroot 44 | name: hostroot 45 | readOnly: true 46 | - mountPath: /var/run/docker.sock 47 | name: docker-sock 48 | restartPolicy: Always 49 | volumes: 50 | - name: ma-log-volume 51 | configMap: 52 | name: ma-log-config 53 | - name: hostroot 54 | hostPath: 55 | path: / 56 | type: Directory 57 | - name: docker-sock 58 | hostPath: 59 | path: /var/run/docker.sock 60 | type: Socket 61 | 62 | --- 63 | apiVersion: v1 64 | kind: Service 65 | metadata: 66 | name: appd-infra-agent-service 67 | spec: 68 | selector: 69 | name: appd-infra-agent 70 | ports: 71 | - name: "9090" 72 | port: 9090 73 | targetPort: 9090 74 | status: 75 | loadBalancer: {} 76 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/rbac-openshift.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: appdynamics-infraviz 5 | --- 6 | kind: ClusterRole 7 | apiVersion: rbac.authorization.k8s.io/v1beta1 8 | metadata: 9 | name: cluster-read-all 10 | rules: 11 | - 12 | apiGroups: 13 | - "" 14 | - apps 15 | - autoscaling 16 | - batch 17 | - extensions 18 | - policy 19 | - rbac.authorization.k8s.io 20 | resources: 21 | # everything except secrets 22 | - componentstatuses 23 | - configmaps 24 | - daemonsets 25 | - deployments 26 | - events 27 | - endpoints 28 | - horizontalpodautoscalers 29 | - ingress 30 | - jobs 31 | - limitranges 32 | - namespaces 33 | - nodes 34 | - pods 35 | - persistentvolumes 36 | - persistentvolumeclaims 37 | - resourcequotas 38 | - replicasets 39 | - replicationcontrollers 40 | - serviceaccounts 41 | - services 42 | verbs: 43 | - get 44 | - watch 45 | - list 46 | - nonResourceURLs: ["*"] 47 | verbs: 48 | - get 49 | - watch 50 | - list 51 | --- 52 | kind: ClusterRoleBinding 53 | apiVersion: rbac.authorization.k8s.io/v1beta1 54 | metadata: 55 | name: k8s-agent-readall-role-binding 56 | subjects: 57 | - kind: ServiceAccount 58 | name: appdynamics-infraviz 59 | namespace: appdynamics 60 | roleRef: 61 | apiGroup: rbac.authorization.k8s.io 62 | kind: ClusterRole 63 | name: cluster-read-all 64 | --- 65 | apiVersion: security.openshift.io/v1 66 | kind: SecurityContextConstraints 67 | metadata: 68 | name: appdynamics-infraviz 69 | allowHostDirVolumePlugin: true 70 | allowHostIPC: true 71 | allowHostNetwork: true 72 | allowHostPID: true 73 | allowHostPorts: true 74 | allowPrivilegedContainer: true 75 | allowedCapabilities: 76 | - '*' 77 | fsGroup: 78 | type: RunAsAny 79 | priority: null 80 | readOnlyRootFilesystem: false 81 | requiredDropCapabilities: null 82 | runAsUser: 83 | type: RunAsAny 84 | seLinuxContext: 85 | type: RunAsAny 86 | seccompProfiles: 87 | - '*' 88 | supplementalGroups: 89 | type: RunAsAny 90 | users: 91 | - system:serviceaccount:appdynamics:appdynamics-infraviz 92 | volumes: 93 | - '*' -------------------------------------------------------------------------------- /appd-machine-agent-analytics/deploy/rbac.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: appdynamics-infraviz 5 | --- 6 | kind: ClusterRole 7 | apiVersion: rbac.authorization.k8s.io/v1beta1 8 | metadata: 9 | name: appdynamics-infraviz 10 | rules: 11 | - 12 | apiGroups: 13 | - "" 14 | - apps 15 | - autoscaling 16 | - batch 17 | - extensions 18 | - policy 19 | - rbac.authorization.k8s.io 20 | resources: 21 | # everything except secrets 22 | - componentstatuses 23 | - configmaps 24 | - daemonsets 25 | - deployments 26 | - events 27 | - endpoints 28 | - horizontalpodautoscalers 29 | - ingress 30 | - jobs 31 | - limitranges 32 | - namespaces 33 | - nodes 34 | - pods 35 | - persistentvolumes 36 | - persistentvolumeclaims 37 | - resourcequotas 38 | - replicasets 39 | - replicationcontrollers 40 | - serviceaccounts 41 | - services 42 | verbs: 43 | - get 44 | - watch 45 | - list 46 | - nonResourceURLs: ["*"] 47 | verbs: 48 | - get 49 | - watch 50 | - list 51 | --- 52 | kind: ClusterRoleBinding 53 | apiVersion: rbac.authorization.k8s.io/v1beta1 54 | metadata: 55 | name: appdynamics-infraviz 56 | subjects: 57 | - kind: ServiceAccount 58 | name: appdynamics-infraviz 59 | namespace: appdynamics 60 | roleRef: 61 | apiGroup: rbac.authorization.k8s.io 62 | kind: ClusterRole 63 | name: appdynamics-infraviz 64 | --- 65 | apiVersion: extensions/v1beta1 66 | kind: PodSecurityPolicy 67 | metadata: 68 | name: appdynamics-infraviz 69 | annotations: 70 | seccomp.security.alpha.kubernetes.io/allowedProfileNames: '*' 71 | spec: 72 | privileged: true 73 | allowPrivilegeEscalation: true 74 | allowedCapabilities: 75 | - '*' 76 | volumes: 77 | - '*' 78 | hostNetwork: true 79 | hostIPC: true 80 | hostPID: true 81 | hostPorts: 82 | - min: 0 83 | max: 65535 84 | runAsUser: 85 | rule: 'RunAsAny' 86 | seLinux: 87 | rule: 'RunAsAny' 88 | supplementalGroups: 89 | rule: 'RunAsAny' 90 | fsGroup: 91 | rule: 'RunAsAny' 92 | --- 93 | kind: Role 94 | apiVersion: rbac.authorization.k8s.io/v1 95 | metadata: 96 | name: appdynamics-infraviz 97 | namespace: appdynamics 98 | rules: 99 | - apiGroups: 100 | - extensions 101 | resources: 102 | - podsecuritypolicies 103 | resourceNames: 104 | - appdynamics-infraviz 105 | verbs: 106 | - use 107 | --- 108 | apiVersion: rbac.authorization.k8s.io/v1 109 | kind: RoleBinding 110 | metadata: 111 | name: appdynamics-infraviz 112 | namespace: appdynamics 113 | roleRef: 114 | apiGroup: rbac.authorization.k8s.io 115 | kind: Role 116 | name: appdynamics-infraviz 117 | subjects: 118 | - kind: ServiceAccount 119 | name: appdynamics-infraviz 120 | namespace: appdynamics 121 | --- -------------------------------------------------------------------------------- /appd-machine-agent-analytics/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | $MACHINE_AGENT_HOME/updateAnalyticsAgent.sh $MACHINE_AGENT_HOME 3 | 4 | MA_PROPERTIES=${APPDYNAMICS_MA_PROPERTIES} 5 | MA_PROPERTIES+=" -Dappdynamics.controller.hostName=${APPDYNAMICS_CONTROLLER_HOST_NAME}" 6 | MA_PROPERTIES+=" -Dappdynamics.controller.port=${APPDYNAMICS_CONTROLLER_PORT}" 7 | MA_PROPERTIES+=" -Dappdynamics.agent.accountName=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" 8 | MA_PROPERTIES+=" -Dappdynamics.agent.accountAccessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" 9 | MA_PROPERTIES+=" -Dappdynamics.controller.ssl.enabled=${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" 10 | MA_PROPERTIES+=" -Dappdynamics.sim.enabled=${APPDYNAMICS_SIM_ENABLED} -Dappdynamics.docker.enabled=${APPDYNAMICS_DOCKER_ENABLED}" 11 | 12 | 13 | MA_PROPERTIES+=" -Dappdynamics.docker.container.containerIdAsHostId.enabled=${APPDYNAMICS_AGENT_ENABLE_CONTAINERIDASHOSTID}" 14 | 15 | if [ "x${APPDYNAMICS_MACHINE_HIERARCHY_PATH}" != "x" ]; then 16 | MA_PROPERTIES+=" -Dappdynamics.machine.agent.hierarchyPath=SVM-${APPDYNAMICS_MACHINE_HIERARCHY_PATH}" 17 | fi 18 | 19 | if [ "x${APPDYNAMICS_AGENT_UNIQUE_HOST_ID}" != "x" ]; then 20 | MA_PROPERTIES+=" -Dappdynamics.agent.uniqueHostId=${APPDYNAMICS_AGENT_UNIQUE_HOST_ID}" 21 | fi 22 | 23 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 24 | MA_PROPERTIES+=" -Dappdynamics.http.proxyHost=${APPDYNAMICS_AGENT_PROXY_HOST}" 25 | fi 26 | 27 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 28 | MA_PROPERTIES+=" -Dappdynamics.http.proxyPort=${APPDYNAMICS_AGENT_PROXY_PORT}" 29 | fi 30 | 31 | if [ "x${APPDYNAMICS_AGENT_PROXY_USER}" != "x" ]; then 32 | MA_PROPERTIES+=" -Dappdynamics.http.proxyUser=${APPDYNAMICS_AGENT_PROXY_USER}" 33 | fi 34 | 35 | if [ "x${APPDYNAMICS_AGENT_PROXY_PASS}" != "x" ]; then 36 | MA_PROPERTIES+=" -Dappdynamics.http.proxyPasswordFile=${APPDYNAMICS_AGENT_PROXY_PASS}" 37 | fi 38 | 39 | 40 | 41 | if [ "x${APPDYNAMICS_AGENT_METRIC_LIMIT}" != "x" ]; then 42 | MA_PROPERTIES+=" -Dappdynamics.agent.maxMetrics=${APPDYNAMICS_AGENT_METRIC_LIMIT}" 43 | fi 44 | 45 | # Start Machine Agent 46 | java ${MA_PROPERTIES} -jar ${MACHINE_AGENT_HOME}/machineagent.jar -------------------------------------------------------------------------------- /appd-machine-agent-analytics/updateAnalyticsAgent.sh: -------------------------------------------------------------------------------- 1 | ANALYTICS_AGENT_PROPERTIES="${1}/monitors/analytics-agent/conf/analytics-agent.properties" 2 | ANALYTICS_AGENT_CONFIG="${1}/monitors/analytics-agent/monitor.xml" 3 | 4 | replaceText () { 5 | 6 | sed -i "s|$1|$2|g" $3 7 | } 8 | 9 | if [ "${APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME}" == "x" ] || [ "${EVENT_ENDPOINT}" == "x" ]; then 10 | echo "Missing at least one of the required parameters (EVENT_ENDPOINT, APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME). The Analytics Agent will be disabled" 11 | exit 0 12 | fi 13 | 14 | sed -i 's/false/true/g' $ANALYTICS_AGENT_CONFIG 15 | 16 | PROTOCOL="http" 17 | 18 | if [ "${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" = "true" ]; then 19 | PROTOCOL="https" 20 | fi 21 | 22 | if [ "x${APPDYNAMICS_AGENT_APPLICATION_NAME}" != "x" ]; then 23 | replaceText 'ad.agent.name=analytics-agent1' "ad.agent.name=analytics-${APPDYNAMICS_AGENT_APPLICATION_NAME}" $ANALYTICS_AGENT_PROPERTIES 24 | fi 25 | 26 | 27 | replaceText 'ad.controller.url=http://localhost:8090' "ad.controller.url=$PROTOCOL://${APPDYNAMICS_CONTROLLER_HOST_NAME}:${APPDYNAMICS_CONTROLLER_PORT}" $ANALYTICS_AGENT_PROPERTIES 28 | 29 | replaceText 'http.event.endpoint=http://localhost:9080' "http.event.endpoint=${EVENT_ENDPOINT}" $ANALYTICS_AGENT_PROPERTIES 30 | 31 | replaceText 'http.event.name=customer1' "http.event.name=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 32 | 33 | replaceText 'http.event.accountName=analytics-customer1' "http.event.accountName=${APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 34 | 35 | replaceText 'http.event.accessKey=your-account-access-key' "http.event.accessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" $ANALYTICS_AGENT_PROPERTIES 36 | 37 | if [ "x${APPDYNAMICS_AGENT_PROXY_HOST}" != "x" ]; then 38 | replaceText 'http.event.proxyHost=' "http.event.proxyHost=${APPDYNAMICS_AGENT_PROXY_HOST}" $ANALYTICS_AGENT_PROPERTIES 39 | fi 40 | 41 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 42 | replaceText 'http.event.proxyPort=' "http.event.proxyPort=${APPDYNAMICS_AGENT_PROXY_PORT}" $ANALYTICS_AGENT_PROPERTIES 43 | fi 44 | 45 | if [ "x${APPDYNAMICS_AGENT_PROXY_USER}" != "x" ]; then 46 | replaceText 'http.event.proxyUsername=' "http.event.proxyUsername=${APPDYNAMICS_AGENT_PROXY_USER}" $ANALYTICS_AGENT_PROPERTIES 47 | fi 48 | 49 | if [ "x${APPDYNAMICS_AGENT_PROXY_PASS}" != "x" ]; then 50 | replaceText 'http.event.proxyPassword=' "http.event.proxyPassword=${APPDYNAMICS_AGENT_PROXY_PASS}" $ANALYTICS_AGENT_PROPERTIES 51 | fi 52 | 53 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/windows/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM mcr.microsoft.com/windows/servercore:ltsc2019 3 | SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; $verbosePreference='Continue';"] 4 | ARG APPD_AGENT_VERSION 5 | 6 | LABEL name="AppDynamics Windows Infra Viz Agent" \ 7 | vendor="AppDynamics" \ 8 | version="${APPD_AGENT_VERSION}" \ 9 | release="1" \ 10 | url="https://www.appdynamics.com" \ 11 | summary="AppDynamics monitoring solution for Kuberenetes Windows worker nodes" \ 12 | description="AppDynamics monitoring solution for Kuberenetes Windows worker nodes" 13 | 14 | ENV APPDYNAMICS_MACHINE_AGENT_HOME=c:\\appdynamics\\machineagent 15 | 16 | RUN mkdir "${env:APPDYNAMICS_MACHINE_AGENT_HOME}" 17 | 18 | COPY updateAnalyticsAgentConfig.ps1 c:/appdynamics/updateAnalyticsAgentConfig.ps1 19 | 20 | COPY start-agent.ps1 c:/appdynamics/start-agent.ps1 21 | 22 | COPY machineagent-bundle-64bit-windows-${APPD_AGENT_VERSION}*.zip c:/appdynamics 23 | 24 | RUN "ls c:\appdynamics" 25 | 26 | RUN "Expand-Archive -Path c:/appdynamics/machineagent-bundle-64bit-windows-${APPD_AGENT_VERSION}*.zip -DestinationPath ${env:APPDYNAMICS_MACHINE_AGENT_HOME}" 27 | 28 | #clean up without prompt 29 | RUN "Remove-Item -Path c:/appdynamics/machineagent-bundle-64bit-windows-${APPD_AGENT_VERSION}*.zip -Force" 30 | 31 | WORKDIR "${APPDYNAMICS_MACHINE_AGENT_HOME}" 32 | 33 | RUN "ls ${env:APPDYNAMICS_MACHINE_AGENT_HOME}" 34 | 35 | ENTRYPOINT ["powershell","c:\\appdynamics\\start-agent.ps1"] 36 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/windows/build.ps1: -------------------------------------------------------------------------------- 1 | [cmdletbinding()] 2 | Param ( 3 | [Parameter(Mandatory = $true)] 4 | [string]$agentVersion, 5 | 6 | [Parameter(Mandatory = $false)] 7 | [string]$dockerHubHandle, 8 | 9 | [Parameter(Mandatory = $false)] 10 | [string]$winTag 11 | ) 12 | 13 | if ($dockerHubHandle -eq "") { 14 | $dockerHubHandle = "appdynamics" 15 | } 16 | 17 | if ($winTag -eq "") { 18 | $winTag = "win-ltsc2019" 19 | } 20 | 21 | $IMAGE_NAME = "$dockerHubHandle/machine-agent-analytics" 22 | 23 | Write-Host "version = $agentVersion " 24 | Write-Host "dockerHubHandle = $dockerHubHandle " 25 | Write-Host "winTag = $winTag " 26 | 27 | docker build --no-cache --build-arg APPD_AGENT_VERSION=$agentVersion -t ${IMAGE_NAME}:$agentVersion-$winTag . 28 | 29 | #./build.ps1 -agentVersion 20.6.0 -dockerHubHandle iogbole 30 | 31 | #Run it like this: 32 | #docker run -d --env-file env.list ${IMAGE_NAME}:$agentVersion 33 | 34 | #docker push iogbole/machine-agent-windows-64bit:$agentVersion 35 | 36 | #exec into into it like this: 37 | #docker exec -it container_id powershell 38 | 39 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/windows/env.list: -------------------------------------------------------------------------------- 1 | APPDYNAMICS_AGENT_ACCOUNT_NAME=customer1 2 | APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME=customer1_282fa861-554e-4073-bttrrr 3 | APPDYNAMICS_CONTROLLER_HOST_NAME=customer.saas.appdynamics.com 4 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY=key 5 | APPDYNAMICS_CONTROLLER_PORT=443 6 | APPDYNAMICS_CONTROLLER_SSL_ENABLED=true 7 | EVENT_ENDPOINT=https://fra-ana-api.saas.appdynamics.com:443 8 | APPDYNAMICS_SIM_ENABLED=true 9 | APPDYNAMICS_MACHINE_HIERARCHY_PATH=AWS|PROD|EU-WEST2|WorkerNodes| #optional 10 | 11 | #APPDYNAMICS_AGENT_PROXY_HOST="" 12 | #APPDYNAMICS_AGENT_PROXY_USER="" 13 | #APPDYNAMICS_AGENT_PROXY_PORT="" 14 | #APPDYNAMICS_AGENT_PROXY_PASS="" 15 | #APPDYNAMICS_AGENT_METRIC_LIMIT="" 16 | 17 | #APPDYNAMICS_AGENT_HTTPS_PROXY_PORT="" 18 | #APPDYANMICS_AGENT_PROXY_PASSWORD_FILE="" 19 | #APPDYNAMICS_AGENT_HTTPS_PROXY_PORT="" 20 | #APPDYNAMICS_AGENT_HTTPS_PROXY_HOST 21 | #APPDYNAMICS_AGENT_UNIQUE_HOST_ID="" #defaults to containerID 22 | 23 | APPDYNAMICS_DOTNET_COMPATIBILITY_MODE=true #defaults to true 24 | APPDYNAMICS_ANALYTICS_AGENT_PORT=9090 #defaults to 9090 25 | APPDYNAMICS_ENABLE_ANALYTICS_AGENT=true #defaults to true 26 | -------------------------------------------------------------------------------- /appd-machine-agent-analytics/windows/start-agent.ps1: -------------------------------------------------------------------------------- 1 | 2 | if ([string]::IsNullOrEmpty(${env:APPDYNAMICS_MACHINE_AGENT_HOME})) { 3 | $MA_HOME = "c:\appdynamics\machineagent" 4 | }else{ 5 | $MA_HOME = "${env:APPDYNAMICS_MACHINE_AGENT_HOME}" 6 | } 7 | 8 | ${env:APPDYNAMICS_MACHINE_AGENT_HOME} 9 | $APPDYNAMICS_ENABLE_ANALYTICS_AGENT = ${env:APPDYNAMICS_ENABLE_ANALYTICS_AGENT} 10 | 11 | #handle null for analytics settings 12 | if ([string]::IsNullOrEmpty($APPDYNAMICS_ENABLE_ANALYTICS_AGENT)) { 13 | $APPDYNAMICS_ENABLE_ANALYTICS_AGENT = "false" 14 | } 15 | 16 | if (${env:APPDYNAMICS_CONTROLLER_SSL_ENABLED} -eq "true") { 17 | $APPDYNAMICS_CONTROLLER_PROTOCOL = "https" 18 | } 19 | else { 20 | $APPDYNAMICS_CONTROLLER_PROTOCOL = "http" 21 | } 22 | 23 | #Splatt the env variables 24 | $analytics_command_args = @{ 25 | APPDYNAMICS_AGENT_APPLICATION_NAME = "$env:APPDYNAMICS_AGENT_APPLICATION_NAME" 26 | APPDYNAMICS_CONTROLLER_PROTOCOL = "$APPDYNAMICS_CONTROLLER_PROTOCOL" 27 | APPDYNAMICS_CONTROLLER_HOST_NAME = "$env:APPDYNAMICS_CONTROLLER_HOST_NAME" 28 | APPDYNAMICS_CONTROLLER_PORT = "$env:APPDYNAMICS_CONTROLLER_PORT" 29 | EVENT_ENDPOINT = "$env:EVENT_ENDPOINT" 30 | APPDYNAMICS_AGENT_ACCOUNT_NAME = "$env:APPDYNAMICS_AGENT_ACCOUNT_NAME" 31 | APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME = "$env:APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME" 32 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY = "$env:APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY" 33 | APPDYNAMICS_ENABLE_ANALYTICS_AGENT = "$APPDYNAMICS_ENABLE_ANALYTICS_AGENT" 34 | APPDYNAMICS_ANALYTICS_AGENT_PORT = "$env:APPDYNAMICS_ANALYTICS_AGENT_PORT" 35 | APPDYNAMICS_AGENT_PROXY_USER = "$env:APPDYNAMICS_AGENT_PROXY_USER" 36 | APPDYNAMICS_AGENT_PROXY_PASS = "$env:APPDYNAMICS_AGENT_PROXY_PASS" 37 | APPDYNAMICS_AGENT_PROXY_HOST = "$env:APPDYNAMICS_AGENT_PROXY_HOST" 38 | APPDYNAMICS_AGENT_PROXY_PORT = "$env:APPDYNAMICS_AGENT_PROXY_PORT" 39 | MACHINE_AGENT_HOME = "$MA_HOME" 40 | } 41 | 42 | if ($APPDYNAMICS_ENABLE_ANALYTICS_AGENT -eq "true") { 43 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME}) -or ![string]::IsNullOrEmpty(${env:EVENT_ENDPOINT})) { 44 | Write-Host "All conditions to satisfy enabling analytics agent are met...." 45 | $command = "c:\appdynamics\updateAnalyticsAgentConfig.ps1" 46 | & $command @analytics_command_args 47 | 48 | } 49 | else { 50 | Write-Host "Analytics is desired to be enabled, but requires account name and api url to be set" 51 | Write-Host "APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME or EVENT_ENDPOINT is not set" 52 | } 53 | } 54 | 55 | Start-Sleep -s 2 # disk io 56 | 57 | # MA JV section begins here 58 | 59 | $MA_PROPERTIES += " -Dappdynamics.controller.hostName=${env:APPDYNAMICS_CONTROLLER_HOST_NAME}" 60 | $MA_PROPERTIES += " -Dappdynamics.controller.port=${env:APPDYNAMICS_CONTROLLER_PORT}" 61 | $MA_PROPERTIES += " -Dappdynamics.agent.accountName=${env:APPDYNAMICS_AGENT_ACCOUNT_NAME}" 62 | $MA_PROPERTIES += " -Dappdynamics.agent.accountAccessKey=${env:APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" 63 | $MA_PROPERTIES += " -Dappdynamics.controller.ssl.enabled=${env:APPDYNAMICS_CONTROLLER_SSL_ENABLED}" 64 | 65 | # SIM enabled defaults to true 66 | if ([string]::IsNullOrEmpty(${env:APPDYNAMICS_SIM_ENABLED})) { 67 | $MA_PROPERTIES += " -Dappdynamics.sim.enabled=true" 68 | } 69 | else { 70 | $MA_PROPERTIES += " -Dappdynamics.sim.enabled=${env:APPDYNAMICS_SIM_ENABLED}" 71 | } 72 | 73 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_UNIQUE_HOST_ID})) { 74 | $MA_PROPERTIES += " -Dappdynamics.agent.uniqueHostId=${env:APPDYNAMICS_AGENT_UNIQUE_HOST_ID}" 75 | } 76 | 77 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_MACHINE_HIERARCHY_PATH})) { 78 | $MA_PROPERTIES += " -Dappdynamics.machine.agent.hierarchyPath=${env:APPDYNAMICS_MACHINE_HIERARCHY_PATH}" 79 | } 80 | 81 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_DOTNET_COMPATIBILITY_MODE})) { 82 | $MA_PROPERTIES += " -Dappdynamics.machine.agent.dotnetCompatibilityMode=${env:APPDYNAMICS_DOTNET_COMPATIBILITY_MODE}" 83 | } 84 | else { 85 | # se it to true by default 86 | $MA_PROPERTIES += " -Dappdynamics.machine.agent.dotnetCompatibilityMode=true" 87 | } 88 | 89 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_PROXY_HOST})) { 90 | $MA_PROPERTIES += " -Dappdynamics.http.proxyHost=${env:APPDYNAMICS_AGENT_PROXY_HOST}" 91 | } 92 | 93 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_HTTPS_PROXY_HOST})) { 94 | $MA_PROPERTIES += " -Dappdynamics.https.proxyHost=${env:APPDYNAMICS_AGENT_HTTPS_PROXY_HOST}" 95 | } 96 | 97 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_PROXY_PORT})) { 98 | $MA_PROPERTIES += " -Dappdynamics.http.proxyPort=${env:APPDYNAMICS_AGENT_PROXY_PORT}" 99 | } 100 | 101 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_HTTPS_PROXY_PORT})) { 102 | $MA_PROPERTIES += " -Dappdynamics.https.proxyPort=${env:APPDYNAMICS_AGENT_HTTPS_PROXY_PORT}" 103 | } 104 | 105 | if (![string]::IsNullOrEmpty(${env:APPDYNAMICS_AGENT_PROXY_USER})) { 106 | $MA_PROPERTIES += " -Dappdynamics.http.proxyUser=${env:APPDYNAMICS_AGENT_PROXY_USER}" 107 | } 108 | 109 | if (![string]::IsNullOrEmpty(${env:APPDYANMICS_AGENT_PROXY_PASSWORD_FILE})) { 110 | $MA_PROPERTIES += " -Dappdynamics.http.proxyPasswordFile=${env:APPDYANMICS_AGENT_PROXY_PASSWORD_FILE}" 111 | } 112 | 113 | if (![string]::IsNullOrEmpty(${env:APPDYANMICS_METRICS_MAX_LIMIT})) { 114 | $MA_PROPERTIES += " -Dappdynamics.agent.maxMetrics=${env:APPDYANMICS_METRICS_MAX_LIMIT}" 115 | } 116 | 117 | Write-Host $MA_PROPERTIES 118 | 119 | # Start Machine Agent 120 | Start-Process $MA_HOME/jre/bin/java -ArgumentList "$MA_PROPERTIES -jar $MA_HOME/machineagent.jar" 121 | 122 | # this let you do 'k logs' 123 | Start-Sleep -s 60 124 | Get-Content -Path "$MA_HOME/logs/machine-agent.log" -Tail 10 -Wait -------------------------------------------------------------------------------- /appd-machine-agent-analytics/windows/updateAnalyticsAgentConfig.ps1: -------------------------------------------------------------------------------- 1 | [CmdletBinding()] 2 | param( 3 | 4 | [Parameter(Mandatory = $false)] 5 | [string]$APPDYNAMICS_AGENT_APPLICATION_NAME, 6 | 7 | [Parameter(Mandatory = $false)] 8 | [ValidateSet("true", "false")] 9 | [string]$APPDYNAMICS_ENABLE_ANALYTICS_AGENT, 10 | 11 | [Parameter(Mandatory = $false)] 12 | [string]$APPDYNAMICS_ANALYTICS_AGENT_PORT, 13 | 14 | [Parameter(Mandatory)] 15 | [ValidateNotNullOrEmpty()] 16 | [string]$APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY, 17 | 18 | [Parameter(Mandatory)] 19 | [ValidateNotNullOrEmpty()] 20 | [string]$MACHINE_AGENT_HOME, 21 | 22 | [Parameter(Mandatory)] 23 | [ValidateNotNullOrEmpty()] 24 | [string]$APPDYNAMICS_CONTROLLER_PROTOCOL, 25 | 26 | [Parameter(Mandatory)] 27 | [ValidateNotNullOrEmpty()] 28 | [string]$APPDYNAMICS_CONTROLLER_HOST_NAME, 29 | 30 | [Parameter(Mandatory)] 31 | [ValidateNotNullOrEmpty()] 32 | [string]$APPDYNAMICS_CONTROLLER_PORT, 33 | 34 | [Parameter(Mandatory)] 35 | [ValidateNotNullOrEmpty()] 36 | [string]$EVENT_ENDPOINT, 37 | 38 | [Parameter(Mandatory)] 39 | [ValidateNotNullOrEmpty()] 40 | [string]$APPDYNAMICS_AGENT_ACCOUNT_NAME, 41 | 42 | [Parameter(Mandatory)] 43 | [ValidateNotNullOrEmpty()] 44 | [string]$APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME, 45 | 46 | [Parameter(Mandatory = $false)] 47 | [string]$APPDYNAMICS_AGENT_PROXY_HOST, 48 | 49 | [Parameter(Mandatory = $false)] 50 | [string]$APPDYNAMICS_AGENT_PROXY_PORT, 51 | 52 | [Parameter(Mandatory = $false)] 53 | [string]$APPDYNAMICS_AGENT_PROXY_USER, 54 | 55 | [Parameter(Mandatory = $false)] 56 | [string]$APPDYNAMICS_AGENT_PROXY_PASS 57 | ) 58 | 59 | if ((![string]::IsNullOrEmpty($APPDYNAMICS_ENABLE_ANALYTICS_AGENT)) -and $APPDYNAMICS_ENABLE_ANALYTICS_AGENT -eq "false") { 60 | $APPDYNAMICS_ENABLE_ANALYTICS_AGENT = "false" 61 | } 62 | else { 63 | # Enable analytics by default if the customer doesn't explicitly set it to false 64 | $APPDYNAMICS_ENABLE_ANALYTICS_AGENT = "true" 65 | } 66 | 67 | $enable_analytics_regex = "(?:tru|fals)e.*>$" 68 | $enable_analytics = "$APPDYNAMICS_ENABLE_ANALYTICS_AGENT" 69 | $monitorXML = "$MACHINE_AGENT_HOME\monitors\analytics-agent\monitor.xml" 70 | 71 | (Get-Content $monitorXML) | ForEach-Object { $_ -replace "$enable_analytics_regex" , "$enable_analytics" } | Set-Content $monitorXML 72 | 73 | $SOURCE_FILE = "$MACHINE_AGENT_HOME\monitors\analytics-agent\conf\analytics-agent.properties" 74 | 75 | $destinationFile = $SOURCE_FILE 76 | 77 | Copy-Item $SOURCE_FILE $SOURCE_FILE'.backup' 78 | 79 | $controller_url = -join ($APPDYNAMICS_CONTROLLER_PROTOCOL, "://", $APPDYNAMICS_CONTROLLER_HOST_NAME, ":", $APPDYNAMICS_CONTROLLER_PORT).Replace(' ', '') 80 | 81 | if ([string]::IsNullOrEmpty($APPDYNAMICS_AGENT_APPLICATION_NAME)) { 82 | $APPDYNAMICS_AGENT_APPLICATION_NAME = "analytics-agent" 83 | } 84 | $agent_name_new = -join ($APPDYNAMICS_AGENT_APPLICATION_NAME, "_", $env:computername).Replace(' ', '') 85 | 86 | (Get-Content $SOURCE_FILE) | ForEach-Object { 87 | $_ -replace "ad.agent.name=analytics-agent1", "ad.agent.name=$agent_name_new" ` 88 | -replace "http.event.accessKey=your-account-access-key", "http.event.accessKey=$APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY" ` 89 | -replace "ad.controller.url=http://localhost:8090", "ad.controller.url=$controller_url" ` 90 | -replace "http.event.endpoint=http://localhost:9080", "http.event.endpoint=$EVENT_ENDPOINT" ` 91 | -replace "http.event.name=customer1", "http.event.name=$APPDYNAMICS_AGENT_ACCOUNT_NAME" ` 92 | -replace "http.event.accountName=analytics-customer1", "http.event.accountName=$APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME" 93 | } | Set-Content $destinationFile 94 | 95 | if ((![string]::IsNullOrEmpty($APPDYNAMICS_AGENT_PROXY_HOST)) -and (![string]::IsNullOrEmpty($APPDYNAMICS_AGENT_PROXY_PORT))) { 96 | (Get-Content $SOURCE_FILE) | ForEach-Object { 97 | $_ -replace "http.event.proxyHost=", "http.event.proxyHost=$APPDYNAMICS_AGENT_PROXY_HOST" 98 | -replace "http.event.proxyPort=", "http.event.proxyPort=$APPDYNAMICS_AGENT_PROXY_PORT" 99 | } | Set-Content $destinationFile 100 | } 101 | 102 | if (![string]::IsNullOrEmpty($APPDYNAMICS_ANALYTICS_AGENT_PORT)) { 103 | (Get-Content $SOURCE_FILE) | ForEach-Object { 104 | $_ -replace "ad.dw.http.port=9090", "ad.dw.http.port=$APPDYNAMICS_ANALYTICS_AGENT_PORT" 105 | } | Set-Content $destinationFile 106 | } 107 | 108 | if (![string]::IsNullOrEmpty($APPDYNAMICS_AGENT_PROXY_USER)) { 109 | (Get-Content $SOURCE_FILE) | ForEach-Object { 110 | $_ -replace "http.event.proxyUsername=", "http.event.proxyUsername==$APPDYNAMICS_AGENT_PROXY_USER" 111 | } | Set-Content $destinationFile 112 | } 113 | 114 | if (![string]::IsNullOrEmpty($APPDYNAMICS_AGENT_PROXY_PASS)) { 115 | (Get-Content $SOURCE_FILE) | ForEach-Object { 116 | $_ -replace "http.event.proxyPassword=", "http.event.proxyPassword=$APPDYNAMICS_AGENT_PROXY_PASS" 117 | } | Set-Content $destinationFile 118 | } -------------------------------------------------------------------------------- /appd-machine-agent-netviz/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM openjdk:8-jre-slim AS builder 3 | 4 | ARG APPD_AGENT_VERSION 5 | ARG APPD_AGENT_SHA256 6 | 7 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 8 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 9 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 10 | && sha256sum -c appd_checksum \ 11 | && rm appd_checksum \ 12 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 13 | else \ 14 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 15 | fi 16 | 17 | 18 | FROM openjdk:8-jre-slim 19 | 20 | RUN apt-get update && apt-get -y upgrade && \ 21 | apt-get install -y unzip bash gawk sed grep bc coreutils && \ 22 | apt-get install -y apt-utils iproute2 && \ 23 | apt-get install -y procps sysstat dnsutils && \ 24 | apt-get install -y net-tools tcpdump curl sysvinit-utils openssh-client && \ 25 | rm -rf /var/lib/apt/lists/* 26 | 27 | RUN apt-get clean autoclean 28 | RUN apt-get autoremove --yes 29 | RUN rm -rf /var/lib/{apt,dpkg,cache,log}/ 30 | 31 | COPY --from=builder /tmp /opt/appdynamics 32 | 33 | ENV MACHINE_AGENT_HOME /opt/appdynamics 34 | 35 | ENV NETVIZ_AGENT_HOME ${MACHINE_AGENT_HOME}/extensions/NetVizExtension 36 | 37 | RUN ${NETVIZ_AGENT_HOME}/agent/install.sh 38 | 39 | WORKDIR ${MACHINE_AGENT_HOME} 40 | 41 | COPY updateNetViz.sh ./updateNetViz.sh 42 | RUN chmod +x ./updateNetViz.sh 43 | 44 | COPY updateAnalyticsAgent.sh ./updateAnalyticsAgent.sh 45 | RUN chmod +x ./updateAnalyticsAgent.sh 46 | 47 | COPY startup.sh ./startup.sh 48 | RUN chmod +x ./startup.sh 49 | 50 | 51 | RUN chgrp -R 0 /opt && \ 52 | chmod -R g=u /opt 53 | 54 | EXPOSE 9090 55 | EXPOSE 3892 56 | 57 | 58 | CMD "./startup.sh" -------------------------------------------------------------------------------- /appd-machine-agent-netviz/README.md: -------------------------------------------------------------------------------- 1 | ### Machine Agent Deployment with Netviz 2 | 3 | * Download the latest agent bundle from https://download.appdynamics.com/download/ 4 | * Make a note of sha256 checksum value and the full version of the agent (e.g. 4.5.9.2096) 5 | * Run ./build.sh passing the version and the checksum. The checksum can be left blank to avoid validation. 6 | It is a best practice to validate the package integrity. 7 | 8 | 9 | * Create a secret to hold appdynamics controller access key 10 | ``` 11 | kubectl create secret generic appd-secret --from-literal=appd-key= 12 | ``` 13 | 14 | * Populate the configMap in ma-config.yaml with values specific to your environment. Make sure you provide all the required values. 15 | 16 | * Create the configMap 17 | ``` 18 | kubectl create -f deploy/ma-config.yaml 19 | ``` 20 | 21 | Deploy the configMap with logging settings 22 | ``` 23 | kubectl create -f deploy/ma-log-config.yaml 24 | ``` 25 | 26 | 27 | * Update the spec machine-agent.yaml with the reference to the newly built image. By default the image name is 28 | appdynamics/machine-agent-analytics 29 | 30 | * Create a service account for deployment. By default it is `appd-infra-sa`. 31 | The account needs to be privileged and have a read-only access to cluster entities 32 | 33 | * deploy the daemon set 34 | ``` 35 | kubectl create -f deploy/machine-agent.yaml 36 | ``` 37 | 38 | 39 | ## Service account in OpenShift 40 | 41 | * create a new project or use an existing one 42 | ``` 43 | oc new-project appdynamics 44 | ``` 45 | 46 | * create a service account for the daemon set deployment 47 | ``` 48 | oc create sa appd-infra-sa 49 | ``` 50 | 51 | * make the account privileged, which is necessary for accessing docker api and host root 52 | oc adm policy add-scc-to-user privileged -z appd-infra-sa 53 | 54 | * assign account to the cluster-reader role to be able to read pod metadata 55 | ``` 56 | oc adm policy add-cluster-role-to-user cluster-reader -z appd-infra-sa 57 | ``` 58 | 59 | 60 | 61 | 62 | Download the latest agent bundle from https://download.appdynamics.com/download/ 63 | Make a note of sha256 checksum value and the full version of the agent (e.g. 4.5.9.2096) 64 | Run ./build.sh passing the version and the checksum. The checksum can be left blank to avoid validation. It is a best practice to validate the package integrity. 65 | 66 | Create a secret to hold appdynamics controller access key 67 | kubectl create secret generic appd-secret --from-literal=appd-key= 68 | 69 | Populate the configMap ma-config.yaml with values specific to your environment. Make sure you provide all the required values. 70 | Update the spec machine-agent.yaml with the reference to the newly built image 71 | 72 | Create a service account for deployment. In the attached spec of the machine agent with netviz, it is appd-infra-sa. 73 | The account needs to be privileged and have read-only access to cluster entities 74 | 75 | #deploy daemon set 76 | kubectl create -f machine-agent.yaml 77 | 78 | 79 | Example account creation in OpenShift 80 | 81 | #create a new project or use an existing one 82 | oc new-project ma 83 | 84 | #create a service account for the daemon set deployment 85 | oc create sa ma 86 | 87 | #make the account privileged, which is necessary for accessing docker api and host root 88 | oc adm policy add-scc-to-user privileged -z ma 89 | 90 | #assign account to the cluster-reader role to be able to read pod metadata 91 | oc adm policy add-cluster-role-to-user cluster-reader -z ma 92 | 93 | 94 | -------------------------------------------------------------------------------- /appd-machine-agent-netviz/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/machine-agent-netviz 4 | if [ "x$3" != "x" ]; then 5 | IMAGE_NAME=$3 6 | fi 7 | docker build --build-arg APPD_AGENT_VERSION=$1 --build-arg APPD_AGENT_SHA256=$2 -t ${IMAGE_NAME}:$1 --no-cache . 8 | -------------------------------------------------------------------------------- /appd-machine-agent-netviz/deploy/ma-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | APPDYNAMICS_AGENT_ACCOUNT_NAME: 4 | APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME: 5 | APPDYNAMICS_CONTROLLER_HOST_NAME: 6 | APPDYNAMICS_CONTROLLER_PORT: "8090" 7 | APPDYNAMICS_CONTROLLER_SSL_ENABLED: "true" 8 | EVENT_ENDPOINT: (http://dns:9080) 9 | APPDYNAMICS_SIM_ENABLED: "true" 10 | APPDYNAMICS_DOCKER_ENABLED: "true" 11 | ENABLE_CONTAINERIDASHOSTID: "false" #optional 12 | APPDYNAMICS_MACHINE_HIERARCHY_PATH: "" #optional 13 | APPDYNAMICS_AGENT_UNIQUE_HOST_ID: "" #optional 14 | APPDYNAMICS_AGENT_PROXY_HOST: "" #optional 15 | APPDYNAMICS_AGENT_PROXY_PORT: "" #optional 16 | APPDYNAMICS_AGENT_PROXY_USER: "" #optional 17 | APPDYNAMICS_AGENT_PROXY_PASS: "" #optional 18 | APPDYNAMICS_AGENT_METRIC_LIMIT: "" #optional 19 | kind: ConfigMap 20 | metadata: 21 | name: ma-config -------------------------------------------------------------------------------- /appd-machine-agent-netviz/deploy/ma-log-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | log4j.xml: | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | kind: ConfigMap 45 | metadata: 46 | name: ma-log-config -------------------------------------------------------------------------------- /appd-machine-agent-netviz/deploy/machine-agent.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: appd-infra-agent 10 | spec: 11 | serviceAccountName: appdynamics-infraviz 12 | hostIPC: true 13 | hostNetwork: true 14 | containers: 15 | - name: appd-infra-agent 16 | image: appdynamics/machine-agent-netviz:4.5.9.2 17 | imagePullPolicy: IfNotPresent 18 | env: 19 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 20 | valueFrom: 21 | secretKeyRef: 22 | key: appd-key 23 | name: appd-secret 24 | envFrom: 25 | - configMapRef: 26 | name: ma-config 27 | securityContext: 28 | privileged: true 29 | capabilities: 30 | add: ["NET_ADMIN", "NET_RAW"] 31 | resources: 32 | limits: 33 | cpu: "0.6" 34 | memory: "2Gi" 35 | requests: 36 | cpu: "0.3" 37 | memory: "1G" 38 | ports: 39 | - containerPort: 9090 40 | - containerPort: 3892 41 | hostPort: 3892 42 | volumeMounts: 43 | - name: ma-log-volume 44 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 45 | subPath: log4j.xml 46 | - mountPath: /hostroot 47 | name: hostroot 48 | readOnly: true 49 | - mountPath: /var/run/docker.sock 50 | name: docker-sock 51 | restartPolicy: Always 52 | volumes: 53 | - name: ma-log-volume 54 | configMap: 55 | name: ma-log-config 56 | - name: hostroot 57 | hostPath: 58 | path: / 59 | type: Directory 60 | - name: docker-sock 61 | hostPath: 62 | path: /var/run/docker.sock 63 | type: Socket 64 | 65 | --- 66 | apiVersion: v1 67 | kind: Service 68 | metadata: 69 | name: appd-infra-agent-service 70 | spec: 71 | selector: 72 | name: appd-infra-agent 73 | ports: 74 | - name: "9090" 75 | port: 9090 76 | targetPort: 9090 77 | - name: "3892" 78 | port: 3892 79 | targetPort: 3892 80 | status: 81 | loadBalancer: {} 82 | -------------------------------------------------------------------------------- /appd-machine-agent-netviz/startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | $MACHINE_AGENT_HOME/updateAnalyticsAgent.sh $MACHINE_AGENT_HOME 3 | $MACHINE_AGENT_HOME/updateNetViz.sh $MACHINE_AGENT_HOME 4 | 5 | MA_PROPERTIES=${APPDYNAMICS_MA_PROPERTIES} 6 | MA_PROPERTIES+=" -Dappdynamics.controller.hostName=${APPDYNAMICS_CONTROLLER_HOST_NAME}" 7 | MA_PROPERTIES+=" -Dappdynamics.controller.port=${APPDYNAMICS_CONTROLLER_PORT}" 8 | MA_PROPERTIES+=" -Dappdynamics.agent.accountName=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" 9 | MA_PROPERTIES+=" -Dappdynamics.agent.accountAccessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" 10 | MA_PROPERTIES+=" -Dappdynamics.controller.ssl.enabled=${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" 11 | MA_PROPERTIES+=" -Dappdynamics.sim.enabled=${APPDYNAMICS_SIM_ENABLED} -Dappdynamics.docker.enabled=${APPDYNAMICS_DOCKER_ENABLED}" 12 | 13 | 14 | MA_PROPERTIES+=" -Dappdynamics.docker.container.containerIdAsHostId.enabled=${APPDYNAMICS_AGENT_ENABLE_CONTAINERIDASHOSTID}" 15 | 16 | if [ "x${APPDYNAMICS_MACHINE_HIERARCHY_PATH}" != "x" ]; then 17 | MA_PROPERTIES+=" -Dappdynamics.machine.agent.hierarchyPath=SVM-${APPDYNAMICS_MACHINE_HIERARCHY_PATH}" 18 | fi 19 | 20 | if [ "x${APPDYNAMICS_AGENT_UNIQUE_HOST_ID}" != "x" ]; then 21 | MA_PROPERTIES+=" -Dappdynamics.agent.uniqueHostId=${APPDYNAMICS_AGENT_UNIQUE_HOST_ID}" 22 | fi 23 | 24 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 25 | MA_PROPERTIES+=" -Dappdynamics.http.proxyHost=${APPDYNAMICS_AGENT_PROXY_HOST}" 26 | fi 27 | 28 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 29 | MA_PROPERTIES+=" -Dappdynamics.http.proxyPort=${APPDYNAMICS_AGENT_PROXY_PORT}" 30 | fi 31 | 32 | if [ "x${APPDYNAMICS_AGENT_PROXY_USER}" != "x" ]; then 33 | MA_PROPERTIES+=" -Dappdynamics.http.proxyUser=${APPDYNAMICS_AGENT_PROXY_USER}" 34 | fi 35 | 36 | if [ "x${APPDYNAMICS_AGENT_PROXY_PASS}" != "x" ]; then 37 | MA_PROPERTIES+=" -Dappdynamics.http.proxyPasswordFile=${APPDYNAMICS_AGENT_PROXY_PASS}" 38 | fi 39 | 40 | 41 | 42 | if [ "x${APPDYNAMICS_AGENT_METRIC_LIMIT}" != "x" ]; then 43 | MA_PROPERTIES+=" -Dappdynamics.agent.maxMetrics=${APPDYNAMICS_AGENT_METRIC_LIMIT}" 44 | fi 45 | 46 | JAVA_OPTS=${MA_PROPERTIES} 47 | 48 | # Start Machine Agent 49 | ${MACHINE_AGENT_HOME}/bin/machine-agent -d -p ${MACHINE_AGENT_HOME}/pidfile 50 | 51 | cd ${MACHINE_AGENT_HOME}/extensions/NetVizExtension/agent 52 | 53 | #start NetViz 54 | ./bin/appd-netagent -c ./conf -l ./logs -r ./run -------------------------------------------------------------------------------- /appd-machine-agent-netviz/updateAnalyticsAgent.sh: -------------------------------------------------------------------------------- 1 | ANALYTICS_AGENT_PROPERTIES="${1}/monitors/analytics-agent/conf/analytics-agent.properties" 2 | ANALYTICS_AGENT_CONFIG="${1}/monitors/analytics-agent/monitor.xml" 3 | 4 | replaceText () { 5 | 6 | sed -i "s|$1|$2|g" $3 7 | } 8 | 9 | sed -i 's/false/true/g' $ANALYTICS_AGENT_CONFIG 10 | 11 | PROTOCOL="http" 12 | 13 | if [ "${APPDYNAMICS_CONTROLLER_SSL_ENABLED}" = "true" ]; then 14 | PROTOCOL="https" 15 | fi 16 | 17 | if [ "x${APPDYNAMICS_AGENT_APPLICATION_NAME}" != "x" ]; then 18 | replaceText 'ad.agent.name=analytics-agent1' "ad.agent.name=analytics-${APPDYNAMICS_AGENT_APPLICATION_NAME}" $ANALYTICS_AGENT_PROPERTIES 19 | fi 20 | 21 | 22 | replaceText 'ad.controller.url=http://localhost:8090' "ad.controller.url=$PROTOCOL://${APPDYNAMICS_CONTROLLER_HOST_NAME}:${APPDYNAMICS_CONTROLLER_PORT}" $ANALYTICS_AGENT_PROPERTIES 23 | 24 | replaceText 'http.event.endpoint=http://localhost:9080' "http.event.endpoint=${EVENT_ENDPOINT}" $ANALYTICS_AGENT_PROPERTIES 25 | 26 | replaceText 'http.event.name=customer1' "http.event.name=${APPDYNAMICS_AGENT_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 27 | 28 | replaceText 'http.event.accountName=analytics-customer1' "http.event.accountName=${APPDYNAMICS_AGENT_GLOBAL_ACCOUNT_NAME}" $ANALYTICS_AGENT_PROPERTIES 29 | 30 | replaceText 'http.event.accessKey=your-account-access-key' "http.event.accessKey=${APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY}" $ANALYTICS_AGENT_PROPERTIES 31 | 32 | if [ "x${APPDYNAMICS_AGENT_PROXY_HOST}" != "x" ]; then 33 | replaceText 'http.event.proxyHost=' "http.event.proxyHost=${APPDYNAMICS_AGENT_PROXY_HOST}" $ANALYTICS_AGENT_PROPERTIES 34 | fi 35 | 36 | if [ "x${APPDYNAMICS_AGENT_PROXY_PORT}" != "x" ]; then 37 | replaceText 'http.event.proxyPort=' "http.event.proxyPort=${APPDYNAMICS_AGENT_PROXY_PORT}" $ANALYTICS_AGENT_PROPERTIES 38 | fi 39 | 40 | if [ "x${APPDYNAMICS_AGENT_PROXY_USER}" != "x" ]; then 41 | replaceText 'http.event.proxyUsername=' "http.event.proxyUsername=${APPDYNAMICS_AGENT_PROXY_USER}" $ANALYTICS_AGENT_PROPERTIES 42 | fi 43 | 44 | if [ "x${APPDYNAMICS_AGENT_PROXY_PASS}" != "x" ]; then 45 | replaceText 'http.event.proxyPassword=' "http.event.proxyPassword=${APPDYNAMICS_AGENT_PROXY_PASS}" $ANALYTICS_AGENT_PROPERTIES 46 | fi 47 | 48 | -------------------------------------------------------------------------------- /appd-machine-agent-netviz/updateNetViz.sh: -------------------------------------------------------------------------------- 1 | NETVIZ_AGENT_PROPERTIES="${1}/extensions/NetVizExtension/conf/netVizExtensionConf.yml" 2 | 3 | replaceText () { 4 | 5 | sed -i "s|$1|$2|g" $3 6 | } 7 | 8 | 9 | 10 | 11 | replaceText 'start: false' "start: true" $NETVIZ_AGENT_PROPERTIES 12 | 13 | 14 | -------------------------------------------------------------------------------- /appd-machine/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore Agent installers 2 | *.zip 3 | -------------------------------------------------------------------------------- /appd-machine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM openjdk:11-jre-slim AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apt-get update -y; \ 7 | apt-get install -y unzip 8 | 9 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 10 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 11 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 15 | else \ 16 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 17 | fi 18 | 19 | FROM openjdk:11-jre-slim 20 | 21 | ARG APPD_AGENT_VERSION 22 | 23 | LABEL name="AppDynamics MachineAgent" \ 24 | vendor="AppDynamics" \ 25 | version="${APPD_AGENT_VERSION}" \ 26 | release="1" \ 27 | url="https://www.appdynamics.com" \ 28 | summary="AppDynamics solution for monitoring infrastructure" \ 29 | description="The MachineAgent monitors resource utilization, server load and processes on the host." 30 | 31 | FROM openjdk:11-jre-slim 32 | 33 | RUN groupadd -g 1001 appdynamics && \ 34 | useradd appdynamics -g appdynamics -u 1001 && \ 35 | apt-get update && apt-get -y upgrade && \ 36 | apt-get install -y \ 37 | apt-utils \ 38 | bash \ 39 | bc \ 40 | coreutils \ 41 | dnsutils \ 42 | dumb-init \ 43 | gawk \ 44 | grep \ 45 | iproute2 \ 46 | procps \ 47 | sed \ 48 | sysstat \ 49 | unzip \ 50 | && rm -rf /var/lib/{apt,dpkg,cache,log}/ 51 | 52 | COPY --from=builder /tmp /opt/appdynamics 53 | RUN chown -R appdynamics:0 /opt/appdynamics && \ 54 | chmod -R 774 /opt/appdynamics 55 | 56 | USER 1001 57 | 58 | ENTRYPOINT ["/usr/bin/dumb-init"] 59 | CMD ["sh", "-c", "java ${MACHINE_AGENT_PROPERTIES} -jar /opt/appdynamics/machineagent.jar"] 60 | -------------------------------------------------------------------------------- /appd-machine/Dockerfile-alpine: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apk update \ 7 | && apk upgrade \ 8 | && apk add unzip 9 | 10 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 12 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 16 | else \ 17 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 18 | fi 19 | 20 | FROM alpine 21 | 22 | RUN addgroup -g 1001 appdynamics && \ 23 | adduser appdynamics --ingroup appdynamics --uid 1001 --disabled-password && \ 24 | apk update \ 25 | && apk upgrade \ 26 | && apk add bash \ 27 | bc \ 28 | coreutils \ 29 | bind-tools \ 30 | dumb-init \ 31 | gawk \ 32 | grep \ 33 | iproute2 \ 34 | procps \ 35 | sed \ 36 | sysstat \ 37 | unzip \ 38 | eudev \ 39 | openjdk11-jre \ 40 | && rm -rf /var/cache/apk/* 41 | 42 | ARG APPD_AGENT_VERSION 43 | 44 | LABEL name="AppDynamics MachineAgent" \ 45 | vendor="AppDynamics" \ 46 | version="${APPD_AGENT_VERSION}" \ 47 | release="1" \ 48 | url="https://www.appdynamics.com" \ 49 | summary="AppDynamics solution for monitoring infrastructure" \ 50 | description="The MachineAgent monitors resource utilization, server load and processes on the host." 51 | 52 | COPY --from=builder /tmp /opt/appdynamics 53 | RUN chown -R appdynamics:0 /opt/appdynamics && \ 54 | chmod -R 774 /opt/appdynamics 55 | 56 | USER 1001 57 | 58 | ENTRYPOINT ["/usr/bin/dumb-init"] 59 | CMD ["sh", "-c", "java ${MACHINE_AGENT_PROPERTIES} -jar /opt/appdynamics/machineagent.jar"] 60 | -------------------------------------------------------------------------------- /appd-machine/Dockerfile-alpine-root: -------------------------------------------------------------------------------- 1 | FROM alpine AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apk update \ 7 | && apk upgrade \ 8 | && apk add unzip 9 | 10 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 11 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 12 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 13 | && sha256sum -c appd_checksum \ 14 | && rm appd_checksum \ 15 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 16 | else \ 17 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 18 | fi 19 | 20 | FROM alpine 21 | 22 | RUN apk update \ 23 | && apk upgrade \ 24 | && apk add bash \ 25 | bc \ 26 | coreutils \ 27 | bind-tools \ 28 | dumb-init \ 29 | gawk \ 30 | grep \ 31 | iproute2 \ 32 | procps \ 33 | sed \ 34 | sysstat \ 35 | unzip \ 36 | eudev \ 37 | openjdk11-jre \ 38 | && rm -rf /var/cache/apk/* 39 | 40 | ARG APPD_AGENT_VERSION 41 | 42 | LABEL name="AppDynamics MachineAgent" \ 43 | vendor="AppDynamics" \ 44 | version="${APPD_AGENT_VERSION}" \ 45 | release="1" \ 46 | url="https://www.appdynamics.com" \ 47 | summary="AppDynamics solution for monitoring infrastructure" \ 48 | description="The MachineAgent monitors resource utilization, server load and processes on the host." 49 | 50 | COPY --from=builder /tmp /opt/appdynamics 51 | 52 | ENTRYPOINT ["/usr/bin/dumb-init"] 53 | CMD ["sh", "-c", "java ${MACHINE_AGENT_PROPERTIES} -jar /opt/appdynamics/machineagent.jar"] -------------------------------------------------------------------------------- /appd-machine/Dockerfile-root: -------------------------------------------------------------------------------- 1 | FROM openjdk:11-jre-slim AS builder 2 | 3 | ARG APPD_AGENT_VERSION 4 | ARG APPD_AGENT_SHA256 5 | 6 | RUN apt-get update -y; \ 7 | apt-get install -y unzip 8 | 9 | COPY MachineAgent-${APPD_AGENT_VERSION}.zip / 10 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 11 | echo "${APPD_AGENT_SHA256} *MachineAgent-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 12 | && sha256sum -c appd_checksum \ 13 | && rm appd_checksum \ 14 | && unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 15 | else \ 16 | unzip -oq MachineAgent-${APPD_AGENT_VERSION}.zip -d /tmp; \ 17 | fi 18 | 19 | FROM openjdk:11-jre-slim 20 | 21 | ARG APPD_AGENT_VERSION 22 | 23 | LABEL name="AppDynamics MachineAgent" \ 24 | vendor="AppDynamics" \ 25 | version="${APPD_AGENT_VERSION}" \ 26 | release="1" \ 27 | url="https://www.appdynamics.com" \ 28 | summary="AppDynamics solution for monitoring infrastructure" \ 29 | description="The MachineAgent monitors resource utilization, server load and processes on the host." 30 | 31 | FROM openjdk:11-jre-slim 32 | 33 | RUN apt-get update && apt-get -y upgrade && \ 34 | apt-get install -y \ 35 | apt-utils \ 36 | bash \ 37 | bc \ 38 | coreutils \ 39 | dnsutils \ 40 | dumb-init \ 41 | gawk \ 42 | grep \ 43 | iproute2 \ 44 | procps \ 45 | sed \ 46 | sysstat \ 47 | unzip \ 48 | && rm -rf /var/lib/{apt,dpkg,cache,log}/ 49 | 50 | COPY --from=builder /tmp /opt/appdynamics 51 | 52 | ENTRYPOINT ["/usr/bin/dumb-init"] 53 | CMD ["sh", "-c", "java ${MACHINE_AGENT_PROPERTIES} -jar /opt/appdynamics/machineagent.jar"] 54 | -------------------------------------------------------------------------------- /appd-machine/README.md: -------------------------------------------------------------------------------- 1 | # Building Docker with Machine Agent 2 | 3 | ## Pre-Requisites 4 | 5 | - Docker installed. 6 | - Download [Machine Agent](https://download.appdynamics.com/download/#version=&apm=machine&os=linux) 7 | 8 | 9 | ## Steps 10 | 11 | 12 | - Download StandAlone Machine agent from [AppDynamics Download Portal](https://download.appdynamics.com/download/#version=&apm=machine&os=linux) into the current directory. 13 | 14 | ``` 15 | (master)$ ls 16 | Dockerfile README.md docker-compose.yml 17 | MachineAgent-4.5.1.1385.zip appdynamics.env env 18 | 19 | ``` 20 | 21 | - If you have any extensions, Unzip the machine agent and copy the extension into `monitor` directory and zip it back. 22 | 23 | ``` 24 | (master)$ mkdir tmp 25 | 26 | (master)$ unzip MachineAgent-4.5.1.1385.zip -d tmp/ 27 | 28 | (master)$ unzip Downloads/PCFFirehoseMonitor-1.0.0.10.zip -d tmp/monitors/ 29 | 30 | (master)$ cd tmp 31 | 32 | (master)$ zip -r ../MachineAgent-4.5.1.1385.zip * 33 | 34 | ``` 35 | 36 | 37 | - set the environment variable 38 | - `APPD_AGENT_MAJOR_VERSION` to some string 39 | - `APPD_AGENT_VERSION` to the version of machine agent 40 | - `APPD_AGENT_SHA256` to sha256 of the newly packaged MachineAgent zip file. 41 | 42 | ``` 43 | (master)$ export APPD_AGENT_MAJOR_VERSION=local 44 | 45 | (master)$ export APPD_AGENT_VERSION=4.5.1.1385 46 | 47 | (master)$ shasum -a 256 MachineAgent-4.5.1.1385.zip 48 | 2a511b3e0051e8d4bd958e6bf053d426698393fd8df00ed867dd49c27cdcf2b3 MachineAgent-4.5.1.1385.zip 49 | 50 | (master)$ export APPD_AGENT_SHA256=2a511b3e0051e8d4bd958e6bf053d426698393fd8df00ed867dd49c27cdcf2b3 51 | 52 | ``` 53 | 54 | - Build the image by doing `docker-compose build` 55 | 56 | ``` 57 | (master)$ docker-compose build 58 | 59 | .... 60 | Removing intermediate container a3a73c8622c8 61 | ---> 30beb29611f7 62 | Successfully built 30beb29611f7 63 | Successfully tagged appdynamics/machine:local 64 | 65 | ``` 66 | 67 | 68 | ## Running the container 69 | 70 | - Fill in the [controller configuration](https://docs.appdynamics.com/display/PRO45/Standalone+Machine+Agent+Configuration+Properties) in the file `env` 71 | 72 | You may include any other AppDynamics configuration environment variables you wish to include. 73 | 74 | 75 | ``` 76 | $ vim env 77 | 78 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY=acesssKey 79 | APPDYNAMICS_AGENT_ACCOUNT_NAME=customer1 80 | APPDYNAMICS_CONTROLLER_HOST_NAME=controller.e2e.appd-test.com 81 | APPDYNAMICS_CONTROLLER_PORT=8090 82 | APPDYNAMICS_AGENT_APPLICATION_NAME=app 83 | APPDYNAMICS_AGENT_NODE_NAME=node 84 | APPDYNAMICS_AGENT_TIER_NAME=tier 85 | 86 | ``` 87 | 88 | 89 | 90 | - Just do a `docker run` 91 | 92 | ``` 93 | $ docker run --env-file env appdynamics/machine:local 94 | 95 | Using Java Version [1.8.0_181] for Agent 96 | Using Agent Version [Machine Agent v4.5.1.1385 GA Build Date 2018-07-25 17:57:44] 97 | [INFO] Agent logging directory set to: [/opt/appdynamics] 98 | 99 | ``` 100 | -------------------------------------------------------------------------------- /appd-machine/appdynamics.env: -------------------------------------------------------------------------------- 1 | APPDYNAMICS_AGENT_ACCOUNT_NAME= 2 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY= 3 | APPDYNAMICS_CONTROLLER_HOST_NAME= 4 | APPDYNAMICS_CONTROLLER_SSL_ENABLED= 5 | APPDYNAMICS_CONTROLLER_PORT= 6 | #MACHINE_AGENT_PROPERTIES=-Dappdynamics.sim.enabled=true -Dappdynamics.docker.enabled=true 7 | -------------------------------------------------------------------------------- /appd-machine/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | machine: 5 | image: appdynamics/machine:${APPD_AGENT_MAJOR_VERSION} 6 | build: 7 | context: . 8 | args: 9 | APPD_AGENT_VERSION: 10 | APPD_AGENT_SHA256: 11 | 12 | -------------------------------------------------------------------------------- /appd-machine/env: -------------------------------------------------------------------------------- 1 | APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY= 2 | APPDYNAMICS_AGENT_ACCOUNT_NAME= 3 | APPDYNAMICS_CONTROLLER_HOST_NAME= 4 | APPDYNAMICS_CONTROLLER_PORT= 5 | APPDYNAMICS_AGENT_APPLICATION_NAME= 6 | APPDYNAMICS_AGENT_NODE_NAME= 7 | APPDYNAMICS_AGENT_TIER_NAME= 8 | -------------------------------------------------------------------------------- /appd-netviz-agent/Dockerfile: -------------------------------------------------------------------------------- 1 | 2 | FROM centos:centos7 3 | 4 | ARG APPD_AGENT_VERSION 5 | 6 | LABEL name="AppDynamics Network Agent" \ 7 | vendor="AppDynamics" \ 8 | version="${APPD_AGENT_VERSION}" \ 9 | release="1" \ 10 | url="https://www.appdynamics.com" \ 11 | summary="AppDynamics solution for monitoring infrastructure" \ 12 | description="The Network Agent monitors communications between applications across multiple hosts from the network point of view." 13 | 14 | 15 | RUN yum update -y && yum install -y \ 16 | iproute \ 17 | net-tools \ 18 | tcpdump \ 19 | curl \ 20 | bind-utils \ 21 | unzip \ 22 | sysvinit-tools \ 23 | openssh-clients && rm -rf /var/cache/yum && yum clean all 24 | 25 | WORKDIR /opt/appdynamics/netviz 26 | 27 | COPY LICENSE . 28 | # copy NetViz agent contents 29 | COPY appd-netviz-${APPD_AGENT_VERSION}.zip . 30 | RUN if [ "x${APPD_AGENT_SHA256}" != "x" ]; then \ 31 | echo "${APPD_AGENT_SHA256} *appd-netviz-${APPD_AGENT_VERSION}.zip" >> appd_checksum \ 32 | && sha256sum -c appd_checksum \ 33 | && rm appd_checksum \ 34 | && unzip -oq appd-netviz-${APPD_AGENT_VERSION}.zip; \ 35 | else \ 36 | unzip -oq appd-netviz-${APPD_AGENT_VERSION}.zip; \ 37 | fi 38 | # run the agent install script 39 | RUN ./install.sh \ 40 | && sed -i -e "s|enable_netlib = 1|enable_netlib = 0|g" ./conf/agent_config.lua \ 41 | && sed -i -e "s|WEBSERVICE_IP=.*|WEBSERVICE_IP=\"0.0.0.0\"|g" ./conf/agent_config.lua 42 | # cleanup 43 | RUN rm -f appd-netviz-${APPD_AGENT_VERSION}.zip 44 | # default command to run for the agent 45 | CMD ./bin/appd-netagent -c ./conf -l ./logs -r ./run -------------------------------------------------------------------------------- /appd-netviz-agent/Dockerfile-rhel: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/rhel7-minimal 2 | 3 | MAINTAINER AppDynamics 4 | 5 | ARG APPD_AGENT_VERSION 6 | 7 | LABEL name="AppDynamics Network Agent" \ 8 | vendor="AppDynamics" \ 9 | version="${APPD_AGENT_VERSION}" \ 10 | release="1" \ 11 | url="https://www.appdynamics.com" \ 12 | summary="AppDynamics solution for network monitoring" \ 13 | description="The Network Agent monitors communications between applications across multiple hosts from the network point of view." 14 | 15 | RUN microdnf --enablerepo=rhel-7-server-rpms update -y && rm -rf /var/cache/yum 16 | RUN microdnf --enablerepo=rhel-7-server-rpms install sed shadow-utils iproute net-tools tcpdump sysvinit-tools curl openssh-clients --nodocs && \ 17 | microdnf clean all 18 | 19 | 20 | 21 | ADD LICENSE /licenses/ 22 | 23 | 24 | WORKDIR /opt/appdynamics/netviz 25 | 26 | ENV NETVIZ_HOME /opt/appdynamics/netviz 27 | 28 | WORKDIR ${NETVIZ_HOME} 29 | 30 | # copy NetViz agent contents 31 | COPY appd-netviz-${APPD_AGENT_VERSION}/ . 32 | 33 | # run the agent install script 34 | RUN ./install.sh \ 35 | && sed -i -e "s|enable_netlib = 1|enable_netlib = 0|g" ./conf/agent_config.lua \ 36 | && sed -i -e "s|WEBSERVICE_IP=.*|WEBSERVICE_IP=\"0.0.0.0\"|g" ./conf/agent_config.lua 37 | 38 | RUN groupadd appdynamics && \ 39 | useradd appdynamics -g appdynamics 40 | 41 | 42 | RUN chown -R appdynamics:appdynamics ${NETVIZ_HOME} 43 | 44 | RUN setcap cap_net_raw=eip ${NETVIZ_HOME}/bin/appd-netagent 45 | 46 | USER appdynamics 47 | 48 | CMD ./bin/appd-netagent -c ./conf -l ./logs -r ./run -------------------------------------------------------------------------------- /appd-netviz-agent/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IMAGE_NAME=appdynamics/machine-agent-netviz 4 | if [ "x$2" != "x" ]; then 5 | IMAGE_NAME=$2 6 | fi 7 | FILE="Dockerfile" 8 | if [ "x$3" != "x" ]; then 9 | FILE=$3 10 | fi 11 | docker build --build-arg NETVIZ_ZIP_PKG=appd-netviz-$1.zip -t ${IMAGE_NAME}:$1 --no-cache -f ${FILE} . -------------------------------------------------------------------------------- /appd-netviz-agent/machine-agent-pks.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: appd-infra-agent 10 | spec: 11 | hostIPC: true 12 | hostNetwork: true 13 | serviceAccountName: appdynamics-infraviz 14 | containers: 15 | - name: appd-netviz-agent 16 | image: appdynamics/machine-agent-netviz:latest 17 | resources: 18 | requests: 19 | memory: "150Mi" 20 | cpu: "0.1" 21 | limits: 22 | memory: "250Mi" 23 | cpu: "0.2" 24 | securityContext: 25 | capabilities: 26 | add: ["NET_ADMIN", "NET_RAW"] 27 | ports: 28 | - containerPort: 3892 29 | hostPort: 3892 30 | volumeMounts: 31 | - name: netviz-volume 32 | mountPath: /netviz-agent/conf/agent_config.lua 33 | subPath: agent_config.lua 34 | - name: appd-infra-agent 35 | image: appdynamics/machine-agent-analytics:latest 36 | imagePullPolicy: IfNotPresent 37 | args: 38 | - echo starting; mkdir -p /var/run/; ln -s /mnt/run/docker/docker.sock /var/run/docker.sock; 39 | /opt/appdynamics/startup.sh 40 | command: 41 | - /bin/sh 42 | - -c 43 | env: 44 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 45 | valueFrom: 46 | secretKeyRef: 47 | key: controller-key 48 | name: cluster-agent-secret 49 | envFrom: 50 | - configMapRef: 51 | name: ma-config 52 | securityContext: 53 | privileged: true 54 | resources: 55 | limits: 56 | cpu: "0.3" 57 | memory: "400M" 58 | requests: 59 | cpu: "0.2" 60 | memory: "300M" 61 | ports: 62 | - containerPort: 9090 63 | volumeMounts: 64 | - name: ma-log-volume 65 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 66 | subPath: log4j.xml 67 | - mountPath: /hostroot 68 | name: hostroot 69 | readOnly: true 70 | - mountPath: /mnt 71 | name: docker-sock 72 | readOnly: true 73 | restartPolicy: Always 74 | volumes: 75 | - name: netviz-volume 76 | configMap: 77 | name: netviz-config 78 | - name: ma-log-volume 79 | configMap: 80 | name: ma-log-config 81 | - name: hostroot 82 | hostPath: 83 | path: / 84 | type: Directory 85 | - name: docker-sock 86 | hostPath: 87 | path: /var/vcap/data/sys 88 | type: Directory 89 | --- 90 | apiVersion: v1 91 | kind: Service 92 | metadata: 93 | name: appd-infra-agent-service 94 | spec: 95 | selector: 96 | name: appd-infra-agent 97 | ports: 98 | - name: "9090" 99 | port: 9090 100 | targetPort: 9090 101 | status: 102 | loadBalancer: {} 103 | -------------------------------------------------------------------------------- /appd-netviz-agent/machine-agent.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: appd-infra-agent 5 | spec: 6 | template: 7 | metadata: 8 | labels: 9 | name: appd-infra-agent 10 | spec: 11 | hostIPC: true 12 | hostNetwork: true 13 | serviceAccountName: appdynamics-infraviz 14 | containers: 15 | - name: appd-netviz-agent 16 | image: appdynamics/machine-agent-netviz:latest 17 | resources: 18 | requests: 19 | memory: "150Mi" 20 | cpu: "0.1" 21 | limits: 22 | memory: "250Mi" 23 | cpu: "0.2" 24 | securityContext: 25 | capabilities: 26 | add: ["NET_ADMIN", "NET_RAW"] 27 | ports: 28 | - containerPort: 3892 29 | hostPort: 3892 30 | volumeMounts: 31 | - name: netviz-volume 32 | mountPath: /netviz-agent/conf/agent_config.lua 33 | subPath: agent_config.lua 34 | - name: appd-infra-agent 35 | image: appdynamics/machine-agent-analytics:latest 36 | imagePullPolicy: IfNotPresent 37 | env: 38 | - name: APPDYNAMICS_AGENT_ACCOUNT_ACCESS_KEY 39 | valueFrom: 40 | secretKeyRef: 41 | key: controller-key 42 | name: cluster-agent-secret 43 | envFrom: 44 | - configMapRef: 45 | name: ma-config 46 | securityContext: 47 | privileged: true 48 | resources: 49 | limits: 50 | cpu: "0.3" 51 | memory: "400M" 52 | requests: 53 | cpu: "0.2" 54 | memory: "300M" 55 | ports: 56 | - containerPort: 9090 57 | volumeMounts: 58 | - name: ma-log-volume 59 | mountPath: /opt/appdynamics/conf/logging/log4j.xml 60 | subPath: log4j.xml 61 | - mountPath: /hostroot 62 | name: hostroot 63 | readOnly: true 64 | - mountPath: /var/run/docker.sock 65 | name: docker-sock 66 | restartPolicy: Always 67 | volumes: 68 | - name: netviz-volume 69 | configMap: 70 | name: netviz-config 71 | - name: ma-log-volume 72 | configMap: 73 | name: ma-log-config 74 | - name: hostroot 75 | hostPath: 76 | path: / 77 | type: Directory 78 | - name: docker-sock 79 | hostPath: 80 | path: /var/run/docker.sock 81 | type: Socket 82 | -------------------------------------------------------------------------------- /appd-netviz-agent/netviz-config.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | data: 3 | agent_config.lua: "--\n-- Copyright (c) 2019 AppDynamics Inc.\n-- All rights reserved.\n--\n-- 4 | $Id$\npackage.path = './?.lua;' .. package.path\nrequire \"config_helper\"\n\nROOT_DIR=\"/netviz-agent\"\nINSTALL_DIR=ROOT_DIR\n-- 5 | Define a unique hostname for identification on controller\nUNIQUE_HOST_ID = \"\"\n\n--\n-- 6 | NPM global configuration\n-- Configurable params\n-- {\n--\tenable_monitor = 0/1,\t-- 7 | def:0, enable/disable monitoring\n--\tdisable_filter = 0/1,\t-- def:0, disable/enable 8 | language agent filtering\n--\tmode = KPI/Diagnostic/Advanced,\t-- def:KPI\n--\tenable_netlib 9 | = 0/1,\t-- def:0, using netlib to map appid with tuples.\n--\tlua_scripts_path\t-- 10 | Path to lua scripts.\n--\tenable_fqdn = 0/1\t-- def:0, enable/disable fqdn resolution 11 | of ip\n-- }\n--\nnpm_config = {\n\tlog_destination = \"file\",\n\tlog_file = \"appd-netagent.log\",\n\tdebug_log_file 12 | = \"agent-debug.log\",\n\tdisable_filter = 1,\n\tmode = \"KPI\",\n\tenable_netlib 13 | = 1,\n\tlua_scripts_path = ROOT_DIR .. \"/scripts/netagent/lua\",\n\tenable_fqdn 14 | = 1,\n}\n\n--\n-- Webserver configuration\n-- Configurable params\n-- {\n--\tport 15 | = ,\t\t-- Port on which to open the webserver\n--\trequest_timeout = , -- Request 16 | timeout in ms\n--\tthreads = ,\t\t-- Number of threads on the webserver\n-- }\n--\nwebserver_config 17 | = {\n\tport = 3892,\n\trequest_timeout = 10000,\n\tthreads = 2,\n}\n\n--\n-- Packet 18 | capture configurations (multiple captures can be configured)\n-- Confiurable params, 19 | there can be multiple of these.\n-- {\n-- \tcap_module = \"pcap\",\t\t-- def:\"pcap\", 20 | capture module\n-- \tcap_type = \"device\"/\"file\",\t-- def:\"device\", type 21 | of capture\n-- \tifname = \"\",\t\t-- def:\"any\", interface name/pcap filename\n-- 22 | \tenable_promisc = 0/1,\t-- def:0, promiscuous mode pkt capture\n-- \tthinktime 23 | = ,\t\t-- def: 100, time in msec, to sleep if no pkts\n-- \tsnaplen = ,\t\t-- 24 | def:1518. pkt capture len\n-- \tbuflen = ,\t\t-- def:2. pcap buffer size in MB\n-- 25 | \tppi = ,\t\t\t-- def:32. pcap ppi\n-- },\n--\ncapture = {\n\t-- first capture 26 | interface\n\t{\n\t\tcap_module = \"pcap\",\n\t\tcap_type = \"device\",\n\t\tifname 27 | = \"any\",\n\t\tthinktime = 25,\n\t\tbuflen = 48,\n--\t\tfilter = \"\",\n\t},\n--[[\t{\n\t\tcap_module 28 | = \"pcap\",\n\t\tcap_type = \"device\",\n\t\tifname = \"en0\",\n\t},\n--]]\n}\n\n--\n-- 29 | IP configuration\n-- ip_config = {\n--\texpire_timeout = ,\t-- Mins after which 30 | we expire ip metadata\n--\tretry_count = ,\t\t-- No of tries to resolve fqdn for 31 | ip\n-- }\nip_config = {\n\texpire_interval = 20,\n\tretry_count = 5,\n}\n\n--\n-- 32 | DPI configuration\n-- Configurable params\n-- {\n--\tmax_flows = ,\t-- Max number 33 | of flows per fg to DPI at any given time.\n--\tmax_data = ,\t-- Max mega bytes 34 | to DPI per flow.\n--\tmax_depth = ,\t-- Max bytes to DPI in a packet\n--\tmax_callchains 35 | = , -- Max callchains to store for a flowgroup\n--\tmax_cc_perflow = , -- Max 36 | number of call chains to look for in each flow\n-- }\n--\ndpi_config = {\n\tmax_flows 37 | = 10,\n\tmax_data = 4,\n\tmax_depth = 4096,\n\tmax_callchains_in_fg = 32,\n\tmax_callchains_in_flow 38 | = 2,\n}\n\n-- Configurations for application service ports\n-- {\n--\tports = 39 | ,\t-- Comma separated list of application service\n--\t\t\t ports greater than 40 | 32000. Example\n--\t\t\t ports = \"40000, 41000, 42000\"\n-- }\n--[[\napplication_service_ports 41 | = {\n\tports = \"\",\n}\n--]]\n\n--\n-- Export data from network agent configuration/tunnables\n-- 42 | Configurable params, there can be multiple of these.\n-- {\n-- \texportype = \"file\"/\"remote\",\t-- 43 | type of export mechanism\n-- \tstatsfile = \"\",\t\t\t-- filename for stats export\n-- 44 | \tmetricsfile = \"\", \t\t-- filename for metrics export\n-- \tserialization = 45 | \"pb\",\t\t-- pb/capnp, serialization module\n-- \ttransport = \"zmq\", \t\t-- 46 | def:\"zmq\", transport module\n-- \tzmqdest = \"\", \t\t\t-- dest peer for zmq\n-- 47 | \ },\n--\nexport_config = {\n\t-- file export\n\t{\n\t\texporttype = \"file\",\n\t\tstatsfile 48 | = \"agent-stats.log\",\n\t\tmetricsfile = \"agent-metrics.log\",\n\t\teventsfile 49 | = \"agent-events.log\",\n\t\tsnapshotsfile = \"agent-snapshots.log\",\n\t\tmetadatafile 50 | = \"agent-metadata.log\",\n\t},\n}\n\n-- Plugin interface configuration.\n-- List 51 | of interfaces to be monitored by supported plugins.\n-- Configurable params, there 52 | can be multiple of these.\n-- {\n-- \tinterface = \"eth0\",\t-- def: \"eth0\", 53 | interface name\n-- }\nplugin_if_config = {\n--[[\n\t{interface = \"eth0\"},\n--]]\n}\n\n-- 54 | Plugin process configuration.\n-- List of processes to be monitored by supported 55 | plugins.\n-- Configurable params, there can be multiple of these.\n-- {\n--\tprocess 56 | = \"\",\t\t-- def: \"appd-netagent\", process name\n-- }\nplugin_proc_config = 57 | {\n\t{process = \"appd-netagent\"},\n}\n\n-- metadata to pass to pass the agent 58 | metadata specific params\nsystem_metadata = {\n\tunique_host_id = UNIQUE_HOST_ID,\n\tinstall_dir 59 | = INSTALL_DIR,\n\tinstall_time = get_last_update_time(),\n}\n" 60 | kind: ConfigMap 61 | metadata: 62 | name: netviz-config 63 | namespace: appdynamics -------------------------------------------------------------------------------- /appd-netviz-agent/netviz-simple.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | labels: 5 | infraViz_cr: appd-infraviz 6 | name: infraViz 7 | name: appd-infraviz 8 | namespace: appdynamics 9 | spec: 10 | selector: 11 | matchLabels: 12 | infraViz_cr: appd-infraviz 13 | name: infraViz 14 | template: 15 | metadata: 16 | labels: 17 | infraViz_cr: appd-infraviz 18 | name: infraViz 19 | spec: 20 | containers: 21 | - image: docker.io/appdynamics/machine-agent-netviz:latest 22 | imagePullPolicy: Always 23 | name: appd-netviz-agent 24 | ports: 25 | - containerPort: 3892 26 | hostPort: 3892 27 | protocol: TCP 28 | resources: 29 | limits: 30 | cpu: 200m 31 | memory: 300Mi 32 | requests: 33 | cpu: 100m 34 | memory: 150Mi 35 | securityContext: 36 | capabilities: 37 | add: 38 | - NET_ADMIN 39 | - NET_RAW 40 | terminationMessagePath: /dev/termination-log 41 | terminationMessagePolicy: File 42 | dnsPolicy: ClusterFirst 43 | hostIPC: true 44 | hostNetwork: true 45 | hostPID: true 46 | restartPolicy: Always 47 | serviceAccount: appdynamics-infraviz 48 | serviceAccountName: appdynamics-infraviz 49 | terminationGracePeriodSeconds: 30 50 | updateStrategy: 51 | rollingUpdate: 52 | maxUnavailable: 1 53 | type: RollingUpdate 54 | -------------------------------------------------------------------------------- /appd-netviz-agent/netviz.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | labels: 5 | infraViz_cr: appd-infraviz 6 | name: infraViz 7 | name: appd-infraviz 8 | namespace: appdynamics 9 | spec: 10 | selector: 11 | matchLabels: 12 | infraViz_cr: appd-infraviz 13 | name: infraViz 14 | template: 15 | metadata: 16 | labels: 17 | infraViz_cr: appd-infraviz 18 | name: infraViz 19 | spec: 20 | containers: 21 | - image: docker.io/appdynamics/machine-agent-netviz:4.5.8 22 | imagePullPolicy: Always 23 | name: appd-netviz-agent 24 | ports: 25 | - containerPort: 3892 26 | hostPort: 3892 27 | protocol: TCP 28 | resources: 29 | limits: 30 | cpu: 200m 31 | memory: 300Mi 32 | requests: 33 | cpu: 100m 34 | memory: 150Mi 35 | securityContext: 36 | capabilities: 37 | add: 38 | - NET_ADMIN 39 | - NET_RAW 40 | terminationMessagePath: /dev/termination-log 41 | terminationMessagePolicy: File 42 | volumeMounts: 43 | - mountPath: /netviz-agent/conf/agent_config.lua 44 | name: netviz-volume 45 | subPath: agent_config.lua 46 | dnsPolicy: ClusterFirst 47 | hostIPC: true 48 | hostNetwork: true 49 | hostPID: true 50 | restartPolicy: Always 51 | serviceAccount: appdynamics-infraviz 52 | serviceAccountName: appdynamics-infraviz 53 | terminationGracePeriodSeconds: 30 54 | volumes: 55 | - configMap: 56 | defaultMode: 420 57 | name: netviz-config 58 | name: netviz-volume 59 | updateStrategy: 60 | rollingUpdate: 61 | maxUnavailable: 1 62 | type: RollingUpdate 63 | -------------------------------------------------------------------------------- /appd-netviz/centos7/x86/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM centos:centos7 2 | 3 | MAINTAINER mark.prichard@appdynamics.com 4 | 5 | ARG APPD_AGENT_VERSION 6 | ARG APPD_AGENT_SHA256 7 | 8 | COPY appd-netviz-x64-linux-${APPD_AGENT_VERSION}.rpm / 9 | COPY start.sh / 10 | RUN echo "${APPD_AGENT_SHA256} *appd-netviz-x64-linux-${APPD_AGENT_VERSION}.rpm" >> appd_checksum \ 11 | && sha256sum -c appd_checksum \ 12 | && rm appd_checksum \ 13 | && yum install -y initscripts \ 14 | && rpm -ivh appd-netviz-x64-linux-${APPD_AGENT_VERSION}.rpm 15 | 16 | CMD ["./start.sh"] 17 | -------------------------------------------------------------------------------- /appd-netviz/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | netviz: 5 | image: appdynamics/netviz:${APPD_AGENT_MAJOR_VERSION}_centos7 6 | build: 7 | context: . 8 | dockerfile: ./centos7/x86/Dockerfile 9 | args: 10 | APPD_AGENT_VERSION: 11 | APPD_AGENT_SHA256: 12 | -------------------------------------------------------------------------------- /appd-netviz/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | service appd-netviz start 4 | 5 | while sleep 60; do 6 | ps aux |grep appd-netagent | grep -q -v grep 7 | PROCESS_1_STATUS=$? 8 | ps aux |grep appd-netmon | grep -q -v grep 9 | PROCESS_2_STATUS=$? 10 | if [ $PROCESS_1_STATUS -ne 0 -o $PROCESS_2_STATUS -ne 0 ]; then 11 | echo "Something went wrong!" 12 | exit 1 13 | fi 14 | done 15 | 16 | -------------------------------------------------------------------------------- /appd-python-init/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | WORKDIR /opt/appdynamics 4 | 5 | COPY run-with-agent.sh . 6 | 7 | RUN chmod +x run-with-agent.sh 8 | 9 | CMD [ "echo", "Delivering the Python Agent Install script. Copy the script run-with-agent.sh from /opt/AppDynamics to the application container and override the application entry point to call the script" ] 10 | -------------------------------------------------------------------------------- /appd-python-init/run-with-agent.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | AGENT_VER="21.9.0.4385" 3 | if [ "x${APPDYNAMICS_AGENT_VERSION}" = "x" ]; then 4 | echo "APPDYNAMICS_AGENT_VERSION not set; defaulting to ${AGENT_VER}" 5 | else 6 | echo "Using agent version ${APPDYNAMICS_AGENT_VERSION}" 7 | AGENT_VER=${APPDYNAMICS_AGENT_VERSION} 8 | fi 9 | 10 | if [ "x${APP_ENTRY_POINT}" = "x" ]; then 11 | echo "APP_ENTRY_POINT variable must be set. Aborting..." 12 | exit 1 13 | fi 14 | 15 | pip install -U appdynamics==${AGENT_VER} 16 | 17 | pyagent run --use-manual-proxy $APP_ENTRY_POINT --------------------------------------------------------------------------------