Applications Systems
HTTP/HTTPS SAM Monitors Not Working
Helps to remediate issues with the SAM component monitor HTTP/HTTPS monitor. Suggests settings to change to ensure the monitor works correctly. Search string not found. HTTPS monitor doesn't work. HTTP 200. Request succeeded. Network connection failed. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. access denied. 500 internal server error. 401 Unauthorized. Network connection failed.
First published date
Last published date
Overview
Addressing a few of the most common errors produced by this monitor, including:
- Search String not found
- Network Connection failed
- The underlying connection was closed
- Could not establish trust relationship for the SSL/TLS secure channel
- Access denied
- 401 Unauthorized
- 500 Internal Server Error
- Network connection failed
Product section
Cause
- Improper setting on the component monitor.
- Search string is not found.
- Site is down unreachable from the SolarWinds server.
- Site is not reachable from agent server (if applicable).
- Blocked ports.
Resolution
Preliminary Component Setting Check
- Verify that the URL field is correct. Do not use the given ${IP} variable if necessary. Simply place the exact url in the URL field.
- Verify that 'Follow Redirect' is off. Most cases you will want to have this setting turned off.
- Verify you have not unintentionally placed a search string in the search string input field. For initial testing purposes, it is recommended to remove search strings from this settings.
Additional tests
Use Powershell command Invoke-WebRequest
Invoke-WebRequest -Uri http://google.com -UseBasicParsing | Select -ExpandProperty StatusCode
replace the url with your url to test the status code returned.
Navigate to the website in IE or Google Chrome and open the developer tab (F12 key). Move to the network tab within developer tools to analyze the website status codes.
More Information
If using a proxy, check the proxy specific article - HTTP/HTTPS Monitor Failed: (403) Forbidden
It is important that you use an HTTP monitor with HTTP sites. And the HTTPS component monitor for HTTPS sites. These are two distinct component monitors within SAM. Incorrectly using one can cause errors.
If the application is assigned to a node running a SolarWinds Platform Agent, it is important to know that the URL will be hit from the perspective of the agent server. If the assigned node is polling via external, ICMP, SNMP, or WMI, then the website will be contacted from the perspective of the assigned polling engine.
If the node is polled via agent, it might be worth trying 'agentless' polling.
- Edit the application.
- Expand 'advanced' field.
- Click 'Override Template' button on the 'Preferred Polling Method' field to enable editing.
- Change drop-down to agentless.
- Save the application (click save and continue working)
- Re-test the component.
Various Error Messages
Common error messages such as the following and typical solutions.
- Access denied - Check the credential. If this message is received, it is likely that credentials are needed to access the site. You may add a credential in Settings > All Settings > SAM Settings > Credentials Library (or inherit from node).
- 401 Unauthorized - Check to see if credentials are requested when accessing the url in a web browser. It could also be that the website cannot be resolved by IP address. Check (via web browser) if the website is accessible by IP or only by hostname.
- 500 Internal Server Error - Access the site in a web browser from the SolarWinds server or agent server, if applicable. It could be that a proxy will be needed to access the page. It could also be that the website cannot be resolved by IP address. Again, check via a web browser if the website is accessible by IP or only by hostname.
- Network connection failed - Ensure the website can be resolved by the IP since the IP of the assigned node is the default configuration for the Component monitor. If you cannot resolve the url by IP, override the template, and enter the hostname.
Alternative Options
In some cases, you may expect a status code from a website to be something other than 200. In cases such as these, it is not viable to use the HTTP/HTTPS SAM monitor. This monitor is hardcoded to only accept a 200 status code. If anything other than 200 is found, the monitor will be down.
It is simple enough to construct a SAM PowerShell monitor to poll the status code.
## Scripts are not supported under any SolarWinds support program or service. ## Scripts are provided AS IS without warranty of any kind. SolarWinds further ## disclaims all warranties including, without limitation, any implied warranties ## of merchantability or of fitness for a particular purpose. The risk arising ## out of the use or performance of the scripts and documentation stays with you. ## In no event shall SolarWinds or anyone else involved in the creation, ## production, or delivery of the scripts be liable for any damages whatsoever ## (including, without limitation, damages for loss of business profits, business ## interruption, loss of business information, or other pecuniary loss) arising ## out of the use of or inability to use the scripts or documentation. $statuscode = Invoke-WebRequest -Uri https://www.solarwinds.com/ -UseBasicParsing | Select -ExpandProperty StatusCode Write-Host Statistic: $statuscode exit 0;
Self-Signed Certificate Troubleshooting for HTTPS Monitors
Test the HTTPS URL from the polling engine or agent host, not only from the target server.
-
If the endpoint uses a self-signed certificate, export the certificate from the target server without the private key.
-
Import the certificate into Trusted Root Certification Authorities on each polling engine or agent host that will access the endpoint.
-
If the certificate chain is incomplete, import any required intermediate certificates.
-
Verify that the polling engine or agent host can resolve the exact hostname used in the monitor URL.
-
Verify that the hostname in the URL matches the certificate CN or SAN.
If the URL works locally on the target server but fails in SolarWinds monitoring, the issue may be related to certificate trust or hostname resolution on the polling side rather than a product defect.