Skip to content

Instantly share code, notes, and snippets.

@scr512
scr512 / send_user_quota_to_carbon.py
Created July 30, 2019 19:27
Send Isilon directory quota usage details to Graphite for visualization
#!/usr/bin/env/python
# Version: 2.3.1
# Author: Jason Davis
# Date: 08/09/2018
# Purpose: Send Isilon directory quota usage details to Graphite for visualization
#----------------------------------------------------------------------------------------------------------------------------------------------
# Changes:
# Setup to grab user quotas
# Replacing "/" with "_" as a delimiter was kinda a bad idea. Using "." which is more standard with Graphite metric naming.
# That last logic change was kinda crudely implemented. We shouldn't assume that each quota has a hard threshold and assign a value of 0.
@scr512
scr512 / Disable-SSLValidation.ps1
Created August 17, 2017 14:31
@mattifestation's SSLValidation PoSH script
function Disable-SSLValidation{
<#
.SYNOPSIS
Disables SSL certificate validation
.DESCRIPTION
Disable-SSLValidation disables SSL certificate validation by using reflection to implement the System.Net.ICertificatePolicy class.
Author: Matthew Graeber (@mattifestation)
License: BSD 3-Clause
.NOTES
{
"id": 2,
"title": "Isilon Storage Dashboard",
"originalTitle": "Isilon Storage Dashboard",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": true,
@scr512
scr512 / gist:3763359be532772f9b2e
Created February 27, 2016 06:39
Docker example to build Cyclotron (Why am I putting this in a Gist? :])
#Dockerfile
FROM phusion/baseimage:latest
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
RUN echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
RUN apt-get update
RUN apt-get install -y build-essential git mongodb-org supervisor curl wget nginx
RUN curl -sL https://deb.nodesource.com/setup | sudo bash -
RUN apt-get install -y nodejs
RUN npm install -g npm@latest
@scr512
scr512 / gist:f6010726739a23b1662d
Last active August 2, 2016 20:47
Cyclotron (https://github.com/ExpediaInceCommercePlatform/cyclotron) Table Dashboard example consuming SyncIQ policy reporting and calculating lag time.
{
"dataSources": [{
"name": "Your Isilon Cluster SyncIQ Report",
"options": {
"auth": {
"pass": "<password>",
"user": "<username>"
},
"strictSSL": false
},
@scr512
scr512 / gist:3633d773625f899c127d
Created February 27, 2016 06:29
Cyclotron (https://github.com/ExpediaInceCommercePlatform/cyclotron) Data Source example grabbing SyncIQ policy reporting
{
"name": "Your Isilon Cluster SyncIQ Report",
"options": {
"auth": {
"pass": "yourrootpasswordhere",
"user": "root"
},
"strictSSL": false
},
"postProcessor": "pp = function (data) {\n\n var new_data = _.map(data.reports, function(row) {\n \n return {\n name: row.policy.name,\n state: row.state,\n start_time: row.start_time,\n end_time: row.end_time,\n duration: row.duration,\n };\n });\n\n return _.compact(new_data);\n}",
@scr512
scr512 / gist:cc4790fe650672a9a55e
Created February 27, 2016 06:25
Cyclotron (https://github.com/ExpediaInceCommercePlatform/cyclotron) Table Dashboard example consuming SyncIQ status data
{
"duration": 10,
"frequency": 300,
"layout": {
"gridColumns": 1,
"gridRows": 1,
"scrolling": false
},
"name": "SyncIQ details",
"widgets": [{
@scr512
scr512 / gist:cca8e1d90a43869839ed
Created February 27, 2016 06:23
Cyclotron (https://github.com/ExpediaInceCommercePlatform/cyclotron) Data Source example grabbing SyncIQ status
{
"name": "Your Isilon Cluster SyncIQ",
"options": {
"auth": {
"pass": "yourrootpasswordhere",
"user": "root"
},
"strictSSL": false
},
"postProcessor": "pp = function(data) {\n return(data.policies);\n};",
@scr512
scr512 / gist:656dcbecf54713c70d61
Created February 27, 2016 06:09
Generate heat output and look for obvious bad behavior (Workflows trying to write to a single file from many nodes or areas of hot namespace writes)
isi statistics heat --class write,namespace_write --orderby class >> /ifs/admin/scripts/stat/stats/heat_`date +"%d-%m-%y_%H-%M"`.txt
awk '{print $4,$5}' /ifs/admin/scripts/stat/stats/heat_`date +"%d-%m-%y_%H"`-*.txt | sort | uniq -c | sort -k 1 | less
@scr512
scr512 / isilon_stats.sh
Created February 27, 2016 06:03
Dumping Isilon (OneFS) stats in a text format for later analysis.
#!/bin/zsh
#The intent of this script is to be called from a cron job every 5 or 10 minutes on an Isilon node.
#Dumps a bunch of text based stats to a rotating log file every 24 hours. This is useful for troubleshooting purposes.
#Let's first look and see if we have a stuck execution of the script. If the lock is older than 10 minutes we'll kill the PID and cleanup the lock.
find /tmp/nfs-stat.lck -mmin +20 -exec kill -9 `cat /tmp/nfs-stat.lck` {} \;
find /tmp/nfs-stat.lck -mmin +20 -exec rm -rf /tmp/nfs-stat.lck {} \;
lockfile=/tmp/nfs-stat.lck