]> git.pld-linux.org Git - packages/vim.git/blame - nagios.vim
- new
[packages/vim.git] / nagios.vim
CommitLineData
781ed89b 1" Vim syntax file
222466ea
ER
2" Filename: nagios.vim
3" Language: Nagios template object configuration file
4" Maintainer: Elan Ruusamäe <glen@pld-linux.org>
5" Author: Lance Albertson <ramereth@gentoo.org>
6" Author: Ava Arachne Jarvis <ajar@katanalynx.dyndns.org>
7" URL: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/nagios.vim
8" Version Info: $Revision$
9" Last Change: $Date$ UTC
781ed89b
ER
10
11if !exists("main_syntax")
12 if version < 600
13 syntax clear
14 elseif exists("b:current_syntax")
15 finish
16 endif
17
18 let main_syntax = 'nagios'
19endif
20
21if version >= 600
22 setlocal iskeyword=_,-,A-Z,a-z,48-57
23else
24endif
25
9ce1a5df
ER
26syn match nagiosLineComment '#.*'
27syn match nagiosComment ';.*$' contained
781ed89b
ER
28
29syn match nagiosConstant '\<[0-9]\+%\?\>'
30syn match nagiosConstant '\<[a-z]\>'
31
32syn region nagiosString start=+"+ end=+"+ contains=nagiosMacro
33syn region nagiosString start=+'+ end=+'+ contains=nagiosMacro
34
781ed89b
ER
35syn match nagiosDef 'define[ \t]\+\(\(host\|service\)extinfo\|host\|service\|timeperiod\|contact\|command\)'
36syn match nagiosDef 'define[ \t]\+\(host\|contact\|service\)group'
37syn match nagiosDef 'define[ \t]\+\(service\|host\)dependency'
38syn match nagiosDef 'define[ \t]\+\(service\|host\|hostgroup\)escalation'
39
40syn match nagiosMacro '\$CONTACT\(NAME\|ALIAS\|EMAIL\|PAGER\)\$'
41syn match nagiosMacro '\$HOST\(NAME\|ALIAS\|ADDRESS\|STATE\|OUTPUT\|PERFDATA\|STATETYPE\|EXECUTIONTIME\)\$'
42syn match nagiosMacro '\$\(ARG\|USER\)\([1-9]\|[1-2][0-9]\|3[0-2]\)\$'
43syn match nagiosMacro '\$SERVICE\(DESC\|STATE\|OUTPUT\|PERFDATA\|LATENCY\|EXECUTIONTIME\|STATETYPE\)\$'
44syn match nagiosMacro '\$\(OUTPUT\|PERFDATA\|EXECUTIONTIME\|LATENCY\)\$'
45syn match nagiosMacro '\$NOTIFICATION\(TYPE\|NUMBER\)\$'
46syn match nagiosMacro '\$\(\(SHORT\|LONG\)\?DATETIME\|DATE\|TIME\|TIMET\)\$'
89eb3416 47syn match nagiosMacro '\$LASTSTATECHANGE\$'
781ed89b
ER
48syn match nagiosMacro '\$ADMIN\(EMAIL\|PAGER\)\$'
49syn match nagiosMacro '\$\(SERVICE\|HOST\)ATTEMPT\$'
50syn match nagiosMacro '\$LAST\(HOST\|SERVICE\)CHECK\$'
51
9ce1a5df
ER
52syn region nagiosDefBody start='{' end='}'
53 \ contains=nagiosComment,nagiosDirective,nagiosMacro,nagiosConstant,nagiosString,nagiosSpecial transparent
781ed89b 54
9ce1a5df
ER
55syn keyword nagiosDirective contained name register use
56syn keyword nagiosDirective contained active_checks_enabled address alias check_command
57syn keyword nagiosDirective contained check_freshness check_period checks_enabled check_interval retry_interval
58syn keyword nagiosDirective contained command_line command_name
59syn keyword nagiosDirective contained contact_groups contact_name contactgroup_name
60syn keyword nagiosDirective contained dependent_host_name dependent_service_description
61syn keyword nagiosDirective contained email event_handler event_handler_enabled
62syn keyword nagiosDirective contained execution_failure_criteria first_notification execution_failure_options
63syn keyword nagiosDirective contained flap_detection_enabled freshness_threshold failure_prediction_enabled
64syn keyword nagiosDirective contained friday high_flap_threshold host_name
65syn keyword nagiosDirective contained host_notification_commands
66syn keyword nagiosDirective contained host_notification_options
67syn keyword nagiosDirective contained host_notification_period hostgroup_name servicegroup_name hostgroups servicegroups
68syn keyword nagiosDirective contained is_volatile last_notification
69syn keyword nagiosDirective contained low_flap_threshold max_check_attempts
70syn keyword nagiosDirective contained members monday normal_check_interval
71syn keyword nagiosDirective contained notification_failure_criteria notification_failure_options
72syn keyword nagiosDirective contained notification_interval notification_options
73syn keyword nagiosDirective contained notification_period notifications_enabled
74syn keyword nagiosDirective contained obsess_over_service pager parallelize_check
75syn keyword nagiosDirective contained parents passive_checks_enabled
76syn keyword nagiosDirective contained process_perf_data retain_nonstatus_information
77syn keyword nagiosDirective contained retain_status_information retry_check_interval
78syn keyword nagiosDirective contained saturday service_description
79syn keyword nagiosDirective contained service_notification_commands
80syn keyword nagiosDirective contained service_notification_options
81syn keyword nagiosDirective contained service_notification_period stalking_options
82syn keyword nagiosDirective contained sunday thursday timeperiod_name tuesday wednesday
83syn keyword nagiosDirective contained icon_image icon_image_alt vrml_image statusmap_image
84syn keyword nagiosDirective contained notes notes_url 2d_coords 3d_coords obsess_over_host inherits_parent
781ed89b
ER
85
86hi link nagiosComment Comment
9ce1a5df 87hi link nagiosLineComment Comment
781ed89b
ER
88hi link nagiosConstant Number
89hi link nagiosDef Statement
90hi link nagiosDirective Define
91hi link nagiosMacro Macro
92hi link nagiosString String
93hi link nagiosSpecial Special
This page took 0.197394 seconds and 4 git commands to generate.