2 of 2 people found this helpful
While not overly familiar with bash it looks like the script is missing an exit code.
This guide may help understand how to format the required outputSAM Script Component Monitors - Everything you need to know I would also take a look at Linux/Unix Script Monitor
Borrowed from TCP Port Status using Bash Scripting and Return Reverse Status (Linux/Unix Platform) here is what a typical script looks like.
Thanks for the insight, what you've suggested was correct. I've added the Exit 1 to the end of the script and I would get this error message
Testing on node '172.xxx.xxx.xxx' failed with 'Down' status ('Down' might be different if script exits with a different exit code).
But I get this error when I've entered Exit 0
Exit codes determine if the monitor is up or down.
Exit 0 is up and will count the statistics, Exit 1 is down, period.
If you want to return alternative statistics you should still do exit 0 and then return various counts/statistics and then you can make it warning/critical based on thresholds. I believe there's more in the admin guide, but it's touched on briefly here as well:
1 of 1 people found this helpful
It looks like you're executing curl, but not capturing the output. This likely means that the output is being sent to SolarWinds, resulting in the error that is being shown. Does the output from the curl command return formatted data that SolarWinds is expecting? If not, and all you are doing is executing the command to "do stuff", then I'm not sure SolarWinds is what you're really after. Do you have a sample of the output returned by the curl command?
As a side note, -k in curl is "allow insecure", meaning it won't validate the SSL certificate on the connection, for example self-signed. As you're using http:// for your connection, that option really doesn't impact the request, as it only applies to TLS/SSL connections (https:// ftps:// etc).