Chris's Blog

Devops Shokunin

Mcollective Use Case – Operational Dashboard

Comments Off on Mcollective Use Case – Operational Dashboard

I’ve been asked a few times about use cases for mcollective.

 

One of the biggest wins at my company has been using mcollective to build “Oppy” an operational dashboard. Oppy allows developers and support staff to perform deploys on staging servers as well as to audit and monitor client environments in real time. ¬†Developers and Support staff do not have access to production or staging environments for a variety of reasons, so it was necessary to provide a tool that could quickly and efficiently provide all of the information and access that these teams require.

 

 

 

Capabilites

  1. Deployment – Developers can deploy code to staging environments by connecting to an mcollective agent that installs the latest gem packaged version of our software, cleans out the old versions and restarts the application.
  2. Auditing – Support and Developers can run auditing scripts on all nodes in a certain class and check to make sure that software versions, monitoring settings and software settings are as expected.
  3. Corrective Actions – Support and Developers can flush the varnish caches by triggering a run of a varnish agent or reset the application on demand.
  4. Debugging – Developers can run an agent to turn on debug logging for the application and collect the logs by pulling them from the centralized logging server.

 

 

Stack

Oppy was built on top of Sinatra, which allows for extremely rapid development of basic web applications.   A simple example of using Sinatra to run mcollective agents is on my Github account.

The above screen shot is the results of running the nrpe agent, which runs every single monitoring check on a group of hosts and reports back.

All actions are logged, so that there is an audit trail

 

Dashboard Example with Sinatra and Mcollective

Comments Off on Dashboard Example with Sinatra and Mcollective

Having a dashboard to provide real time data to users helps minimize interruptions at work.

The combination of Sinatra handling the incoming HTTP requests and Mcollective pulling real time data from the infrastructure provides the responsiveness and self-service that saves everyone time and effort.

The example code is available on Github

Here are the screen shots running on my internal network.

Welcome Screen

Filtering Form

Results from Monitoring Agent

Results from Puppetd Agent