SHARE
TWEET

captor.conf v1

zyradyl Aug 16th, 2015 (edited) 3,463 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * File:        /etc/icinga2/conf.d/captor.conf
  3.  * Title:       Captor Host Configuration File
  4.  * Description: Host and services definition for Icinga2 for
  5.  *              the Captor Localhost.
  6.  * Host:        captor.zyradyl.org
  7.  * System:      Linux Mint Debian Edition 2
  8.  * License:     Creative Commons Zero - Public Domain
  9.  * Version:     1.0
  10.  * Date:        August 16, 2015
  11.  */
  12.  
  13. //
  14. // Host Declaration Block
  15. //
  16. object Host "captor.zyradyl.org" {
  17.     // Define the host IPv4 Address
  18.     address         = "127.0.0.1"
  19.     // Define the host IPv6 Address
  20.     address6        = "::1"
  21.     // Define the operating system
  22.     vars.os         = "Linux"
  23.     // Define a basic functionality test
  24.     // Hostalive does a basic ICMP ECHO to the target
  25.     // specified in the address directive.
  26.     check_command   = "hostalive"
  27. }
  28.  
  29. //
  30. // There are two ways that we can configure Icinga2.
  31. // The first method is to write specific files for
  32. // every host, which is a good idea if you only have
  33. // a few hosts, and every host has something
  34. // different going on. The other method wold be to
  35. // use apply service logic, which is better for
  36. // larger deployments. I have provided links to
  37. // both a best practices guide as well as to a guide
  38. // on apply logic. I will be using files on a per
  39. // host basis for my deployment.
  40. //
  41.  
  42. // For demonstration purposes I am setting up an
  43. // IPv6 Ping check.
  44.  
  45. //
  46. // Service Declaration Block
  47. // Service:     Ping6
  48. // Description: Check if Host is responding to IPv6
  49. // Note:        The address6 specified in the above directive  
  50. //              is carried into the service declaration
  51. //              blocks via specifying the host_name variable
  52. //
  53. object Service "ping6" {
  54.     host_name     = "captor.zyradyl.org"
  55.     check_command = "ping6"
  56. }
  57.  
  58. //
  59. // Service Declaration Block
  60. // Service:     HTTP.server
  61. // Description: Checks if Apache in general is up.
  62. // Note:        The address specified in the above directive  
  63. //              is carried into the service declaration
  64. //              blocks via specifying the host_name variable
  65. //
  66. // We are specifying an additional part on the service
  67. // because we are also going to check to make sure that
  68. // IcingaWeb2 is running.
  69. //
  70. object Service "http.server" {
  71.     host_name               = "captor.zyradyl.org"
  72.     // This tells Icinga to check only this specific
  73.     // page.
  74.     vars.http_uri           = "/"
  75.     check_command           = "http"
  76. }
  77.  
  78. //
  79. // Service Declaration Block
  80. // Service:     HTTP.icingaweb2
  81. // Description: Check if the IcingaWeb service is up.
  82. // Note:        The address specified in the above directive  
  83. //              is carried into the service declaration
  84. //              blocks via specifying the host_name variable
  85. //
  86. object Service "http.icingaweb" {
  87.     host_name               = "captor.zyradyl.org"
  88.     // This tells Icinga to check only this specific
  89.     // page.
  90.     vars.http_uri           = "/icingaweb2"
  91.     check_command           = "http"
  92. }
  93.  
  94. //
  95. // Service Declaration Block
  96. // Service:     SSL Cert Check
  97. // Description: Check expiration date of SSL certificates.
  98. // Note:        The address specified in the above directive  
  99. //              is carried into the service declaration
  100. //              blocks via specifying the host_name variable
  101. //
  102. // The following is commented out because captor doesnt offer
  103. // HTTPS.
  104. //
  105. //object Service "ssl" {
  106. //    host_name                         = "wepwawet.zyradyl.org"
  107. //    vars.ssl_port                     = "443"
  108. //    vars.ssl_cert_valid_days_warn     = "30"
  109. //    vars.ssl_cert_valid_days_critical = "15"
  110. //    check_command                     = "ssl"
  111. //}
  112.  
  113. //
  114. // Service Declaration Block
  115. // Service:     Disks
  116. // Description: Checks status of all installed disks.
  117. // Note:        The address specified in the above directive  
  118. //              is carried into the service declaration
  119. //              blocks via specifying the host_name variable
  120. //
  121. object Service "disks" {
  122.     host_name                     = "captor.zyradyl.org"
  123.     // We need to exclude a particular partition due to
  124.     // access denials.
  125.     vars.disk_partitions_excluded = "/run/user/1000/gvfs"
  126.     check_command                 = "disk"
  127. }
  128.  
  129. //
  130. // Service Declaration Block
  131. // Service:     Icinga
  132. // Description: Checks status of Icinga Instance.
  133. // Note:        The address specified in the above directive  
  134. //              is carried into the service declaration
  135. //              blocks via specifying the host_name variable
  136. //
  137. object Service "icinga" {
  138.     host_name     = "captor.zyradyl.org"
  139.     check_command = "icinga"
  140. }
  141.  
  142. // Service Declaration Block
  143. // Service:     Load
  144. // Description: Checks how much load the host is under.
  145. // Note:        The address specified in the above directive  
  146. //              is carried into the service declaration
  147. //              blocks via specifying the host_name variable
  148. //
  149. object Service "load" {
  150.     host_name     = "captor.zyradyl.org"
  151.     check_command = "load"
  152. }
  153.  
  154. // Service Declaration Block
  155. // Service:     Procs
  156. // Description: Checks number of processes on host.
  157. // Note:        The address specified in the above directive  
  158. //              is carried into the service declaration
  159. //              blocks via specifying the host_name variable
  160. //
  161. object Service "procs" {
  162.     host_name     = "captor.zyradyl.org"
  163.     check_command = "procs"
  164. }
  165.  
  166. //
  167. // Service Declaration Block
  168. // Service:     SSH
  169. // Description: Checks if SSH is available.
  170. // Note:        The address specified in the above directive  
  171. //              is carried into the service declaration
  172. //              blocks via specifying the host_name variable
  173. //
  174. // Note:        Captor does not provide ssh services.
  175. //              Commenting out this service.
  176. //
  177. //object Service "ssh" {
  178. //    host_name     = "captor.zyradyl.org"
  179. //    check_command = "ssh"
  180. //}
  181.  
  182. // Service Declaration Block
  183. // Service:     Swap
  184. // Description: Checks status of swap space on host.
  185. // Note:        The address specified in the above directive  
  186. //              is carried into the service declaration
  187. //              blocks via specifying the host_name variable
  188. //
  189. object Service "swap" {
  190.     host_name     = "captor.zyradyl.org"
  191.     check_command = "swap"
  192. }
  193.  
  194. // Service Declaration Block
  195. // Service:     Users
  196. // Description: Checks number of users on the system
  197. // Note:        The address specified in the above directive  
  198. //              is carried into the service declaration
  199. //              blocks via specifying the host_name variable
  200. //
  201. object Service "users" {
  202.     host_name     = "captor.zyradyl.org"
  203.     check_command = "users"
  204. }
  205.  
  206. // Service Declaration Block
  207. // Service:     Apt
  208. // Description: Checks status of the apt package manager.
  209. // Note:        The address specified in the above directive  
  210. //              is carried into the service declaration
  211. //              blocks via specifying the host_name variable
  212. //
  213. object Service "apt" {
  214.     host_name     = "captor.zyradyl.org"
  215.     check_command = "apt"
  216. }
  217.  
  218. // EOF
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top