-
Notifications
You must be signed in to change notification settings - Fork 3
/
nagios.JSON-tmLanguage
65 lines (65 loc) · 1.84 KB
/
nagios.JSON-tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
{ "name": "Nagios",
"scopeName": "source.nagios",
"fileTypes": ["cfg"],
"patterns": [
{ "name": "comment.line.number-sign.nagios",
"match": "^[\\s]*#.*",
"comment": "# comments"
},
{ "include": "#variable" },
{ "name": "entity.name.section.nagios",
"begin": "^[\\s]*(define)[\\s]+([A-Za-z0-9_]+)[\\s]*(\\{)",
"beginCaptures": {
"1": { "name": "storage.modifier.nagios" },
"2": { "name": "support.type.nagios" },
"3": { "name": "constant.character.nagios" }
},
"patterns": [
{ "include": "$self" },
{ "include": "#variable" },
{ "include": "#separator" },
{ "name": "keyword.other.nagios",
"match": "^[\\s]*use[\\s]+([A-Za-z0-9_-]+)",
"captures": {
"1": { "name": "support.variable.nagios" }
}
},
{ "name": "keyword.other.nagios",
"match": "^[\\s]*[A-Za-z0-9_]+[\\s]"
},
{ "name": "comment.line.semi-colon.nagios",
"match": ";.*",
"comment": "In-line comments"
}
],
"end": "\\}",
"endCaptures": {
"0": { "name": "constant.character.nagios" }
}
},
{ "name": "string.quoted.double.nagios",
"begin": "\"",
"beginCaptures": {
"0": { "name": "string.quoted.double.nagios" }
},
"patterns": [
{ "include": "#variable" },
{ "include": "#separator" }
],
"end": "\""
}
],
"repository": {
"variable": {
"name": "support.variable.nagios",
"match": "\\$([A-Za-z][A-Za-z0-9_]+)\\$",
"comment": "Variables like $SERVICESTATE$, $USER1$ etc"
},
"separator": {
"name": "constant.character.nagios",
"match": "!",
"comment": "check_command separators"
}
},
"uuid": "a8870a27-4f36-4aa7-8f7b-34a87060247d"
}