Skip to content

Instantly share code, notes, and snippets.

View rbocchinfuso's full-sized avatar

Richard Bocchinfuso rbocchinfuso

View GitHub Profile
@rbocchinfuso
rbocchinfuso / check_vnx.ps1
Last active July 25, 2018 13:51
PRTG VNX Custom Sensor
#requires -version 2
<#
.SYNOPSIS
PRTG VNX Check Script
.DESCRIPTION
This is a custom EXEXML script which is invoked by PRTG
.PARAMETER <Parameter_Name>
-h [SP_IP] -u [username] -p [password]
.INPUTS
None
@rbocchinfuso
rbocchinfuso / check_vm_snaps.ps1
Last active March 8, 2018 12:31
PowerShell script to check for VM snapshots and send Email report
# PowerShell script to check for VM snapshots and send Email report
add-pssnapin VMware.VimAutomation.Core
Connect-VIServer -Server 'vcenter' -User 'domain\user' -Password 'password'
# HTML formatting
$a = "<style>"
$a = $a + "BODY{background-color:white;}"
$a = $a + "TABLE{border-width: 1px;border-style: solid;border-color: black;border-collapse: collapse;}"
$a = $a + "TH{border-width: 1px;padding: 5px;border-style: solid;border-color: black;foreground-color: black;background-color: LightBlue}"
@rbocchinfuso
rbocchinfuso / xsnap.pl
Created March 5, 2018 19:52
sbd-xsnap
#!/usr/bin/perl
# ----------------------------------------------------- #
# SUMMARY:
# This script provides REST integration with EMC arrays.
#
# EXIT CODES:
# 0 --> Completed successfully
# 1 --> Invalid usage, server parameter required
# 2 --> Configuration files missing
@rbocchinfuso
rbocchinfuso / SlackIncidentEscalateNotify.js
Last active October 5, 2017 19:09
ServiceNow Escalate Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow Escalate Incident Slack Notification
// Business Rule
// SlackIncidentEscalateNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
//var inc ='####'; // add incident sys_id you wnat to use for debugging
//var current = new GlideRecord('incident');
//if (current.get(inc)) {
@rbocchinfuso
rbocchinfuso / SlackIncidentNewNotify.js
Last active October 5, 2017 18:48
ServiceNow New Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow New Incident Slack Notification
// Business Rule
// SlackIncidentNewNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
// var inc ='####'; // add incident sys_id you wnat to use for debugging
// var current = new GlideRecord('incident');
// if (current.get(inc)) {
@rbocchinfuso
rbocchinfuso / SlackIncidentAssignNotify.js
Last active October 5, 2017 18:40
ServiceNow Assigned Incident Slack Notification #servicenow #slack #businessrule
// ServiceNow Assigned Incident Slack Notification
// Business Rule
// SlackIncidentAssignNotify.js
// Rich Bocchinfuso - 2017/05/10
// debug only
//var inc ='####'; // add incident sys_id you wnat to use for debugging
//var current = new GlideRecord('incident');
//if (current.get(inc)) {
@rbocchinfuso
rbocchinfuso / SlackMessage.js
Last active October 5, 2017 18:01
ServiceNow SlackMessage #servicenow #slack #scriptinclude
// ServiceNow Slack Message
// Script Include
// SlackMessage.js
// Rich Bocchinfuso - 2017/05/10
var SlackMessage = Class.create();
var iconurl = 'http://www.gb-advisors.com/wp-content/uploads/2016/06/servicenow-sm-icon.png';
var emoji = ':warning:';
var channel = '#test';
@rbocchinfuso
rbocchinfuso / zfs.mig
Last active August 15, 2017 19:29
zfs migration process
Create source and target zfs pools for testing
sourcepool is a raidz1 stripe comprised of 4x1GB volumes and targetpool is a single 5GB device
[ root@unknown:/ ] $ zpool create sourcepool raidz1 c1t0d0 c1t1d0 c1t2d0 c1t3d0
[ root@unknown:/ ] $ zpool create targetpool c1t4d0
Check pools after creation
[ root@unknown:/ ] $ zpool status -v sourcepool
pool: sourcepool
@rbocchinfuso
rbocchinfuso / vnxsnap.bat
Created September 9, 2014 19:09
Simple EMC VNX Snap Script
@echo off
rem VNX Snapshot Script
rem vnxsnap.bat
rem Rich Bocchinfuso 2014-09-09
rem set variables
set ver=0.1
set cmd=vnxsnap
set spa=10.12.3.17
set spb=10.12.3.18
#!/usr/bin/php
<?php
/*
ssUpdate
MIT License