Skip to content

Instantly share code, notes, and snippets.

@scottames
scottames / manual-splunkforwarder-install.sh
Last active January 31, 2024 01:03
Remote install splunk forwarder
#!/bin/bash
# server to install / configure splunkforwarder on (required)
SERVER=$1
# username to ssh with, default to current user (optional)
USERNAME=${2:-"$(id -u -n)"}
#NOTE: change the specifics of the function to match your environment, i.e. anything wrapped in <>
function install-splunk-forwarder () {
@scottames
scottames / VictorOps_Alert.ps1
Last active June 11, 2021 16:29
Microsoft System Center Operations Manager (SCOM) - VictorOps Alerting
<#
.SYNOPSIS
VictorOps Alerting from Microsoft System Center Operations Manager (SCOM) through PowerShell
Call this script from SCOM's command notification channel - be sure to update the API key (parameter #2). See Example for usage.
.DESCRIPTION
Post alerts to VictorOps from Microsoft System Center Operations Manager (SCOM) through PowerShell
.EXAMPLE
FULL PATH OF THE COMMAND FILE: C:\windows\system32\WindowsPowerShell\v1.0\powershell.exe
COMMAND LINE PARAMETERS: "C:\scripts\VO_Send-Alert_Test.ps1" '"$Data[Default='Not Present']/Context/DataItem/AlertId$"' '"$RoutingKey"' '"api-key"'
# !Change $RoutingKey to the routing key you would like to pass in or remove it alltogether to default to 'everyone'