Skip to content

Execute a cron job and send its output and return code to Nagios

Notifications You must be signed in to change notification settings

ISVTEC/cron2nagios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cron2nagios

Execute a cron job and send its output and return code to Nagios

Installation

apt-get install cron2nagios

Usage

cron2nagios --nsca-hostname=HOSTNAME \
  --command='mycron foo' \
  --nagios-service-name=SERVICE

Nagios Configuration

define service{
  use                   generic-service
  host_name             example.isvtec.net
  service_description   Cron job import
  active_checks_enabled 0
  check_command         check_cyb_dummy!2!No information received from the cron job in the last 24 hours
  freshness_threshold   86400
  is_volatile           1 ; http://nagios.sourceforge.net/docs/2_0/volatileservices.html
  max_check_attempts    1
  check_freshness       1
  contact_groups        admins-housing
  notification_period   24x7
}

About

Execute a cron job and send its output and return code to Nagios

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published