-
Notifications
You must be signed in to change notification settings - Fork 7
Nagios configuration
Jonathan A Rees edited this page Mar 15, 2018
·
1 revision
The objects/contacts.cfg file just lists the email addresses that are supposed to get notifications, via individual define contact
s and a define contactgroup
- this is completely vanilla.
It looks like I might have tweaked commands.cfg right after installing nagios, but I didn't record what I did... sorry.
File varela.csail.mit.edu:/usr/local/nagios/etc/objects/services.cfg looks like this (as of 2018-03-15): (soon I'll add a rule for the api
host duplicating the pushes_succeeding test on devapi
) (note that someone who knows nagios better than I do could get rid of all the duplicated information)
# Hosts and services for opentree
# Some of the OT servers are misconfigured to block ping.
define host {
name pingless-server
use generic-host
max_check_attempts 1 ; A value was required for this field
active_checks_enabled 0
register 0
}
define host {
use linux-server ; Name of host template to use
host_name tree.opentreeoflife.org
alias tree.opentreeoflife.org
address 54.202.84.87
}
define service {
use generic-service ; Inherit default values from a template
host_name tree.opentreeoflife.org
service_description HTTP
check_command check_http!-S -N -u / --onredirect=follow
}
define host {
use linux-server ; Name of host template to use
host_name api.opentreeoflife.org
}
define service {
use generic-service ; Inherit default values from a template
host_name api.opentreeoflife.org
service_description HTTP
check_command check_http
}
define host {
use linux-server ; Name of host template to use
host_name devtree.opentreeoflife.org
}
define service {
use generic-service ; Inherit default values from a template
host_name devtree.opentreeoflife.org
service_description HTTP
check_command check_http
}
define host {
use linux-server ; Name of host template to use
host_name devapi.opentreeoflife.org
}
define service {
use generic-service ; Inherit default values from a template
host_name devapi.opentreeoflife.org
service_description HTTP
check_command check_http
}
define service {
use generic-service ; Inherit default values from a template
host_name devapi.opentreeoflife.org
service_description no-push-failure
check_command check_http!-u /phylesystem/v1/push_failure -r "pushes_succeeding?: true" --invert-regex
}
#define host {
# use linux-server ; Name of host template to use
# host_name opentreeoflife.org
# }
#define service {
# use generic-service ; Inherit default values from a template
# host_name opentreeoflife.org
# service_description HTTP
# check_command check_http!--expect=Found
# }
define service {
use generic-service
host_name api.opentreeoflife.org
service_description TREEMACHINE
check_command check_treemachine
}
define service {
use generic-service
host_name api.opentreeoflife.org
service_description TAXOMACHINE
check_command check_taxomachine
}
define service {
use generic-service
host_name api.opentreeoflife.org
service_description OTI
check_command check_oti
}
define service {
use generic-service
host_name devapi.opentreeoflife.org
service_description TREEMACHINE
check_command check_treemachine
}
define service {
use generic-service
host_name devapi.opentreeoflife.org
service_description TAXOMACHINE
check_command check_taxomachine
}
define service {
use generic-service
host_name devapi.opentreeoflife.org
service_description OTI
check_command check_oti
}
define command {
command_name check_treemachine
command_line curl -L --post301 -X POST "http://$HOSTNAME$/v3/tree_of_life/about" -H "content-type:application/json" -d '{"include_source_list":false}' | grep -q "taxon"
}
define command {
command_name check_taxomachine
command_line curl -L --post301 -X POST "http://$HOSTNAME$/v3/taxonomy/about" -H "content-type:application/json" -d '{}' | grep -q "source"
}
define command {
command_name check_oti
command_line curl -L --post301 -X POST "http://$HOSTNAME$/v3/studies/find_studies" -H "content-type:application/json" -d '{"property":"ot:studyId","value":"pg_152","verbose":true}' | grep -q "Coreopsis"
}
# 'check_http' command definition
define command {
command_name check_http_with_forwards
command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}