Well apparently I posted the examples in the wrong thread. Sorry fo that.. you can find them here:
https://support.nagios.com/forum/viewto ... 5&start=10
Example 01: Bash curl
Code: Select all
curl --data 'api_key=cb7262269da487e256d1blabla8269142' --data 'hostname=servername' --data 'version=0.4.1.105' --data 'type=legacy' http://reactorserver/nagiosreactor/index.php/api/eventchain/143/run
Example 02: Powershell v2
Code: Select all
$webc = New-Object net.WebClient
$param = New-Object system.Collections.Specialized.NameValueCollection
$param.Add('api_key', '640b1f5cblabzkdnapzjdpojadpojdazpoj1809')
$param.Add('hostname', 'servername')
$param.Add('software', 'NSClient')
$param.Add('version', '0.4.1.105')
$param.Add('type', 'legacy')
$ba = $webc.UploadValues('http://reactorserver/nagiosreactor/index.php/api/eventchain/143/run', 'POST', $param)
$xml = [xml]([char[]]$ba -join '')
Example 02: Powershell v3
Code: Select all
$postParams = @{api_key='zdjazpodjapojdoazjdaojzd8269142';hostname='servername';version= '0.4.1.105';type= 'legacy'}
Invoke-WebRequest -Uri http://reactorserver/nagiosreactor/index.php/api/eventchain/143/run -Method POST -Body $postParams
So once you create a chain, you can re-use it from anywhere.