This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.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' |
NewerOlder