Item: url.statuscode[{#DESCRIPTION}] Trigger: {Template App IIS - Site Checks:url.statuscode[{#DESCRIPTION}].last()}<>{#RESPONSE}
This file contains hidden or 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
# Show requests from IE on XP | |
index=* AND cs_User_Agent=*| eval windows_xp_and_ie=if(match(cs_User_Agent,".*MSIE.*5.1.*"),"TRUE","FALSE") | stats count by windows_xp_and_ie |
This file contains hidden or 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
if(!$credential){ | |
$credential = Get-Credential | |
} | |
$baseurl = 'http://zabbix.global.root' | |
$params = @{ | |
body = @{ | |
"jsonrpc"= "2.0" | |
"method"= "user.login" | |
"params"= @{ | |
"user"= $credential.UserName |
This file contains hidden or 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
index=_internal source=*license_usage.log type="Usage" splunk_server=* | timechart span=1d eval(round(sum(b)/1024/1024/1024,5)) as GB | sort _time |
This file contains hidden or 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
$tests = Get-Content "%teamcity.build.checkoutDir%\TeamCity-Build-Agents.tests.ps1" | Out-String | |
$scriptblock = { | |
param($script) | |
$scriptFile = "$env:temp\TeamCity-Build-Agents.tests.ps1" | |
Set-Content $scriptFile -Value $script | |
Invoke-Pester -Script $scriptFile -PassThru 6> $null 2> $null | |
} | |
$BuildAgents = @( | |
'tc-buildagent-01', |
This file contains hidden or 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
$zone = gc .\fmlocal.zone | ?{$_ -notmatch '(^;|^-|^\s*$|^@|^\$|^\s+)'} | %{$val = $_ -split '\s+'; new-object psobject -Property @{"Name"=$val[0];"Value"=$val[3] }} | |
foreach($record in $zone) { | |
$nslookup = $(nslookup "$($record.name).fmlocal" 2>&1 | out-string) | |
$matches = @(); | |
$nslookup -match '(?smi)(?<Name>Name:.*)(Address:\s*)(?<Address>[0-9\.]*)' | Out-Null | |
if(!$matches){ | |
$record | select *,@{L="Resolvable";E={$false}}, @{L="Resolved Address";E={$null}} | |
}else{ | |
$record | select *,@{L="Resolvable";E={$true}}, @{L="Resolved Address";E={$Matches.Address}} |
This file contains hidden or 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
if(!$creds){ | |
$creds = get-credential | |
} | |
$url = "http://zabbix.example.com" | |
$payload = @{ | |
jsonrpc = "2.0" | |
method = "user.login" | |
params = @{ | |
user = $creds.UserName |
This file contains hidden or 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
function New-EphemeraSecret{ | |
param( | |
[string]$Secret, | |
[string]$EphemeraURl = "http://ephemera.sdlsecuritycentre.com" | |
) | |
$EphemeraConfig = Invoke-WebRequest -Uri "$EphemeraURL/js/frontend_config.js" -UseBasicParsing | |
$EphemeraConfig.Content -match "apiURL = '(.+?)';" | Out-Null | |
$EphemeraAPIURL = $Matches[1] | |
$Payload = @{secretText = $Secret} | ConvertTo-Json |
This file contains hidden or 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
function Get-AWSAccountLimits { | |
param( | |
$region | |
) | |
$ASGAccountLimits = Get-ASAccountLimits -region $region | |
$MaxNumberOfAutoScalingGroups = @{ | |
AccountQuotaName="MaxNumberOfAutoScalingGroups"; | |
Max=$ASGAccountLimits.MaxNumberOfAutoScalingGroups; | |
Used=$ASGAccountLimits.NumberOfAutoScalingGroups | |
} |
This file contains hidden or 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
$Uri = "http://192.168.1.1:7878/api/" | |
$headers = @{ | |
'x-api-key' = "" | |
} | |
$Movies = Invoke-RestMethod -Uri "$Uri/movie" -Headers $headers -Method Get | |
$KnownQualities = $Movies.MovieFile.quality.quality | select -Unique id,name |