Skip to content

Instantly share code, notes, and snippets.

@mathieue
Created November 27, 2023 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mathieue/790fcc0233edaa8934f6b069a1cbab4e to your computer and use it in GitHub Desktop.
Save mathieue/790fcc0233edaa8934f6b069a1cbab4e to your computer and use it in GitHub Desktop.
UpdateLogstashLogging.ps1
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$body = '{ "logger.logstash.inputs.jdbc" : "ERROR" }'
$url = 'http://localhost:9600/_node/logging?pretty'
$response = Invoke-RestMethod -Uri $url -Method 'PUT' -Headers $headers -Body $body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment