Panamax just released from Lucas Carlson and his team at CenturyLink Labs. They’ve created a contest for putting together the best Panamax templates, with various categories being judged. They’re giving over $100,000 worth of prizes. Definitely check it out when you have a chance! Today is the last day to submit!
I had recently talked about using cAdvisor to monitor Docker containers. But as I mentioned, running cAdvisor provides ephemeral data for your containers. For this data to be truly valuable, it needs to be logged in a database. And once we have that data logged in a database, wouldn’t it be nice to view it in a nicely charted graph? My thoughts exactly 🙂
The power of Panamax comes from application templates. Templates are similar to fig files, but once you define your application template it can be shared with anyone. You can even search the database to find publicly available templates built by others. Now all of your hard work configuring and tweaking each of your images won’t be in vain. You just have to get it working once, and now you can reproduce the exact same technology stack on demand.
cAdvisor doesn’t record data historically. We modified it so that when it’s first launched with a Docker link it will automatically connect to InfluxDB and use it as its datastore backend.
Our modified version of cAdvisor saves the step of having to normally pass flags from cAdvisor to InfluxDB to connect the two.
Why use Grafana? Doesn’t InfluxDB have an interface? Grafana let’s us store our searches, and display the results in pretty looking graphs.
So the first step is to fire up Panamax. You can find the install directions here.
Get started with:
Once it has successfully launched, a new browser window will be automatically opened to:
Now we need to load the proper source repositories. Just click on the Manage tab and type in the repository name.
We’ll be adding:
Next we’re going to set up our ports. We’ll be forwarding our virtual box ports to match the ports ElasticSearch, Grafana, and InfluxDB listen on.
I’ll launch virtualbox by just typing in the terminal:
From there click on the little green + icon and we’ll be adding in three port mappings:
Once you’re done it should look like this:
Now that we’re all setup, we’ll head back over to our browser where we have Panamax running. Now we have to search and find the template that I created. It’s called
Go ahead and click on
You’ll be taken to the Application Services Dashboard. Another neat aspect of Panamax is the ability to drag and drop services into different categories that you can custom name.
I went ahead and assigned InfluxDB to Database, cAdvisor to Application, ElasticSearch to Analytics and Grafana to Frontend.
We’re going to mouse over Grafana and click on the little magnifying glass on the right-hand side.
From here we can see which port our service is listening on.
Scrolling down on the right hand side, we can see all of the passwords for each of our services. Make sure to take note of the Grafana username and password.
Next we’re going to access Grafana. Go to your web browser and type in:
You’ll be prompted for your Grafana username and password. Once you successfully login you’ll be brought to Grafana’s Dashboard. The dashboard may not initially show up and the screen will remain blank. If this happens just hit refresh on your browser and it should pop right up.
Let’s test to see if Grafana is collecting data. Click on the name of the graph, it should be
Graphite test, and from the dropdown select
Click on the
Series field and select
stats, click on
(value) and choose which data you’d like to view. Soon enough your graph will become populated with the data cAdvisor is collecting.
I hope you found this helpful! If you have any questions make sure to check out the readme file, and feel free to ask me any questions here!