Capabilities
Nagios provides complete URL monitoring of HTTP and HTTPS servers and protocols as well as full URL transaction monitoring.
Benefits
Implementing effective URL monitoring with Nagios offers the following benefits:
>> Increased server, services, and application availability
>> Fast detection of network outages and protocol failures
>> Monitor user experience when accessing URLs
>> Web server performance monitoring
>> Web transaction monitoring
>> URL monitoring
URL monitoring
By using the ‘check_http’ nagios command, we can monitor a specific url rather than checking the Apache service is up or not. This method is helpful to identify if the website is hacked and url is injected with malicious codes or there is some Apache or php errors and page is throwing an error instead. The normal Apache service check will return successful results in the above case.
We can check for a specific keyword string on the webpage. If that string not present, an error will be returned.
Here is an real example :
define service{
use urlmonitoring-service
host_name server.supportpro.com
service_description url_check
check_command check_http!-H supportpro.com -t 30 -R “Cpanel and WHM” -f follow
}
The above will check for the keyword “Cpanel and WHM” on the page “supportpro.com”. If the keyword is missing or the page is not responding nagios will return and error.
URL monitoring +SSL
You can refer to below example if the web page has SSL/TLS enabled.
define service{
use urlmonitoring-service
host_name server.supportpro.com
service_description url_check
check_command check_http!-H supportpro.com -t 30 -R “Cpanel and WHM” -f follow –ssl
}
URL monitoring on ht password protected page
Normal method will not work as we need to validate ht password protection first to see the page. You can use the following example for such pages.
define service{
use urlmonitoring-service
host_name server.supportpro.com
service_description url_check_protected
check_command check_http!-H supportpro.com -a user:password -t 30 -R “Cpanel and WHM” -f follow –ssl
}
Replace the username and password appropriately.
Make sure you define service ‘urlmonitoring-service’ in your template file.
define service{
name urlmonitoring-service
max_check_attempts 5
check_interval 15
retry_interval 2
check_period 24×7
notification_interval 30
notification_period 24×7
register 0
}
If you require help, contact SupportPRO Server Admin