check_apache2_advanced.sh

check_apache2_advanced

  • check can be used locally or remotely
  • local process check removed, CPU usage taken from server-status page
  • values from server-status page defined by name rather than by location - works with option _ExtendedStatus_set to off
  • added alert on busy workers by number or percentage
  • added alert on bytes used per second
  • fixed the output to display apache error message if check fails
  • no restriction on warning and critical thresholds (can have warning without critical)
  • works even if no threshold has been defined, it will raise an apache alert if the server-status page is unavailable

Options =

 -H|--hostname)
   Sets the hostname. Default is: localhost
 -P|--port)
   Sets the port. Default is: 80
 -t|--timeout)
   Sets a timeout within the server's status page must've been
   accessed. Otherwise the check will go into an error state.
   Default is: 30
 -s|--status-page)
   name of the status page requested. Default is: server-status
 -S|--secure)
   Enables HTTPS (no certificate check though). Default is: off
 -wr|--warning-req)
   Sets a warning level for requests per second. Default is: off
 -cr|--critical-req)
   Sets a critical level for requests per second. Default is: off
 -wb|--warning-busy)
   Sets a warning level for number of busy workers. Default is: off
   can use percentage of busy workers instead of number if '%' used
 -cb|--critical-busy)
   Sets a critical level for number of busy workers. Default is: off
   can use percentage of busy workers instead of number if '%' used
 -wc|--warning-consumption)
   Sets a warning level for bytes per second. Default is: off
 -cc|--critical-consumption)
   Sets a critical level for bytes per second. Default is: off