HTTP

check_http_curl.sh

Description:

This script connects to a site via curl and searches for a string in the web page.
If the string is not found it throws out an error and Nagios exit is set to ‘critical’.

Current Version

0.1a

Last Release Date

2015-05-28

Compatible With

  • Nagios 2.x
  • Nagios 3.x

License

GPL


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Photos
Project Notes
Save plugin in $USER1$ dir, in my case (Ubuntu 12.04) it is: /usr/lib/nagios/plugins and make it executable. Command definition: /etc/nagios3/commands.cfg: ... # Check HTTP define command{ command_name check_http_curl command_line $USER1$/check_http_curl.sh $HOSTNAME$ $HOSTNOTES$ } Hosts definition: $HOSTNOTES$ is the string that the plugin will search in the web page source. /etc/nagios3/conf.d/generic-host_nagios2.cfg ... define host{ host_name www.site1.org checks_enabled 0 use generic-host notes https://www.facebook.com/site1 } define host{ host_name www.site2.org checks_enabled 0 use generic-host notes [email protected] } Group definition: /etc/nagios3/conf.d/hostgroups_nagios2.cfg ... # Web Sites define hostgroup { hostgroup_name web-sites alias Web Sites members www.site1.org,www.site2.org } Service definition: /etc/nagios3/conf.d/services_nagios2.cfg ... define service { hostgroup_name web-sites service_description WWW check_command check_http_curl use generic-service notes Check if site is really down. }
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
11,391