Ansible as remote executor in a Puppet environment

Ansible as remote executor in a Puppet environment

Advertisements

Check_MK MRPE

Check_mk provides a nice way to migrate your old NRPE based checks into Check_mk using MRPE

Although the documentation of MRPE is very comprehensive but today I messed the whole day with small issue.

I had written small script which  can connect to another host by ssh and collect some facts. The problem started when I was using the same command two times with different parameters.

e.g. check my mrpe.cfg

[root@appmon2 tmp]# cat  mrpe.cfg

### Just a Test

TEST1 ./test.sh ALL

TEST2 ./test.sh COLO

so despite I have defined two services , check_mk_agent is recongnizing only one,

[root@tiber tmp]# check_mk_agent

<<>>

(test.sh) TEST1 0 OK: ALL is Green

The whole issue was in the script test.sh I have used ssh to connect to remote host and which is causing the issue.

To fix this need to append the

[root@tiber tmp]# diff test.sh test1.sh
52,53c52
> /tmp/juned.txt

>      
> /tmp/juned.txt
And now check_mk_agent is happy

<<>>

(test.sh) TEST1 0 OK: ALL is Green

(test.sh) TEST2 0 OK: app is Green

Dashing – Sinatra based dashboard

Being in Ops team, we require Dashboard all the time with lots of metrics , we have quite lots of Ops tool chain in production and each individual tool has its own home page which serves as its own dashboard. E.g.

  1. Check_Mk
  2. Jenkins
  3. Ganglia
  4. Memcached
  5. Mysql 
  6. graphite
  7. and lots of custom metrics dashboard built in PHP 
But we wanted a single unified Dashbord which level 1 team can watch infact presented on TV screen so that any one in the team can have glance of it. The dashboard should be simple and catchy so that the metrics can be easily seen.
Enter Dashing 

Dashing is a Sinatra based framework that lets you build beautiful dashboards.
Check out a demo over hereHere’s another one, optimized for 1080p screens.
Key features:
  • Use premade widgets, or fully create your own with scss, html, and coffeescript.
  • Widgets harness the power of data bindings to keep things DRY and simple. Powered by batman.js.
  • Use the API to push data to your dashboards, or make use of a simple ruby DSL for fetching data.
  • Drag & Drop interface for re-arranging your widgets.
  • Host your dashboards on Heroku in less than 30 seconds.
This project was created at Shopify for displaying custom dashboards on TVs around the office.

Dashing is pretty simple to setup ( check their web site ) but the real power is its widgets which can be easily extented to any level and lots of Additional-Widgets are also available.

I have easily set up few dashboard’s in Dashing , the cool thing is the data can be made available to widgets either push or pull way. So if you something already setup to collect the metrics you can just push the data to Dashing widget and easily seen in Dashboard.

Monitor Failed Jenkins Job

We use Jenkins quite differently 🙂 ( I will write it the use case later ) , And although the Jenkins provides the Email alerting if the Job is unstable. But  in our scenario we wanted an aggregate Job monitoring for the jenkins job so that as soon as any of the Jenkins Job failed our level team got hold of it.

Below is the simple Python plugin I have written  to achieve this. This python script gets all jobs stats using the Jenkins API and then parses for the stability of the Job.