Blog

Archive for May, 2018

LibreNMS and check_http

You can add a service from the Services menu or you can go to devices and choose a device. We are going to add the HTTP service to monitor the status code, response time, and SSL certificate expiration. Choose your device and then click on Services which should be in between Inventory and Logs. Click Add Service and choose http for the type. Fill in the description you want. For IP address fill in the website address such as stupiderror.com. If your site redirects to www then fill in something like www.stupiderror.com. For the Parameters we are going to use -S -w 3 -c 5. The -S tells it to connect with ssl so it uses HTTPS instead of HTTP. The -w says to put the service in a Warning state if it takes 3 seconds or longer to respond. The -c option tells it to put the service in a Critical state if it takes 5 seconds or longer to respond.

To monitor the expiration of the certificate click on Add Service again. Choose HTTP for type. For IP address fill in your domain name, something like www.stupiderror.com. For Parameters we can do -C 30,14. This says the service is good when the certificate is valid for more than 30 days. If the certificate is valid for 15 to 30 then days then change the state to Warning and if it is valid for 14 or less days then change the state to Critical. If you click on Details you can see graphs for these metrics.

For more information on check_http check out the man page: https://www.monitoring-plugins.org/doc/man/check_http.html

 

Source https://www.stupiderror.com/add-nagios-plugins-to-librenms-and-setup-check_http/

 

Posted in: Blog

Leave a Comment (0) →