Skip to content

Instantly share code, notes, and snippets.

View opsmekanix's full-sized avatar

Adam Faris opsmekanix

View GitHub Profile
@opsmekanix
opsmekanix / sensu_dashboard_overview.md
Last active July 7, 2016 05:46
javascript example of creating simple sensu client dashboard
Recently I've been working with Sensu and learning how awesome it is to have collected data available from
Sensu's built-in API. While building an internal dashboard by embedding graphite graphs into a xwiki page this afternoon, I
thought why not add a [stashboard](http://www.stashboard.org) like block element to the dashboard as I have API access to the
Sensu data. Stashboard is something I've always admired for it's and ability to display status to an audience that doesn't
care about details, (PMs, Management, End-Users). After all, `imatation is the sincerest form of flattery` and how hard is
it to hack a little javascript?
Did I mention this is my first attempt at manipulating the DOM with javascript? :) While simple_dash.html works, it needs a
bit of updating. For one thing I wasn't able to capture the essence of stashboard, as there's too much detail in my output.
But I was successful in drawing a table of dots which change color based on Sensu node history. After being unable to

Keybase proof

I hereby claim:

  • I am opsmekanix on github.
  • I am afaris (https://keybase.io/afaris) on keybase.
  • I have a public key ASCZ68FsGQLMh9FBZ6EnKXj0-zQdi3SfpDIucdlQgs9LoQo

To claim this, I am signing this object:

@opsmekanix
opsmekanix / gist:5a35693f3dda46688eabfff80de702ff
Created July 7, 2016 06:32
haproxy frontend loadbalancer for hadoop httpfs

overview

The httpfs gateway is a proxy that allows users to read & write data using webhdfs. The benefit is httpfs behaves as a choke point by preventing access to the namenode and datanode ports. While looking into load issues for a single httpfs gateway, I started thinking why can't we bring up multiple httpfs gateways and put a layer7 load balancer in front?

process

To experiment, I downloaded an apache hadoop 2.7.1 binary package and followed the single node pseudo distributed node instructions to get a cluster running on my Mac. My next step was to add hadoop proxy settings for the httpfs gateway to core-site.xml. For example:

  <property>
    <name>hadoop.proxyuser.root.hosts</name>
    <value>*</value>