Getting Started with MongoDB Charts in MongoDB Atlas

Hi everyone, MongoMike here! It’s been too long since I’ve had a chance to blog, so I made some time to write about one of the cool MongoDB tools that I’ve had a chance to check out recently. Today, I wanted to write about getting started with MongoDB Charts in MongoDB Atlas on Microsoft Azure’s Cloud Platform, but really the instructions here will work exactly the same in AWS and Google Cloud since Charts and Atlas are cloud agnostic.

First, let me tell you a little about MongoDB Charts. MongoDB Charts is a visualization tool that lets you visualize your MongoDB data. While most existing BI Tools can access MongoDB through it’s BI Connector, MongoDB Charts harnesses the power of the document model and allows you to utilize MongoDB’s Aggregation Framework to provide some great visualizations of your data without having to conform to the relational model or otherwise flatten your data.

Now that we know what Charts can do, let’s get started. First we login to our MongoDB Atlas account and once logged in, we click on the Charts Icon:

charts_login

Once we click on Charts, Atlas will start installing Charts in the background, in less then a minute we’re ready to go!  Now we’ll need to add a Data Source.  We begin by selecting which of our MongoDB Atlas Deployments we want to pull data from.

data_source_1

 

Now we’ll select which collection(s) we’ll be pulling data from!  In my example, I’m using data I’ve pulled from the startup companies data set found on github.  This is one of many great places to find test data for MongoDB.

data_source_2

Next, we’ll set our permissions to determine what users are able to read, manage and modify the dashboards we’ll be creating with our data.

data_source_3

Now we can publish our Data Source and start creating dashboards!  Click on the Dashboards Button in the Top Left and then click on New Dashboard to get started.  The first thing you will do is name your dashboard.

Next we’ll want to pick some interesting data for our visualizations.  How about finding out which cities are more popular for startups?

For my dashboard, I’ve changed the Chart Type to “Text” and picked the “Table” sub-category.  In the groups section I’ve dragged the offices.city field, and in the values section I’ve dragged the milestones.number_of_employees field and the offices.city field.   This will show be how many startup employees there are in a city and how many offices  as well.  Here’s what my visualization looks like when I use New York as my example:

new_york

Now I’ll change the city to my hometown of Rochester and see how the numbers change.  Not surprisingly, there’s a bit of a drop:

rochester

Let’s look at the data with a different type of chart.  For this dashboard we’ll use a Grid Chart Type with a Heat Map to show which countries have a greater concentration of employees working for larger or smaller start ups.  For the X axis, we’ll look at number of employees and bin them by 10,000, for the Y axis, we’ll  look at Country Code and we’ll use number of employees for the intensity as well to show the concentrations.

employee_heat_map

With real data we could save this dashboard and it would get updated as our data gets populated, giving us real time visualizations on our MongoDB data.

With that, I hope this blog post helps show you how easy it is to get started with MongoDB Charts in MongoDB Atlas and to start making some awesome dashboards that help you properly visualize your MongoDB data.  Thanks for reading!

 

–MongoMike

 

MongoDB World 2018 Review

Overview:

MongoDB World 2018 was held on June 26 and June 27th in New York. In addition to the conference, I also attended the MongoDB Customer Advisory Board on June 28th. My time there was split up in to 3 parts:

1) The Advocacy Summit, an all day meetup with the MongoDB Masters, of which I’m honored to be a part of, and some amazing advocates from around the world who are using MongoDB in cool and exciting ways.

2) The conference, this conference was extra special for me as it was my first time speaking at an event of this size! I talked about our journey to automating MongoDB deploys at Paychex. Slides can be found here.

3) The Customer Advisory Board, this is a meetup of customers, large and small, who utilize MongoDB, we got to hear about some of the interesting problems MongoDB is thinking about and got to comment on our uses of certain MongoDB products

The Advocate Summit:

The Advocate Summit was an event put together by the MongoDB Advocacy Team, Mike Lynn, Global Director of Developer Advocacy (https://twitter.com/mlynn), Joe Drumgoole, Head of Developer Advocacy EMEA (https://twitter.com/jdrumgoole) and MC’ed by Jay Gordon, Cloud Developer Advocate(https://twitter.com/jaydestro).

Topics ranged from how MongoDB built their Cloud DBaaS, Atlas, presented by the Product Manager for Atlas, Andrew Davidson, to an informative “Ask Anything” session with MongoDB Founder and CTO, Eliot Horowitz (https://twitter.com/eliothorowitz), to the startup accelerator program by Francesca Krihely (https://twitter.com/francium), to a Q&A with all of the MongoDB Product Managers. In addition to the MongoDB speakers there were sessions by Jenna Zeigen from Slack (https://twitter.com/zeigenvector) on managing your manager, and a great session by fellow MongoDB Master, Ken Alger of Treehouse (https://twitter.com/kenwalger) on how to use MongoDB to enhance your career. The day finished off with Brandy Morgan of Creators Code (https://twitter.com/msbrandymorgan) giving a great talk on teaching people to be teachers.

Dgn--FOVMAACaf8

Pictured from Left to Right:

Leandro Domingues of Cluster Consultoria Brazil (https://twitter.com/delbussoweb), Roderigo Nascimento of NetApp (https://twitter.com/logwriter), Jay Gordon of MongoDB (https://twitter.com/jaydestro), Juan Roy Cuoto of Grupo Undanet of Spain (https://twitter.com/juanroycouto), Jorge Puente Sarrín of Rebel Mouse of Peru (https://twitter.com/puentesarrin) and Me, Mike Grayson of Paychex (https://twitter.com/mikegray831)

The conference:

The conference itself was great, as I mentioned earlier, I got my first, of I hope many, opportunities to speak at a conference of this size. I talked about our journey to automating MongoDB deploys at Paychex. Slides can be found here. I was lucky in that 3 of my Paychex colleagues took the time out of their conference to attend my talk. Thanks Christine Rebekka Swanson , Suzanne E Sarr and Andrea Lee Dougherty your support was awesome I was happy that my presentation was early in the conference so I could get it done and enjoy the rest of the conference! I had a lot of follow up questions and was approached by fellow Operations Engineers at some large companies that have had the same issues as we had. Here’s a few pictures that were taken during my talk!

DgtBEzUW0AAnJO5

DgtBEzRXcAEiHxE

After my talk, it was time for the keynote! There were many exciting announcements, it was hard to pick a favorite, so in no particular order here are the highlights: Multi-Document ACID transactions in MongoDB 4.0! MongoDB Stitch (BackEndaaS) made generally available in the cloud! MongoDB Compass now has an Aggregation Pipeline Builder! Global Clusters in Atlas, more and more regions in AWS, Azure and GCP. MongoDB Mobile!

With this year’s conference only being one day and me speaking during one of the sessions, I was limited in to the amount of sessions I could attend. However, I did make it to the following sessions:

Redhat Sponsored Talk: on Deploying MongoDB to Enterprise Kubernetes (aka OpenShift)
Time for a Change Stream – Using MongoDB Change Streams to Version your Database
MongoDB Meet Chaos Monkey
Simplified Encryption & Key Management for MongoDB
User Administration With You – Integrating LDAP with MongoDB
Free the DBA: Building Chat Bots to Triage, Monitor and Manage MongoDB Deployments from any device
Spark and Machine Learning

These covered some of the key takeaways I look to get from each and every MongoDB World:

A new and easier way to deploy
Evaluating newer features that we don’t yet use at Paychex
Learning about a part of MongoDB that I’ll soon need to know deeply
Ways to make my job easier (and all of Paychex Data Services jobs easier) in supporting MongoDB
Learning about something new that we’re not yet looking at in Paychex to get ahead of the curve

MongoDB CAB:

The end of my MongoDB week was at the MongoDB Customer Advisory Board. The CAB is a place where MongoDB customers large and small come to talk about how they’re using MongoDB, what they would like to see changed, as well as a chance for MongoDB Product Managers to get feedback on some of the items that they’re looking at. After the CAB all of the Product Managers, and MongoDB executives and the CAB Members went to Quality Meats in Manhattan. This gave us time for more 1-1 chats with each other. During this time I was able to talk with the Product Managers of MongoDB Mobile, MongoDB Stitch and the MongoDB Drivers team, I have a few action items from those conversations that I’m following up with them on. Overall, it’s great to get the opportunity to have these kinds of chats with the people who are building MongoDB, I realize how lucky I am to have this chance.

Thanks for reading!

Speaking at SQL Saturday Rochester on 03/24!

Hey all! I’ve been lucky enough to be selected to speak at SQL Saturday in a few weeks! I’ll be co-presenting with colleague Kim St. Jacques on a fun topic, a side by side of operational items for SQL Server, Oracle and MongoDB, the talk is titled “I have to support what!? SQL, Oracle, and Mongo – A side by side “how to” ” More information can be found below:

http://www.sqlsaturday.com/723/Sessions/Details.aspx?sid=73822

To signup for this SQL Saturday visit this link:

http://www.sqlsaturday.com/723/EventHome.aspx

Hope to see you there!

MongoDB Compass Beta

After hearing about all the improvements to MongoDB Compass at MongoDB World, I finally had a chance to test the beta release, which has all the new features that were mentioned at MongoDB World already available!

First, I went to the MongoDB Compass Download Center to download the latest beta version of Compass.  After downloading it, I was able to point it at a database with some data that I thought would be interesting to see used against the new features.

The new features of MongoDB Compass build on the original version of Compass which allowed you to visualize your data and to build ad hoc queries if you wanted to see specific data.  This made it easier for those who weren’t familiar with the MongoDB query language to see data that was important to them.  The new features, such as explain plans, viewing index usage, being able to insert documents, bring more admin type features to Compass making it an even more valuable tool for working with your data.  For me, these admin features move Compass more and more towards a valuable tool not only for visualizing your data but for day to day admin activities with your data.  The new version of Compass will make MongoDB more accessible to those who may not have the time to learn the query language and allow them to manipulate data in ways they are accustomed to with other databases.

I recommend anyone interested in visualizing their MongoDB data to give Compass a try.

 

Index Usage Example:

index_usage

 

Explain Plan example:

explain_plan

Inserting a document example:

insert_document

 

As always, thanks for reading!

Starting a new MongoDB User Group in Western NY!

Hey everyone, I’m starting the process of starting a MongoDB User Group (MUG) in the Western NY (Buffalo/Rochester/Syracuse) area!  Please join our group!  I’ll be setting up our first meetup in the upcoming weeks!

Western New York MongoDB User Group

Rochester, NY
3 Members

This group is a place for developers in the Rochester, Buffalo, and Syracuse area to learn more about MongoDB, an open source, document-oriented, NoSQL database. If you are fa…

Check out this Meetup Group →

 

Upgrading MongoDB Ops Manager from 1.8.x to 2.0.x release using the RPM upgrade approach

For those of us that use the On-Prem version of Cloud Manager, Ops Manager, there comes a time when you need to upgrade your MongoDB Ops Manager Infrastructure.  The upgrade may be in order to support new features, get bug fixes or various other reasons.  Getting to the 2.0.x version of Ops Manager allows for Monitoring of MongoDB 3.2 Databases as well as adding a great deal of monitoring capabilities.  Licensed users can read the documentation here on all the new features and functionality in MongoDB Ops Manager 2.0.x.  Here is the basic plan I followed, this was taken from the Ops Manager Upgrade Documentation and I added several steps that helped me avoid any issues and allowed for an easy rollback in case of issues.  I hope to be able to automate as much of this process as possible for future upgrades!

Upgrade Plan:

  1. Make sure all Ops Manager Backups are completed before beginning.  This can be confirmed by navigating to Admin > Backup > Jobs in the Ops Manager Application and checking on the “Working On” column, if it is blank then the Backup Jobs are completed.
  2. Shutdown the Backup Daemon:
    1. service mongodb-mms-backup-daemon stop
  3. Shutdown the Application Server(s):
    1. service mongodb-mms stop
  4. Shutdown the Ops Manager Application Database and the Backup Datastore Database.  Copy the data files from your data directory, typically, /data/db to another location and compress them as a backup in case a rollback is needed.
    1. service mongod stop
    2. cd /data/db
    3. cp * /data/db/preupgrade_bkup
    4. cd /data/db/preupgrade_bkup
    5. gzip *
  5. Startup the Ops Manager Application and Backup Databases
    1. service mongod start
  6. Save a copy of the previous Ops Manager configuration file in case of a rollback:
    1. cp /opt/mongodb/mms/conf/conf-mms.properties /tmp/conf-mms.properties
    2. cp /opt/mongodb/mms-backup-daemon/conf/conf-daemon.properties. /tmp/conf-daemon.properties
  7. Uninstall the Backup Daemon RPM as this is no longer in Ops Manager 2.0
    1. sudo rpm -e mongodb-mms-backup-daemon-1.8.2.312-1.x86_64
  8. Upgrade the Ops Manager Package and install the Ops Manager Package on the Backup Daemon Host (backup daemon is now included in the Ops Manager RPM’s in Version 2.0.x):
    1. sudo rpm –Uvh mongodb-mms-2.0.4.348-1.x86_64.rpm
  9. Copy back the previous Ops Manager config file:
    1. cp /tmp/conf-mms.properties /opt/mongodb/mms/conf/conf-mms.properties
  10. Start Ops Manager on both Ops Manager Application Hosts and the former Backup Daemon Host:
    1. service mongodb-mms start
    2. If there are any issues, the logs can be found at: /opt/mongodb/mms/logs
  11. Log in to the Application
  12. Update all agents
    1. In the Ops Manager UI , go to the deployment screen, you will be prompted to upgrade all of your agents.

 

So now you’ve successfully upgraded your Ops Manager.  How do you prove that everything works after you completed the upgrade?  Why you test of course.

 

Testing Plan:

  1. Log in to Ops Manager to verify all pieces are functioning correctly post upgrade.
    1. Perform a Backup of a DB to confirm the Backup Daemon (now included in the Ops Manager RPM) is working and that Backups were not negatively affected
    2. Confirm that all agents are up and reporting to the Application as on the latest version
    3. Temporarily set an alert threshold to a low value to be sure it alerts in the same manner as previous to the upgrade.

As you can see, while this process is relatively simple, it’s ripe for automation, which I will be attempting for my next MongoDB Ops Manager upgrade!  Thanks for reading!

MongoDB World 2016 Retrospective

Wow, does time sure fly, this time a week ago I was in the Nasdaq Building in Times Square at the MongoDB World 2016 VIP Party.  I thought I’d take the time to take a look back at this past week and all of the great things that happened.  From the MongoDB Masters Summit, to MongoDB World itself, and finally the MongoDB CAB, there were highlights all around and it’s exciting to see where the product is heading.

First up was the MongoDB Master’s Summit, the MongoDB Masters is a group who participate in an annual program run by MongoDB to recognize and empower leaders in the MongoDB community. Masters serve as ambassadors, leaders, educators, and experts, sharing their first-hand knowledge and experience. Masters complete MongoDB professional certification to demonstrate their expertise.  The Master’s Summit was a great experience meeting other MongoDB Professionals and making those connections as well as meeting and getting to know the MongoDB Community Team.  After the Master’s Summit was the MongoDB VIP Party at the Nasdaq in Times Square.  This was a pretty cool experience to be able to see Times Square from above and to see some of the space where Nasdaq activity happens.

13501935_10101812733599236_2054776876333811135_n

After that action packed Monday, next was the conference itself!  The conference started off with a bang with CTO Eliot Horowitz announcing the roadmap for new 3.4 features including improvements to Compass (Explain plans, crud support, indexes and geo displays), read only views, recursive $lookup (joins), faceted search, decimal support, enhanced LDAP role support, and zone based sharding an improvement on the Tag Based Sharding that’s currently available.  Next came the Giant announcement, MongoDB Atlas, which is a MongoDBaaS offering straight from MongoDB.  These announcements were followed up by Adam Savage of MythBusters fame who talked about not being afraid to fail, a very inspiring talk about his journey in life.  The next two days were filled with amazing sessions.  I mostly attended ones on Automation using Docker, Kubernetes, Chef, Puppet, Open Stack and other automation tools as well as attending some on Microservices Architectures, ETL and MongoDB, Read Concern, Wired Tiger Performance, Financial Transactions and Version 2 of the BI Connector.

The MongoDB Innovation Awards were held during Tuesday Afternoon’s Keynote, many great companies were honored for their work with MongoDB and then came the biggest surprise of the conference me, I was honored as MongoDB Advocate of the Year! This was a huge honor and a true highlight in my career so far.  I was nominated for my work on the MongoDB Advocacy Hub, this blog, and beta testing work that I did for the 3.2 release.

13439216_10101813865595706_4252541583307986535_n

The MongoDB World After Party on Tuesday was headlined by famous 90’s Alr-Rock Band, They Might Be Giants at the Club Stage 48, they played a very nice sampling from their whole catalog and a great time was had by all in attendance!

MongoDB World ended with a celebration with Beers from Around the World!  This was a great metaphor for how MongoDB has a worldwide reach and is continuing to grow.

My final activity at MongoDB World was the MongoDB Customer Advisory Board (CAB).  The CAB is a collection of customers from all across the business world who give their input on MongoDB Roadmap items.  This was a great opportunity for me to give my opinion on the 3.4 features as well as help lend priority to items that MongoDB is looking to implement post 3.4.

Overall, this year’s conference was one of the best that I’ve ever attended, between the sessions, connections made and things to look forward to in future versions, I could not be more excited for what is up ahead for MongoDB and for the next conference.  Hopefully I can find a way to get to MongoDB Days Europe, if not, then MongoDB World 2017!

13615056_10101821000162976_2200178956672010466_n

MongoDB World and Masters Summit

MongoDB World 2016 is coming up quickly!  In a few short weeks I’ll be in NYC and learning a great amount about MongoDB and its ecosystem.  This year it’s June 28-29.  Also, new for me this year is I will be participating in the MongoDB Masters Summit which runs on June 27!

For those unfamiliar, the MongoDB Masters program is an annual program run by MongoDB to recognize and empower leaders in the MongoDB community.  The summit is held right before MongoDB World.  As this will be my first summit, I hope to be able to participate and contribute to lively discussions about MongoDB as well as learn what some of the other thought leaders in the MongoDB Community are working on.  I also hope to be able to tap in to some of the resources MongoDB plans to make available to masters such as speaking coaches, etc.  I’m sure they’ll also be some cool MongoDB Master’s SWAG too!

For the conference itself, there’s so much to be so excited about!  A great keynote lineup, a cool after party with They Might Be Giants, amazing sessions by both MongoDB Engineers and other fellow customers doing amazing stuff.  One amazing thing that MongoDB is also doing is to help change the ratio in technology by being not only inclusive of some of the underrepresented groups in technology but also promoting them with initiatives such as the Female Innovators and the Women Who Code Lounge Area and other awesome events.  Another cool part of the conference is seeing what MongoDB has in store for it’s next release.  Last year brought a lot of cool new stuff, I’m excited to see what they bring us this year.  Perhaps my favorite part of the conference is talking with other customers from all different backgrounds and trading stories about what they’re doing with MongoDB and how they’ve automated this piece or that piece of their deployment.

For the conference sessions I tend to gravitate towards the Operations Sessions, but they have Development Tracks, Internals Tracks, Next Gen Apps Tracks and Driver Tracks.  There’s literally something for everyone, no matter your level of expertise with MongoDB.  I can’t wait for this years conference and to see all the awesome things they have prepared for us!  If you’re going to be there, tweet at me while you’re there!  I’m @mikegray831 on twitter!

5 Easy Ways to Learn MongoDB

I often get asked how I was able to learn MongoDB so quickly and become a SME on it in a matter of months.  I’ve already covered Why we went with MongoDB and How MongoDB makes me a better technologist in previous blog posts, but the answer to how to get started with MongoDB covers a bit more then those two topics.  In this blog post, I plan to detail 5 easy ways to get started with MongoDB that helped me learn, so you can be creating apps using MongoDB or supporting it operationally as I do in no time at all.

  1. Read the manual.  No, seriously, the MongoDB Docs are a great way to learn the basics of MongoDB.  The docs are very detailed and offer great tutorials and examples.  Can’t remember syntax for a certain command?  The docs have it.
  2. Online Training.   This is a great way to learn MongoDB in a more structured format, and the best part, it’s free!  MongoDB University has classes for developers and DBA’s that go in to the finer details of using MongoDB and some more advanced courses that get even more nuanced.  The public MongoDB University courses are available during specific intervals with set deadlines.  If you’re fortunate enough to have an Enterprise Support license, the MongoDB University course are also available On Demand, which lets you run through them at your own pace.
  3. Webinars.  Another great free offering from MongoDB is there webinar series.  These webinars often dive deep on specific topics.  This can be great as the topics are variable as the use cases for MongoDB.
  4. Community.  The first 3 items I mentioned to help learn all come from MongoDB, this next one comes from the MongoDB Community.  The MongoDB Google Group is an amazing resource.  There you will see questions from other technologists, this is a great way to get exposed to the many different ways people are using MongoDB and questions that are being asked in the wild.  Additionally, you can attend a local MongoDB User Group (MUG)
  5. Social Media.  This is another great way to see what the Community is up to and what others are working on.  I suggest following the MongoDB Twitter Account of course and subscribing to the MongoDB Masters list (full disclosure:  I’m on that list) , from here you should get a quick idea of who the thought leaders are in the world of MongoDB and you can follow them and discover more MongoDB users and MongoDB Engineers.

So, these are 5 methods I used to learn MongoDB.  I hope you find them as helpful as I did!  Thanks as always for reading!

How MongoDB makes me a better technologist

In one of my earlier posts I explained Why we went with MongoDB.  In that post I touched on some of the ways that MongoDB has made things easier from an Operations perspective for me.

In this post I want to expand on that and also talk how using MongoDB has helped me become a better technologist overall.

  1. MongoDB makes operations easier, so you can focus on being better operationally.  With Ops Manager, operations such as backups, upgrades, deployments are all automated, this lets me focus on stuff beyond the basics.  Not having to worry about the basics has allowed me to spend time on automating even more, like automated restore scenarios to test out our backups, automating user provisioning and doing performance testing and other stress tests.  So, in essence, MongoDB’s use of automation helps put me in the automation mindset and allows me to automate more of my existing operations.
  2. Using the right tool for the right job.  As we all know, MongoDB has some use cases that it really shines in, and some that it does not.  Similarly, relational databases have use cases that they really shine in and some where they struggle.  Adding MongoDB to my toolbox really brought home the point to me that it really is about using the right tool for the right job.  We shouldn’t try to shoe horn everything in to relational databases, similarly we shouldn’t try to shoe horn a relational data model in to MongoDB, right tools for the right job.
  3. MongoDB makes High Availability easy.  With the Replica Set design, high availability is easily attained by MongoDB.  This design helped make it easy to plug MongoDB applications in to our existing applications and have them match (or beat) the HA goals that our legacy relational databases have.  This helps me by making me think of ways that we can make other databases as highly available as our MongoDB databases.
  4. MongoDB makes it easier to innovate.  MongoDB can be deployed to containers, the cloud, or your internal data centers in an automated fashion and is very easy to maintain.  This allows developers to quickly iterate between versions of their application and allows the database to be a key component to the application infrastructure without being a liability.  With the many drivers available, a developer can use their language of choice to interact with MongoDB.  Developers aren’t the only ones who can leverage these things to innovate, as a DBA I can use these to create internal applications that leverage MongoDB as the back end DB.  This has allowed me to code a lot more.
  5. MongoDB helps me stay agile.  Because of the frequent releases to production, MongoDB forces you to rethink your patching/upgrade strategy if you’re used to relational vendors where the patches come less often.  Fortunately with Ops Manager upgrading is easy, so it’s easy to upgrade to the latest version with no downtime to your application and support developers.

 

Not sure where to start with MongoDB?  Start where I started with the M102 course, introduction to MongoDB for DBA’s!

 

Thanks for reading!