Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
MY_NAGIOS_HOSTNAME="http://<insert_nagios_here>"
SLACK_SERVICE_URL="https://hooks.slack.com/services/aaaaaa/aaaaa/aaaaaaa"
if [[ "${NAGIOS_SERVICEOUTPUT}" == *"CRITICAL"* ]]
then
COLOR="danger"
elif [[ "${NAGIOS_SERVICEOUTPUT}" == *"OK"* ]]
then
@wilsontayar
wilsontayar / nginx.conf
Last active August 29, 2015 14:06 — forked from rodolfofadino/nginx.conf
nginx.conf file optimized for nginx 1.7.4 with the pagespeed module installed
worker_processes 5;
worker_rlimit_nofile 300000;
pid /var/run/nginx.pid;
events {
worker_connections 10540;
# multi_accept on;
}
Import-Module NetworkLoadBalancingClusters
$CopyOrigin="C:\inetpub\wwwroot\xxxx"
$TimeOut=5
$Servers = New-Object System.Collections.ArrayList
$Servers.Add(@{Ip="xxx.xxx.xxx";Path="E:\xxxx";Urls=("/","/appx")})
$Servers.Add(@{Ip="xxx.xxx.xxx";Path="F:\xxxx";Urls=("/","/appx")})
$Servers.Add(@{Ip="xxx.xxx.xxx";Path="G:\xxxx";Urls=("/","/appx")})
@wilsontayar
wilsontayar / newRelicDeploy.ps1
Last active December 30, 2015 05:48 — forked from kfrancis/gist:3164709
Fast way to send a deploy to New Relic using PowerShell. Just throw curl (http://curl.haxx.se/download.html) inside your %WINDIR%\system32 folder and [C:\newRelicDeploy.ps1 -User "John Doe" -Revision "v.6.6.6.0" -Changelog "list of changes in this version"].
param([String] $User, [String] $Revision, [String] $Description, [String] $Changelog)
$appID = "<your app id here>"
$apiKey = "<your api key here>"
"Sending deploy to New Relic API..."
$command = "curl -k -H 'x-api-key:$apiKey' -d 'deployment[application_id]=$appID' -d 'deployment[description]=$Description' -d 'deployment[revision]=$Revision' -d 'deployment[changelog]=$Changelog' -d 'deployment[user]=$User' https://api.newrelic.com/deployments.xml"
Invoke-Expression $command