| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<!DOCTYPE language> |
| 3 |
<language name="Nagios" section="Configuration" extensions="*.cfg" version="5" kateversion="5.0" author="Gastón Martini" license="GPL" casesensitive="true"> |
| 4 |
<highlighting> |
| 5 |
<list name="Objects"> |
| 6 |
<item>host</item> |
| 7 |
<item>hostgroup</item> |
| 8 |
<item>service</item> |
| 9 |
<item>servicegroup</item> |
| 10 |
<item>contact</item> |
| 11 |
<item>contactgroup</item> |
| 12 |
<item>timeperiod</item> |
| 13 |
<item>command</item> |
| 14 |
<item>servicedependency</item> |
| 15 |
<item>serviceescalation</item> |
| 16 |
<item>hostdependency</item> |
| 17 |
<item>hostescalation</item> |
| 18 |
<item>hostextinfo</item> |
| 19 |
<item>serviceextinfo</item> |
| 20 |
</list> |
| 21 |
<contexts> |
| 22 |
<context name="Nagios" attribute="Normal Text" lineEndContext="#stay"> |
| 23 |
<DetectSpaces/> |
| 24 |
<DetectChar char="#" attribute="Comment" context="Comment" firstNonSpace="true"/> <!-- or column="0"? --> |
| 25 |
<DetectChar char="$" context="Macro Definition" firstNonSpace="true" lookAhead="true"/> |
| 26 |
<StringDetect String="define" attribute="Definition" context="Definition" firstNonSpace="true"/> |
| 27 |
<IncludeRules context="Variable" includeAttrib="true"/> |
| 28 |
</context> |
| 29 |
<context name="Comment" attribute="Comment" lineEndContext="#pop"> |
| 30 |
<DetectSpaces /> |
| 31 |
<IncludeRules context="##Comments" /> |
| 32 |
</context> |
| 33 |
<context name="Macro Definition" attribute="Macro Definition" lineEndContext="#pop"> |
| 34 |
<RangeDetect char="$" char1="$" firstNonSpace="true" context="#stay"/> |
| 35 |
<DetectChar char="=" attribute="Symbol" context="Value"/> |
| 36 |
</context> |
| 37 |
<context name="Variable" attribute="Variable" lineEndContext="#pop"> |
| 38 |
<RegExpr String="[A-Za-z0-9_]+\s*" firstNonSpace="true" context="#stay"/> |
| 39 |
<DetectChar char="=" attribute="Symbol" context="Value"/> |
| 40 |
</context> |
| 41 |
<context name="Definition" attribute="Definition" lineEndContext="#stay"> |
| 42 |
<DetectSpaces/> |
| 43 |
<keyword String="Objects" attribute="Object" context="#stay"/> |
| 44 |
<DetectChar char="{" attribute="Definition Block" context="Object Directives" beginRegion="Object Definition"/> |
| 45 |
<RegExpr String="[^{]+" attribute="Invalid Text" context="#stay"/> |
| 46 |
</context> |
| 47 |
<context name="Object Directives" attribute="Object Directive" lineEndContext="#stay"> |
| 48 |
<DetectSpaces/> |
| 49 |
<DetectChar char=";" attribute="Comment" context="Comment" firstNonSpace="true"/> |
| 50 |
<RegExpr String="[A-Za-z0-9_]+\s*" firstNonSpace="true" attribute="Object Directive" context="Value"/> |
| 51 |
<DetectChar char="}" attribute="Definition Block" context="Nagios" endRegion="Object Definition"/> |
| 52 |
</context> |
| 53 |
<context name="Value" attribute="Value" lineEndContext="#pop"> |
| 54 |
<RangeDetect char="$" char1="$" attribute="Macro" context="#stay"/> |
| 55 |
<Float attribute="Float" /> |
| 56 |
<Int attribute="Int" /> |
| 57 |
<DetectChar char=";" attribute="Comment" context="Comment" /> |
| 58 |
</context> |
| 59 |
</contexts> |
| 60 |
<itemDatas> |
| 61 |
<itemData name="Comment" defStyleNum="dsComment"/> |
| 62 |
<itemData name="Normal Text" defStyleNum="dsNormal"/> |
| 63 |
<itemData name="Variable" defStyleNum="dsNormal"/> |
| 64 |
<itemData name="Object" defStyleNum="dsDataType"/> |
| 65 |
<itemData name="Object Directive" defStyleNum="dsNormal"/> |
| 66 |
<itemData name="Macro" defStyleNum="dsFunction"/> |
| 67 |
<itemData name="Macro Definition" defStyleNum="dsFunction"/> |
| 68 |
<itemData name="Value" defStyleNum="dsString"/> |
| 69 |
<itemData name="Int" defStyleNum="dsDecVal"/> |
| 70 |
<itemData name="Float" defStyleNum="dsFloat"/> |
| 71 |
<itemData name="Symbol" defStyleNum="dsOthers"/> |
| 72 |
<itemData name="Definition" defStyleNum="dsKeyword"/> |
| 73 |
<itemData name="Definition Block" defStyleNum="dsRegionMarker"/> |
| 74 |
<itemData name="Invalid Text" defStyleNum="dsError"/> |
| 75 |
</itemDatas> |
| 76 |
</highlighting> |
| 77 |
<general> |
| 78 |
<folding indentationsensitive="false"/> |
| 79 |
<comments> |
| 80 |
<comment name="singleLine" start="#"/> |
| 81 |
</comments> |
| 82 |
<keywords casesensitive="true"/> |
| 83 |
</general> |
| 84 |
</language> |
| 85 |
<!-- kate: replace-tabs on; tab-width 4; indent-width 4; --> |