" Vim syntax file " Filename: nagios.vim " Language: Nagios template object configuration file " Maintainer: Thorsten Robers " Maintainer(old): Lance Albertson " URL " Version: 0.1.1 " Last Change: 2009 Jan 21 if !exists("main_syntax") if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let main_syntax = 'nagios' endif if version >= 600 setlocal iskeyword=_,-,A-Z,a-z,48-57 syntax clear else endif syn match nagiosDefineComment ';.*' syn match nagiosComment '#.*' syn match nagiosConstant '\<[0-9]\+%\?\>' syn match nagiosConstant '\<[a-z]\>' syn region nagiosString start=+"+ end=+"+ contains=nagiosMacro syn region nagiosString start=+'+ end=+'+ contains=nagiosMacro syn keyword nagiosSpecial name register use syn match nagiosDef 'define[ \t]\+\(host\|service\|timeperiod\|contact\|command\)' syn match nagiosDef 'define[ \t]\+\(service\|host\|contact\)group' syn match nagiosDef 'define[ \t]\+\(service\|host\)\(dependency\|extinfo\)' syn match nagiosDef 'define[ \t]\+\(service\|host\|hostgroup\)escalation' syn match nagiosMacro '\$CONTACT\(NAME\|ALIAS\|EMAIL\|PAGER\)\$' syn match nagiosMacro '\$CONTACTGROUP\(NAME\|NAMES\|ALIAS\|MEMBERS\)\$' syn match nagiosMacro '\$CONTACTADDRESS\([1-6]\)\$' syn match nagiosMacro '\$HOST\(NAME\|ALIAS\|ADDRESS\|DISPLAYNAME\)\$' syn match nagiosMacro '\$\(SERVICE\|HOST\)\(DISPLAYNAME\|STATE\|STATEID\|STATETYPE\|EVENTID\|LATENCY\|DURATION\|DURATIONSEC\|DOWNTIME\|PERCENTCHANGE\|EXECUTIONTIME\|\GROUPNAME\|GROUPNAMES\|OUTPUT\|CHECKCOMMAND\|ACKAUTHOR\|ACKAUTHORNAME\|ACKAUTHORALIAS\|ACKCOMMENT\|ACTIONURL\|NOTES\|NOTESURL\|PERFDATA\|PROBLEMID\|PERFDATAFILE\|NOTIFICATIONNUMBER\|NOTIFICATIONID\|ATTEMPT\)\$' syn match nagiosMacro '\$\(LASTSERVICE\|LASTHOST\)\(CHECK\|PROBLEMID\|STATECHANGE\|STATE\|STATEID\|EVENTID\)\$' syn match nagiosMacro '\$LONG\(SERVICE\|HOST\)OUTPUT\$' syn match nagiosMacro '\$MAX\(SERVICE\|HOST\)ATTEMPTS\$' syn match nagiosMacro '\$\(HOST\|SERVICE\)\GROUP\(ALIAS\|MEMBERS\|NOTES\|NOTESURL\|ACTIONURL\)\$' syn match nagiosMacro '\$TOTALHOST\(SUP\|SDOWN\|SUNREACHABLE\|SUNHANDLED\|PROBLEMS\|PROBLEMSUNHANDLED\)\(UNHANDLED\|\)\$' syn match nagiosMacro '\$TOTALHOSTSERVICES\(OK\|WARNING\|UNKNOWN\|CRITICAL\|\)\$' syn match nagiosMacro '\$TOTALSERVICE\(SOK\|SWARNING\|SCRITICAL\|SUNKNOWN\|PROBLEMS\)\(UNHANDLED\|\)\$' syn match nagiosMacro '\$LASTSERVICE\(OK\|WARNING\|UNKNOWN\|CRITICAL\)\$' syn match nagiosMacro '\$LASTHOST\(UP\|DOWN\|UNREACHABLE\)\$' syn match nagiosMacro '\$\(ARG\|USER\)\([1-9]\|[1-2][0-9]\|3[0-2]\)\$' syn match nagiosMacro '\$SERVICE\(DESC\|ISVOLATILE\)\$' syn match nagiosMacro '\$\(OUTPUT\|PERFDATA\|EXECUTIONTIME\|LATENCY\)\$' syn match nagiosMacro '\$NOTIFICATION\(TYPE\|NUMBER\|RECIPIENTS\|ISESCALATED\|AUTHOR\|AUTHORNAME\|AUTHORALIAS\|COMMENT\)\$' syn match nagiosMacro '\$\(\(SHORT\|LONG\)\?DATETIME\|DATE\|\TIME\|TIMET\)\$' syn match nagiosMacro '\$\(IS\|NEXT\)VALIDTIME:' syn match nagiosMacro '\$\(PROCESS\|EVENT\)STARTTIME\$' syn match nagiosMacro '\$i\(LASTSTATECHANGE\|STATETYPE\)\$' syn match nagiosMacro '\$ADMIN\(EMAIL\|PAGER\)\$' syn match nagiosMacro '\$\(\(STATUS\|COMMENT\|DOWNTIME\|RETENTION\)\?DATA\)\?\(OBJECTCACHE\|TEMP\|RESOURCE\|COMMAND\|MAINCONFIG\|LOG\)\?FILE\$' syn match nagiosMacro '\$TEMPPATH\$' syn match nagiosMacro 'address\([1-6]\)' syn region nagiosDefBody start='{' end='}' contains=nagiosDirective,nagiosMacro,nagiosConstant,nagiosString,nagiosComment,nagiosDefineComment,nagiosSpecial transparent syn keyword nagiosDirective active_checks_enabled address alias check_command syn keyword nagiosDirective check_freshness check_period checks_enabled syn keyword nagiosDirective command_line command_name syn keyword nagiosDirective contact_groups contact_name contactgroup_name syn keyword nagiosDirective dependent_host_name dependent_service_description syn keyword nagiosDirective email event_handler event_handler_enabled syn keyword nagiosDirective execution_failure_criteria first_notification syn keyword nagiosDirective flap_detection_enabled flap_detection_options freshness_threshold syn keyword nagiosDirective friday high_flap_threshold host_name syn keyword nagiosDirective host_notification_commands syn keyword nagiosDirective host_notification_options syn keyword nagiosDirective host_notification_period hostgroup_name syn keyword nagiosDirective is_volatile last_notification syn keyword nagiosDirective low_flap_threshold max_check_attempts syn keyword nagiosDirective members monday normal_check_interval syn keyword nagiosDirective notification_failure_criteria syn keyword nagiosDirective notification_interval notification_options syn keyword nagiosDirective notification_period notifications_enabled syn keyword nagiosDirective obsess_over_service pager parallelize_check syn keyword nagiosDirective parents passive_checks_enabled syn keyword nagiosDirective process_perf_data retain_nonstatus_information syn keyword nagiosDirective retain_status_information retry_check_interval syn keyword nagiosDirective saturday service_description syn keyword nagiosDirective service_notification_commands syn keyword nagiosDirective service_notification_options syn keyword nagiosDirective service_notification_period stalking_options syn keyword nagiosDirective sunday thursday timeperiod_name tuesday wednesday syn keyword nagiosDirective display_name hostgroups initial_state syn keyword nagiosDirective check_interval retry_interval syn keyword nagiosDirective obsess_over_host flap_detections_options contacts syn keyword nagiosDirective first_notification_delay notes notes_url action_url syn keyword nagiosDirective icon_image icon_image_alt vrml_image syn keyword nagiosDirective statusmap_image 2d_coords 3d_coords syn keyword nagiosDirective hostgroup_members servicegroups contacts syn keyword nagiosDirective servicegroup_members contactgroups host_notifications_enabled service_notifications_enabled contactgroup_members syn keyword nagiosDirective exclude can_submit_commands dependent_host dependent_hostgroup syn keyword nagiosDirective inherits_parent dependency_period escalation_period escalation_options dependent_hostgroup_name syn keyword nagiosMain log_file cfg_file cfg_dir object_cache_file precached_object_file resource_file temp_file temp_path status_file status_update_interval nagios_user nagios_group enable_notifications execute_service_checks accept_passive_service_checks execute_host_checks accept_passive_host_checks enable_event_handlers log_rotation_method log_archive_path check_external_commands command_check_interval command_file external_command_buffer_slots lock_file retain_state_information state_retention_file retention_update_interval syn keyword nagiosMain use_retained_program_state use_retained_scheduling_info retained_host_attribute_mask retained_service_attribute_mask retained_process_host_attribute_mask retained_process_service_attribute_mask retained_contact_host_attribute_mask retained_contact_service_attribute_mask use_syslog log_notifications log_service_retries log_host_retries log_event_handlers log_initial_states log_external_commands log_passive_checks global_host_event_handler syn keyword nagiosMain global_service_event_handler sleep_time service_inter_check_delay_method max_service_check_spread service_interleave_factor max_concurrent_checks check_result_reaper_frequency max_check_result_reaper_time check_result_path max_check_result_file_age host_inter_check_delay_method max_host_check_spread interval_length auto_reschedule_checks auto_rescheduling_interval auto_rescheduling_window use_aggressive_host_checking translate_passive_host_checks passive_host_checks_are_soft syn keyword nagiosMain enable_predictive_host_dependency_checks enable_predictive_service_dependency_checks cached_host_check_horizon cached_service_check_horizon use_large_installation_tweaks free_child_process_memory child_processes_fork_twice enable_environment_macros enable_flap_detection low_service_flap_threshold high_service_flap_threshold low_host_flap_threshold high_host_flap_threshold soft_state_dependencies service_check_timeout host_check_timeout event_handler_timeout syn keyword nagiosMain notification_timeout ocsp_timeout ochp_timeout perfdata_timeout obsess_over_services ocsp_command obsess_over_hosts ochp_command process_performance_data host_perfdata_command service_perfdata_command host_perfdata_file service_perfdata_file host_perfdata_file_template service_perfdata_file_template host_perfdata_file_mode service_perfdata_file_mode host_perfdata_file_processing_interval service_perfdata_file_processing_interval host_perfdata_file_processing_command service_perfdata_file_processing_command check_for_orphaned_services check_for_orphaned_hosts check_service_freshness syn keyword nagiosMain service_freshness_check_interval check_host_freshness additional_freshness_latency enable_embedded_perl use_embedded_perl_implicitly date_format use_timezone illegal_object_name_chars illegal_macro_output_chars use_regexp_matching use_true_regexp_matching admin_email admin_pager event_broker_options broker_module debug_file debug_level debug_verbosity max_debug_file_size main_config_file physical_html_path url_html_path use_authentication syn keyword nagiosMain default_user_name authorized_for_system_information authorized_for_system_commands authorized_for_configuration_information authorized_for_all_hosts authorized_for_all_host_commands authorized_for_all_services authorized_for_all_service_commands lock_author_names statusmap_background_image default_statusmap_layout statuswrl_include default_statuswrl_layout refresh_rate host_unreachable_sound host_down_sound service_warning_sound service_critical_sound service_unknown_sound ping_syntax escape_html_tags notes_url_target action_url_target enable_splunk_integration splunk_url hi link nagiosComment Comment hi link nagiosConstant Number hi link nagiosDef Statement hi link nagiosDirective Define hi link nagiosMacro Macro hi link nagiosString String hi link nagiosSpecial Special hi link nagiosMain Identifier hi link nagiosDefineComment Comment