3 " Language: Nagios template object configuration file
4 " Maintainer: Lance Albertson <ramereth@gentoo.org>
5 " Orginal Author: Ava Arachne Jarvis <ajar@katanalynx.dyndns.org>
6 " URL: http://dev.gentoo.org/~ramereth/vim/syntax/nagios.vim
7 " * previous URL appears to be dead
9 " Last Change: 2005 Jan 4
12 if !exists("main_syntax")
15 elseif exists("b:current_syntax")
19 let main_syntax = 'nagios'
23 setlocal iskeyword=_,-,A-Z,a-z,48-57
27 syn match nagiosComment '#.*'
29 syn match nagiosConstant '\<[0-9]\+%\?\>'
30 syn match nagiosConstant '\<[a-z]\>'
32 syn region nagiosString start=+"+ end=+"+ contains=nagiosMacro
33 syn region nagiosString start=+'+ end=+'+ contains=nagiosMacro
35 syn keyword nagiosSpecial name register use
37 syn match nagiosDef 'define[ \t]\+\(\(host\|service\)extinfo\|host\|service\|timeperiod\|contact\|command\)'
38 syn match nagiosDef 'define[ \t]\+\(host\|contact\|service\)group'
39 syn match nagiosDef 'define[ \t]\+\(service\|host\)dependency'
40 syn match nagiosDef 'define[ \t]\+\(service\|host\|hostgroup\)escalation'
42 syn match nagiosMacro '\$CONTACT\(NAME\|ALIAS\|EMAIL\|PAGER\)\$'
43 syn match nagiosMacro '\$HOST\(NAME\|ALIAS\|ADDRESS\|STATE\|OUTPUT\|PERFDATA\|STATETYPE\|EXECUTIONTIME\)\$'
44 syn match nagiosMacro '\$\(ARG\|USER\)\([1-9]\|[1-2][0-9]\|3[0-2]\)\$'
45 syn match nagiosMacro '\$SERVICE\(DESC\|STATE\|OUTPUT\|PERFDATA\|LATENCY\|EXECUTIONTIME\|STATETYPE\)\$'
46 syn match nagiosMacro '\$\(OUTPUT\|PERFDATA\|EXECUTIONTIME\|LATENCY\)\$'
47 syn match nagiosMacro '\$NOTIFICATION\(TYPE\|NUMBER\)\$'
48 syn match nagiosMacro '\$\(\(SHORT\|LONG\)\?DATETIME\|DATE\|TIME\|TIMET\)\$'
49 syn match nagiosMacro '\$LASTSTATECHANGE\$'
50 syn match nagiosMacro '\$ADMIN\(EMAIL\|PAGER\)\$'
51 syn match nagiosMacro '\$\(SERVICE\|HOST\)ATTEMPT\$'
52 syn match nagiosMacro '\$LAST\(HOST\|SERVICE\)CHECK\$'
54 syn region nagiosDefBody start='{' end='}' contains=nagiosDirective,nagiosMacro,nagiosConstant,nagiosString,nagiosSpecial transparent
56 syn keyword nagiosDirective active_checks_enabled address alias check_command
57 syn keyword nagiosDirective check_freshness check_period checks_enabled check_interval
58 syn keyword nagiosDirective command_line command_name
59 syn keyword nagiosDirective contact_groups contact_name contactgroup_name
60 syn keyword nagiosDirective dependent_host_name dependent_service_description
61 syn keyword nagiosDirective email event_handler event_handler_enabled
62 syn keyword nagiosDirective execution_failure_criteria first_notification execution_failure_options
63 syn keyword nagiosDirective flap_detection_enabled freshness_threshold failure_prediction_enabled
64 syn keyword nagiosDirective friday high_flap_threshold host_name
65 syn keyword nagiosDirective host_notification_commands
66 syn keyword nagiosDirective host_notification_options
67 syn keyword nagiosDirective host_notification_period hostgroup_name servicegroup_name hostgroups servicegroups
68 syn keyword nagiosDirective is_volatile last_notification
69 syn keyword nagiosDirective low_flap_threshold max_check_attempts
70 syn keyword nagiosDirective members monday normal_check_interval
71 syn keyword nagiosDirective notification_failure_criteria notification_failure_options
72 syn keyword nagiosDirective notification_interval notification_options
73 syn keyword nagiosDirective notification_period notifications_enabled
74 syn keyword nagiosDirective obsess_over_service pager parallelize_check
75 syn keyword nagiosDirective parents passive_checks_enabled
76 syn keyword nagiosDirective process_perf_data retain_nonstatus_information
77 syn keyword nagiosDirective retain_status_information retry_check_interval
78 syn keyword nagiosDirective saturday service_description
79 syn keyword nagiosDirective service_notification_commands
80 syn keyword nagiosDirective service_notification_options
81 syn keyword nagiosDirective service_notification_period stalking_options
82 syn keyword nagiosDirective sunday thursday timeperiod_name tuesday wednesday
83 syn keyword nagiosDirective icon_image icon_image_alt vrml_image statusmap_image
84 syn keyword nagiosDirective notes notes_url 2d_coords 3d_coords obsess_over_host inherits_parent
86 hi link nagiosComment Comment
87 hi link nagiosConstant Number
88 hi link nagiosDef Statement
89 hi link nagiosDirective Define
90 hi link nagiosMacro Macro
91 hi link nagiosString String
92 hi link nagiosSpecial Special