Hello Guys,
i created a powershell script that calls an API and returns when the metric "valor" is different from 1, But i am receiving an error in solarwinds
# Definir a URL da API
$URL = "">10.80.74.58/.../falha_remota.php" # Substitua pela URL real
# Fazer a requisição e obter os dados
$response = Invoke-RestMethod -Uri $URL -Method Get
# Verificar se há dados e processar apenas os valores diferentes de 1
if ($response) {
foreach ($item in $response) {
if ($item.valor -ne 1) {
Write-Host "Modulo: $($item.modulo_id), Valor: $($item.valor)"
}
}
}

