Created
March 30, 2018 11:09
-
-
Save hedenface/f1f2261b370efd165fbb23d58f3bcba8 to your computer and use it in GitHub Desktop.
Nagios Configuration Syntax for Sublime Text 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%YAML 1.2 | |
--- | |
name: Nagios Configuration | |
file_extensions: | |
- cfg | |
scope: text.nagios | |
contexts: | |
main: | |
# Macros begin and end with $ and are all capital letters (and underscore and numbers) | |
- match: '\$[A-Z_0-9]+\$' | |
name: macro.nagios | |
scope: keyword.control.nagios | |
# Comments begin with # | |
- match: '#.*' | |
name: comment.nagios | |
scope: comment.line.nagios | |
# define is a keyword | |
- match: 'define' | |
name: define.nagios | |
scope: entity.name.function.nagios | |
# Highlight the key from each define | |
- match: '2d_coords|3d_coords|action_url|active_checks_enabled|address|addressx|alias|can_submit_commands|check_command|check_freshness|check_interval|check_period|command_line|command_name|contactgroups|contact_groups|contact_name|contacts|dependency_period|dependent_hostgroup_name|dependent_host_name|dependent_service_description|dependent_servicegroup_name|display_name|email|escalation_options|escalation_period|event_handler|event_handler_enabled|exclude|execution_failure_criteria|first_notification|first_notification_delay|flap_detection_enabled|flap_detection_options|freshness_threshold|high_flap_threshold|hostgroup_members|hostgroup_name|hostgroups|host_notification_commands|host_notification_options|host_notification_period|host_notifications_enabled|icon_image|icon_image_alt|importance|inherits_parent|initial_state|is_volatile|last_notification|low_flap_threshold|max_check_attempts|members|minimum_value|notes|notes_url|notification_failure_criteria|notification_interval|notification_options|notification_period|notifications_enabled|obsess_over_host|obsess|obsess_over_service|obsess|pager|parents|passive_checks_enabled|process_perf_data|retain_nonstatus_information|retain_status_information|retry_interval|servicegroup_members|servicegroup_name|servicegroups|service_notification_commands|service_notification_options|service_notification_period|service_notifications_enabled|stalking_options|statusmap_image|timeperiod_name|vrml_image' | |
name: regular.key.nagios | |
scope: entity.name.type.nagios | |
# Extra highlight for host_name and service_description | |
- match: 'host_name|service_description' | |
name: special.key.nagios | |
scope: constant.language | |
# Any command line should be marked | |
- match: '/[A-Za-z0-9]+' | |
name: command.line.nagios | |
scope: string.quoted.nagios | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment