Skip to content

Instantly share code, notes, and snippets.

View junaid18183's full-sized avatar

Juned Memon junaid18183

View GitHub Profile
@junaid18183
junaid18183 / Readme
Last active August 22, 2019 16:25
Dashing Widget For Hadoop DFS Stats
This widget creats the dashing dashboard for Hadoop DFS stats.
There is Job which parses the hadoop DFS status page and provides the below widget_event_id's
#Configured_Capacity
#DFS_Used
#Non_DFS_Used
#DFS_Remaining
#DFS_Used%
#DFS_Remaining%
#Block_Pool_Used
@junaid18183
junaid18183 / hadoop-jobs.erb
Last active August 29, 2015 14:05
Dashing Widget for hadoop_job_tracker_stats
<% content_for :title do %>Hadoop dashboard<% end %>
<div class="gridster">
<ul>
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
<div data-view="Clock"></div>
<i class="icon-time icon-background"></i>
</li>
<li data-row="2" data-col="1" data-sizex="1" data-sizey="1">
@junaid18183
junaid18183 / haproxy_socat
Last active November 4, 2020 09:29
Haproxy stats with Socat
#Source - http://www.haproxy.org/download/1.5/doc/configuration.txt
# Section - 9.2. Unix Socket commands
#show stat [<iid> <type> <sid>]
# Dump statistics in the CSV format. By passing <id>, <type> and <sid>, it is
# possible to dump only selected items :
# - <iid> is a proxy ID, -1 to dump everything
# - <type> selects the type of dumpable objects : 1 for frontends, 2 for
# backends, 4 for servers, -1 for everything. These values can be ORed,
# for example:
@junaid18183
junaid18183 / jenkins_check.py
Last active August 29, 2015 14:06
Nagios Plugin for Jenkins Overall Job's
#! /usr/bin/env python
#---------------------------------------------------------------------------------------------------------------
# Author:
# Juned Memon <[email protected]>
# This is a simple Nagios plugin to check if any of the defined Jenkins Job is getting failed.
#---------------------------------------------------------------------------------------------------------------
#Imports
import urllib2,sys,re,simplejson
#---------------------------------------------------------------------------------------------------------------
#Variables
@junaid18183
junaid18183 / jenkins_overall_jobs_stat.coffee
Last active August 29, 2015 14:06
Dashing Widget for Jenkins Overall Job's status
class Dashing.JenkinsOverallJobsStat extends Dashing.Widget
@accessor 'all_jobs', Dashing.AnimatedValue
@accessor 'failed_jobs', Dashing.AnimatedValue
@accessor 'disabled_jobs', Dashing.AnimatedValue
@accessor 'notbuilt_jobs', Dashing.AnimatedValue
@accessor 'arrow', ->
if (@get('failed_jobs') == 0 ) then 'value-up icon-caret-up' else 'icon-caret-down'
ready: ->
# This is fired when the widget is done being rendered
@junaid18183
junaid18183 / nagios_agent_install.sh
Created September 10, 2014 08:30
Nagios_agent_install Steps
#! /bin/bash
# Step 1 --> Nagios plugins Installation
# add Nagios User with not shell access
useradd -s /sbin/nologin nagios
echo "user Nagios Added" >> /tmp/nagios_plugin_install.log
# Create a direcory at /root/nrpe to hold the Nagios plugin and Nrpe downloads; Download the Nagios Plugins
@junaid18183
junaid18183 / Check_MK_Agent_Solaris
Created September 10, 2014 08:32
Check_MK_Agent installation on Solaris
chmod 644 /etc/inet/services
tail -1 /etc/inet/services
check_mk 6556/tcp snmp # CheckMk
tail -1 /etc/inet/inetd.conf
check_mk stream tcp nowait root //usr/sfw/sbin/tcpd /usr/bin/check_mk_agent
inetconv
@junaid18183
junaid18183 / line_regex.yml
Created February 13, 2015 10:26
Ansible with Regex to change the lines
---
- name: Deploy dbserver
hosts: all
user: root
pre_tasks:
vars :
- Dest : /etc/ansible/facts.d/sojourner.fact
@junaid18183
junaid18183 / apache_process_size.sh
Created April 6, 2015 10:52
Determine an average amount of memory consumed by one Apache process to define the MaxClients in prefork MPM
#Ubuntu
#ps -ylC apache2 | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
#centos
ps -ylC httpd | awk '{x += $8;y += 1} END {print "Apache Memory Usage (MB): "x/1024; print "Average Proccess Size (MB): "x/((y-1)*1024)}'
Pragma: akamai-x-cache-on, akamai-x-cache-remote-on, akamai-x-check-cacheable, akamai-x-get-cache-key, akamai-x-get-extracted-values, akamai-x-get-nonces, akamai-x-get-ssl-client-session-id, akamai-x-get-true-cache-key, akamai-x-serial-no