Published on September 12, 2020
1. [12th September 2020]: [Anypoint Visualizer and API Functional Monitoring using API Monitor] [Mumbai - India]
2. All contents © MuleSoft Inc. 2 • 1.Please keep yourself muted unless you have any question. • 2.We encourage keeping your video for making our meetup interactive. • 3.You'll can also write down your questions in chat section. • 4.Once you join write down your registered name in chat section so we will have an attendance. • 5.As this is our first online Meetup, we appreciate your valuable feedback. Thanks. Guidelines for Mumbai MuleSoft Meetup #13 [Virtual]
3. All contents © MuleSoft Inc. Agenda 3 Introductions Important Announcements and Latest Releases/News MuleSoft CONNECT:Now 2020 MuleSoft Anypoint Platform Insiders Mumbai MuleSoft Mini Meetup Announcements Technical Session - API Functional Monitoring using API Monitor Technical Session - Anypoint Visualizer Demo Networking time
4. All contents © MuleSoft Inc. Introductions 4 • About the organizers: – Sudeshna Mitra – Manish Yadav – Akshata Sawant • About the sponsors: MuleSoft A SHOW OF HANDS: Who is new to this MeetUp?
5. All contents © MuleSoft Inc. Speaker 5
6. Latest Release/News Important Announcements
7. All contents © MuleSoft Inc. 7 • Registration Link: https://connect.mulesoft.com/ • Blog Link MuleSoft CONNECT:Now 2020
8. All contents © MuleSoft Inc. 8 • MuleSoft Anypoint Platform Insiders – As an Insider, you will be able to engage with our product leaders and designers to give ongoing, real-time, insightful feedback. – You will be able to see our latest designs, interact with features before release, and give your impactful opinions through user studies, surveys, and pre-release interviews; across the entire product development cycle, from idea generation to design to validation. – You will have access to the online Hub where you can see all the studies that you have been invited to with participation completely optional and to you and your availability. – Join us and help drive the future of Anypoint Platform! Send in your nominations. • Mumbai Mini Meetup Announcement – Fill out our form! • Anypoint Studio 7.6.0 Release Latest Releases/News
9. Introduction API Functional Monitoring
10. All contents © MuleSoft Inc. Introduction 10 • Framework for assuring the quality and reliability of public and private APIs that are being used in application networks. • Enables developers to perform consistent testing of the functional behavior and performance of their APIs throughout the API lifecycle, in testing and production environments. • Monitor/Test API Endpoints running on different Environments and run tests at scheduled intervals to prevent failures. • API Functional Monitoring is based on concept of Black Box Testing. • Reporters Feature to generate and share the defined test failure reports via Slack, Email, NewRelic, PagerDuty etc.
11. All contents © MuleSoft Inc. 11 Why Functional Monitoring
12. Quick Walkthrough API Functional Monitoring
13. All contents © MuleSoft Inc. Ways of API Functional Testing 13 • Two Ways to perform API Functional Testing. - Functional Monitoring on Anypoint Platform Create monitors in the Functional Monitoring section of Anypoint Monitoring. You can upload as monitors any testing projects that you wrote manually. - Blackbox Automated Testing (BAT CLI) Write tests manually in easy-to-use behavior-description language (BDD Scripts) and then schedule them with the Blackbox Automated Testing (BAT) CLI. The BDD language is based on the DataWeave language and follows the “given-when-then” approach to describe behavior in terms of conditions and expected outcomes.
14. All contents © MuleSoft Inc. FM using Monitor on Platform 14
15. All contents © MuleSoft Inc. FM using BAT CLI 15
16. Deep Dive API Functional Monitoring
17. All contents © MuleSoft Inc. Overview 17 • Monitoring the APIs is performed from Functional Monitoring section of Anypoint Monitoring, which can be accessed from the home page of Anypoint Platform. • Monitoring an API means to monitor the performance of its response to requests that are sent to the resources at its endpoints. • APIs deployed on both public and private locations (VPC) can be monitored from single pane of view. • The Functional Monitoring section contains tools for creating a monitor and for editing monitors. Also, if you’ve created a monitor by writing a test suite in the Behavior Driven Development (BDD) test-writing language, you can upload that monitor to start functionally testing an API at scheduled intervals.
18. All contents © MuleSoft Inc. What is Monitor? 18 • A Monitor is a repeating schedule of one or more tests, referred to as a suite. • A new monitor consists of a test and a schedule for that test. When you create a monitor, you specify below parameters for that test: - The API Endpoints that you want to test. - Optional assertions to test at the endpoints (for example, you might expect a 200 HTTP status code) - Optional HTTP request headers to include when pinging the endpoints. - Optional reporting tools which you want the results of the test to be sent to (such as Email or Slack)
19. All contents © MuleSoft Inc. 19 • When you create the monitor, you specify the endpoints that you want to test. For the schedule, you specify the location in which to run the test, and the interval at which to run the test. • Over time you can create the new versions of the test and create additional schedules to run them at different times. Monitor - Continued
20. All contents © MuleSoft Inc. 20 Create a Monitor
21. All contents © MuleSoft Inc. 21 Create a Monitor contd.. • Creating a Monitor from Anypoint Platform. • Add validations along with client credentials
22. All contents © MuleSoft Inc. 22 Create a Monitor contd.. Execution Location of Schedule Monitor Schedule to run Test Add Reporter for Test Failure Notifications Available Reporters for Notifications
23. All contents © MuleSoft Inc. 23 Create a Monitor contd.. Monitor Overview Schedules Overview
24. All contents © MuleSoft Inc. 24 • You can add a schedule to an existing monitor if either of the following two conditions is matched: – You plan to run the test associated with the schedule in a public location and the allocation of schedules for your organization in Anypoint Platform is not exhausted. – You plan to run the test associated with the schedule in a private location. • When you add a schedule to a monitor, you can use the schedule to run any of the versions of the test for that monitor. • There are two different methods that you can use to add a schedule. – Add a Schedule from Schedules section of Monitor. – Add a schedule from the list of schedules that use a particular location. Add a Schedule
25. All contents © MuleSoft Inc. 25 Add a Schedule contd.. Schedule from Schedules section of Monitor
26. All contents © MuleSoft Inc. 26 Add a Schedule contd.. Schedule from the list of schedules that use a particular location.
27. All contents © MuleSoft Inc. 27 • You can modify a schedule if you want to change: – The test version that it runs – The location in which the test is run from – The frequency at which to run the test – The monitor in which the test is defined Modify/Delete a Schedule
28. All contents © MuleSoft Inc. 28 • You can delete versions of a test from a monitor if you no longer need them. • You can delete a monitor that you no longer need. However, there is no cost to keeping the monitor if it is not scheduled to run. Delete a Test/Monitor
29. All contents © MuleSoft Inc. 29 • You can review the details of past executions of a test version • Select the monitor for which you want to view a test version’s historical results. • Click the Tests tab to see the list of test versions. • Click the History icon for the test version that you want to run View a Test’s History
30. All contents © MuleSoft Inc. 30 Reporter Notification on Failure
31. All contents © MuleSoft Inc. 31 • Length of the Time before Test times out - 120 Seconds on public locations (AFM prevents tests from executing to save resources) - This wait time cannot be changed. - When tests are run by private locations in an instance of Anypoint VPC, the workers do not share resources with other MuleSoft customers. Therefore, AFM allows tests to wait for a default of thirty minutes for a response from an endpoint. You can increase this time in Anypoint Runtime Manager. • Number of Schedules – By default, AFM lets your organization in Anypoint Platform run up to five schedules for testing from public locations at one time. If you reach the limit of five schedules and want to run more monitors simultaneously, contact your MuleSoft Customer Success Manager about raising your maximum. Limitations
32. Anypoint Visualizer
33. All contents © MuleSoft Inc. Introduction 33 • Provides a real-time, graphical representation of running apps/APIs. • Displays views of different aspects of an application network graph: – API layer – Dependencies – API consumers • Collects data from Mule applications, APIs, and proxies deployed to Cloud Hub to discover all incoming and outgoing connections.
34. All contents © MuleSoft Inc. Introduction 34 • Connections are based on traffic between applications in last seven days. • Only mulesoft supported instance’s Application, API or proxy is discovered. • Also useful to inspect performance metrics or policy information. • Define views, arrange applications in layers and customize the labels displayed for nodes and connections.
35. All contents © MuleSoft Inc. Layout Introduction 35
36. All contents © MuleSoft Inc. Roles and Permissions Setup Anypoint Visualizer 36 • Read applications permission – Can only view graphs • View or Manage policies – Useful to view policies in visualizer. • Visualizer Editor – Custom roles can be assigned to this permission scope. • Cloudhub • Runtime Fabric • Standalone Mule Deployment
37. All contents © MuleSoft Inc. Enabling Monitoring Agent Setup Anypoint Visualizer 37 • Using system UI
38. All contents © MuleSoft Inc. Enabling Monitoring Agent Setup Anypoint Visualizer 38 • Using Ci/CD or runtime properties – Add the property: anypoint.platform.config.analytics.agent.enabled=true
39. All contents © MuleSoft Inc. Layers Setup Anypoint Visualizer 39 • Nodes can be assigned to default layers provided by MuleSoft or to custom layers. • Default layers cannot be be deleted, but unassigned. • Nodes automatically appear in the specified layer. • If layer doesn’t exist, it is automatically created. • Only one layer can be assigned to one node. • Layers can be assigned via system UI or runtime properties. • anypoint.platform.visualizer.layer=<name> • Layer assigned using properties can’t be overwritten in UI. • Layers can be reordered using arrows.
40. All contents © MuleSoft Inc. Layers Setup Anypoint Visualizer 40 • Using UI • Using properties
41. All contents © MuleSoft Inc. Tags Setup Anypoint Visualizer 41 • Useful to group nodes for specific use cases. • Tags are assigned as application property, not the server property • Multiple tags are allowed. • Same as layers, tags can be assigned via property or UI. • Same tag cannot be applied multiple times to one node. • Case sensitive
42. All contents © MuleSoft Inc. Views Setup Anypoint Visualizer 42 • Provide a single source of truth and that are accessible to team members across environments. • Views display the saved filter selection of tags and environments. • Any existing or new app deployed that match the selected filters are added in the view automatically. • Visualizer editors can create auto-discoverable views. • Only users with the Visualizer Editor permission can create defined views. • Only editors can create, rename, and edit defined views. • Views can be edit, delete or shared. • Private views are accessible only to editor.
43. All contents © MuleSoft Inc. Setup Anypoint Visualizer 43 • For better visualization: – Consumer nodes should be at the top. – Backend systems should be placed at the bottom. • ClientId category: – For a consumer node, the nodes are grouped by ClientId – Otherwise they are grouped under the External Traffic node – All client apps that call the same Mule app are grouped into a single client app group node. – The number of client apps in the group is specified in the display name.
44. All contents © MuleSoft Inc. Visualizations by use case 44 Architecture Visualization
45. All contents © MuleSoft Inc. Visualizations by use case 45 Troubleshooting Visualization • Shows the current and past health of Mule apps. • From this visualization, you can navigate to Anypoint Monitoring dashboards or logs. • Matrics provides monitoring stats for the selected node. • Stats include average response time, average throughput, failure rate, average CPU utilization, and average memory utilization. • Matric is not applicable for some use cases which depends on selection of matric type and node.
46. All contents © MuleSoft Inc. Visualizations by use case 46 Troubleshooting Visualization
47. All contents © MuleSoft Inc. Visualizations by use case 47 Troubleshooting Visualization
48. All contents © MuleSoft Inc. Visualizations by use case 48 Policies Visualization • Shows relationship between Mule app deployments and the APIs they are implementing and which policies have been applied to those APIs. • Metadata comes from API Manager.
49. All contents © MuleSoft Inc. Visualizations by use case 49 Policies Visualization
50. All contents © MuleSoft Inc. Visualizations by use case 50 Policies Visualization
51. All contents © MuleSoft Inc. Take a stand ! 51 • Nominate yourself for the next meetup speaker and suggest a topic as well.
52. All contents © MuleSoft Inc. What’s next 52 • Share: – Tweet your pictures with the hashtag #MuleMeetup #MuleSoftMeetup – Invite your network to join: https://meetups.mulesoft.com/mumbai/ • Feedback: – Contact your organizers Manish Yadav, Sudeshna Mitra and Akshata Sawant to suggest topics – Tweet your organizers at @SudeshnaMitra14, @Manish_Kyadav, @sawantakshata02 – Contact MuleSoft at [email protected] for ways to improve the program – Follow us on Instagram (mumbai_mulesoftofficialpage) – Your Feedback is Food for us • Our next meetup: – Date: TBD – Location: Mumbai – Topic: TBD
53. Networking time Introduce yourself to your neighbors!
54. See you next time Please send topic suggestions to the organizer
55. THANK YOU