KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

nagios.php 8.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?php
  2. /*************************************************************************************
  3. * nagios.php
  4. * --------
  5. * Author: Albéric de Pertat <alberic@depertat.net>
  6. * Copyright: (c) 2012 Albéric de Pertat (https://github.com/adepertat/geshi-nagios)
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2012/01/19
  9. *
  10. * Nagios language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2012/01/19 (1.0.0)
  15. * - First Release
  16. *
  17. * TODO (updated 2012/01/19)
  18. * -------------------------
  19. *
  20. *************************************************************************************
  21. *
  22. * This file is part of GeSHi.
  23. *
  24. * GeSHi is free software; you can redistribute it and/or modify
  25. * it under the terms of the GNU General Public License as published by
  26. * the Free Software Foundation; either version 2 of the License, or
  27. * (at your option) any later version.
  28. *
  29. * GeSHi is distributed in the hope that it will be useful,
  30. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. * GNU General Public License for more details.
  33. *
  34. * You should have received a copy of the GNU General Public License
  35. * along with GeSHi; if not, write to the Free Software
  36. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  37. *
  38. ************************************************************************************/
  39. $language_data = array(
  40. 'LANG_NAME' => 'Nagios',
  41. 'COMMENT_SINGLE' => array(1 => ';', 2 => '#'),
  42. 'COMMENT_MULTI' => array(),
  43. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  44. 'HARDQUOTE' => array("'", "'"),
  45. 'QUOTEMARKS' => array("'", '"'),
  46. 'ESCAPE_CHAR' => '\'',
  47. 'KEYWORDS' => array(
  48. 1 => array(
  49. 'define'
  50. ),
  51. 2 => array(
  52. 'command', 'contact', 'contactgroup', 'host', 'hostdependency',
  53. 'hostescalation', 'hostextinfo', 'hostgroup', 'service',
  54. 'servicedependency', 'serviceescalation',
  55. 'serviceextinfo', 'servicegroup', 'timeperiod'
  56. ),
  57. 3 => array(
  58. 'active_checks_enabled', 'passive_checks_enabled', 'alias',
  59. 'display_name', 'host_name', 'address', 'hostgroups', 'parents',
  60. 'hostgroup_members', 'members', 'service_description',
  61. 'servicegroups', 'is_volatile', 'servicegroup_name',
  62. 'servicegroup_members', 'contact_name', 'contactgroups', 'email',
  63. 'pager', 'can_submit_commands', 'contactgroup_name',
  64. 'contactgroup_members', 'host_notifications_enabled',
  65. 'service_notifications_enabled', 'host_notification_period',
  66. 'service_notification_period', 'host_notification_options',
  67. 'service_notification_options', 'host_notification_commands',
  68. 'service_notification_commands', 'check_command',
  69. 'check_freshness', 'check_interval', 'check_period', 'contacts',
  70. 'contact_groups', 'event_handler', 'event_handler_enabled',
  71. 'flap_detection_enabled', 'flap_detection_options',
  72. 'freshness_threshold', 'initial_state', 'low_flap_threshold',
  73. 'high_flap_threshold', 'max_check_attempts',
  74. 'notification_interval', 'first_notification_delay',
  75. 'notification_period', 'notification_options',
  76. 'notifications_enabled', 'stalking_options', 'notes', 'notes_url',
  77. 'action_url', 'icon_image', 'icon_image_alt', 'vrml_image',
  78. 'statusmap_image', '2d_coords', '3d_coords', 'obsess_over_host',
  79. 'obsess_over_hostver_service', 'process_perf_data',
  80. 'retain_status_information', 'retain_nonstatus_information',
  81. 'retry_interval', 'register', 'use', 'name', 'timeperiod_name',
  82. 'exclude', 'command_name', 'command_line', 'dependent_host_name',
  83. 'dependent_hostgroup_name', 'dependent_service_description',
  84. 'inherits_parent', 'execution_failure_criteria',
  85. 'notification_failure_criteria', 'dependency_period',
  86. 'first_notification', 'last_notification', 'escalation_period',
  87. 'escalation_options'
  88. ),
  89. 4 => array(
  90. 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday',
  91. 'sunday', 'january', 'february', 'march', 'april', 'may', 'june',
  92. 'july', 'august', 'september', 'october', 'november', 'december',
  93. 'day'
  94. )
  95. ),
  96. 'SYMBOLS' => array(
  97. 0 => array(
  98. '{', '}', ',', '+'
  99. )
  100. ),
  101. 'CASE_SENSITIVE' => array(
  102. GESHI_COMMENTS => false,
  103. 1 => false,
  104. 2 => false,
  105. 3 => false,
  106. 4 => false,
  107. ),
  108. 'STYLES' => array(
  109. 'KEYWORDS' => array(
  110. 1 => 'font-weight:bold;color:#FFDCA8;',
  111. 2 => 'font-weight:bold;color #FFA858;',
  112. 3 => 'font-weight:bold;color:#00C0C0;',
  113. 4 => 'font-weight:bold;color:#C0C0FF;'
  114. ),
  115. 'SYMBOLS' => array(
  116. 0 => 'font-weight:bold;color:#000000;'
  117. ),
  118. 'NUMBERS' => array(
  119. 0 => ''
  120. ),
  121. 'COMMENTS' => array(
  122. 0 => 'color: #AAAAAA; font-style: italic;',
  123. 1 => 'color: #AAAAAA; font-style: italic;',
  124. 2 => 'color: #AAAAAA; font-style: italic;'
  125. ),
  126. 'BRACKETS' => array(
  127. 0 => 'color: #009900;'
  128. ),
  129. 'STRINGS' => array(
  130. 0 => 'color: #660066;',
  131. 'HARD' => 'color: #660066;'
  132. ),
  133. 'ESCAPE_CHAR' => array(
  134. 0 => 'color: #000099; font-weight: bold;'
  135. ),
  136. 'METHODS' => array(
  137. 1 => 'color: #006600;'
  138. ),
  139. 'REGEXPS' => array(
  140. 0 => 'font-weight:bold;color:#808080;',
  141. 1 => 'font-weight:bold;color:#000080;',
  142. 2 => 'font-weight:bold;color:red;',
  143. 3 => 'font-weight:bold;color:#808000;',
  144. 4 => 'font-weight:bold;color:blue;',
  145. 5 => 'font-weight:bold;color:#C0FFC0;',
  146. ),
  147. 'SCRIPT' => array(
  148. 0 => '',
  149. )
  150. ),
  151. 'OOLANG' => false,
  152. 'OBJECT_SPLITTERS' => array(
  153. 1 => '\\'
  154. ),
  155. 'REGEXPS' => array(
  156. // Custom macros
  157. 0 => array(
  158. GESHI_SEARCH => '(\$[a-zA-Z_]+\$)',
  159. GESHI_REPLACE => '\\1',
  160. GESHI_MODIFIERS => '',
  161. GESHI_BEFORE => '',
  162. GESHI_AFTER => '',
  163. ),
  164. // Custom macro definitions
  165. 1 => array(
  166. GESHI_SEARCH => '(\A|\s)(_[a-zA-Z_]+)',
  167. GESHI_REPLACE => '\\2',
  168. GESHI_MODIFIERS => '',
  169. GESHI_BEFORE => '\\1',
  170. GESHI_AFTER => '',
  171. ),
  172. // $USERxx$
  173. 2 => array(
  174. GESHI_SEARCH => '(\$USER[0-9]+\$)',
  175. GESHI_REPLACE => '\\1',
  176. GESHI_MODIFIERS => '',
  177. GESHI_BEFORE => '',
  178. GESHI_AFTER => '',
  179. ),
  180. // $ARGxx$
  181. 3 => array(
  182. GESHI_SEARCH => '(\$ARG[1-9]\$)',
  183. GESHI_REPLACE => '\\1',
  184. GESHI_MODIFIERS => '',
  185. GESHI_BEFORE => '',
  186. GESHI_AFTER => '',
  187. ),
  188. // register 0
  189. 4 => array(
  190. GESHI_SEARCH => '(\bregister[\\x20\\t]+[01])',
  191. GESHI_REPLACE => '\\1',
  192. GESHI_MODIFIERS => '',
  193. GESHI_BEFORE => '',
  194. GESHI_AFTER => '',
  195. ),
  196. // use
  197. 5 => array(
  198. GESHI_SEARCH => '(use[\\x20\\t]+[^\\x20\\t]+)([\\x20\\t]*[$;#])',
  199. GESHI_REPLACE => '\\2',
  200. GESHI_MODIFIERS => '',
  201. GESHI_BEFORE => '\\1',
  202. GESHI_AFTER => '',
  203. ),
  204. ),
  205. 'URLS' => array(
  206. 1 => '',
  207. 2 => '',
  208. 3 => '',
  209. 4 => ''
  210. ),
  211. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  212. 'SCRIPT_DELIMITERS' => array(),
  213. 'HIGHLIGHT_STRICT_BLOCK' => array(
  214. 0 => false
  215. ),
  216. 'TAB_WIDTH' => 4,
  217. 'PARSER_CONTROL' => array(
  218. 'ENABLE_FLAGS' => array(
  219. 'NUMBERS' => GESHI_NEVER
  220. )
  221. )
  222. );
  223. ?>