-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added Icinga DSL UDL file and example
updated udl-list.json
- Loading branch information
Showing
3 changed files
with
220 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
/* | ||
* This is an example file of the Icinga DSL language | ||
* Examples pulled from the Icinga Documentation: https://icinga.com/docs/icinga-2/latest/doc/04-configuration/ | ||
*/ | ||
|
||
template Host "generic-host" { | ||
max_check_attempts = 5 | ||
check_interval = 1m | ||
retry_interval = 30s | ||
|
||
check_command = "hostalive" | ||
} | ||
|
||
template Service "generic-service" { | ||
max_check_attempts = 3 | ||
check_interval = 1m | ||
retry_interval = 30s | ||
} | ||
|
||
object CheckCommand "http" { | ||
command = [ PluginDir + "/check_http" ] | ||
|
||
arguments = { | ||
"-H" = "$http_vhost$" | ||
"-I" = "$http_address$" | ||
"-u" = "$http_uri$" | ||
"-p" = "$http_port$" | ||
"-S" = { | ||
set_if = "$http_ssl$" | ||
} | ||
"--sni" = { | ||
set_if = "$http_sni$" | ||
} | ||
"-a" = { | ||
value = "$http_auth_pair$" | ||
description = "Username:password on sites with basic authentication" | ||
} | ||
"--no-body" = { | ||
set_if = "$http_ignore_body$" | ||
} | ||
"-r" = "$http_expect_body_regex$" | ||
"-w" = "$http_warn_time$" | ||
"-c" = "$http_critical_time$" | ||
"-e" = "$http_expect$" | ||
} | ||
|
||
vars.http_address = "$address$" | ||
vars.http_ssl = false | ||
vars.http_sni = false | ||
} | ||
|
||
object Host NodeName { | ||
/* Import the default host template defined in `templates.conf`. */ | ||
import "generic-host" | ||
|
||
/* Specify the address attributes for checks e.g. `ssh` or `http`. */ | ||
address = "127.0.0.1" | ||
address6 = "::1" | ||
|
||
/* Set custom variable `os` for hostgroup assignment in `groups.conf`. */ | ||
vars.os = "Linux" | ||
|
||
/* Define http vhost attributes for service apply rules in `services.conf`. */ | ||
vars.http_vhosts["http"] = { | ||
http_uri = "/" | ||
} | ||
/* Uncomment if you've successfully installed Icinga Web 2. */ | ||
//vars.http_vhosts["Icinga Web 2"] = { | ||
// http_uri = "/icingaweb2" | ||
//} | ||
|
||
/* Define disks and attributes for service apply rules in `services.conf`. */ | ||
vars.disks["disk"] = { | ||
/* No parameters. */ | ||
} | ||
vars.disks["disk /"] = { | ||
disk_partitions = "/" | ||
} | ||
|
||
/* Define notification mail attributes for notification apply rules in `notifications.conf`. */ | ||
vars.notification["mail"] = { | ||
/* The UserGroup `icingaadmins` is defined in `users.conf`. */ | ||
groups = [ "icingaadmins" ] | ||
} | ||
} | ||
|
||
apply Service "load" { | ||
import "generic-service" | ||
|
||
check_command = "load" | ||
|
||
/* Used by the ScheduledDowntime apply rule in `downtimes.conf`. */ | ||
vars.backup_downtime = "02:00-03:00" | ||
|
||
assign where host.name == NodeName | ||
} | ||
|
||
apply Service "ssh" { | ||
import "generic-service" | ||
|
||
check_command = "ssh" | ||
|
||
assign where host.address && host.vars.os == "Linux" | ||
} | ||
|
||
object User "icingaadmin" { | ||
import "generic-user" | ||
|
||
display_name = "Icinga 2 Admin" | ||
groups = [ "icingaadmins" ] | ||
|
||
email = "icinga@localhost" | ||
} | ||
|
||
object UserGroup "icingaadmins" { | ||
display_name = "Icinga 2 Admin Group" | ||
} | ||
|
||
apply Notification "mail-icingaadmin" to Host { | ||
import "mail-host-notification" | ||
|
||
user_groups = host.vars.notification.mail.groups | ||
users = host.vars.notification.mail.users | ||
|
||
assign where host.vars.notification.mail | ||
} | ||
|
||
apply Notification "mail-icingaadmin" to Service { | ||
import "mail-service-notification" | ||
|
||
user_groups = host.vars.notification.mail.groups | ||
users = host.vars.notification.mail.users | ||
|
||
assign where host.vars.notification.mail | ||
} | ||
|
||
object HostGroup "linux-servers" { | ||
display_name = "Linux Servers" | ||
|
||
assign where host.vars.os == "Linux" | ||
} | ||
|
||
object HostGroup "windows-servers" { | ||
display_name = "Windows Servers" | ||
|
||
assign where host.vars.os == "Windows" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<NotepadPlus> | ||
<UserLang name="Icinga DSL" ext="conf" udlVersion="2.1"> | ||
<Settings> | ||
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | ||
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | ||
</Settings> | ||
<KeywordLists> | ||
<Keywords name="Comments">00// 01 02 03/* 04*/</Keywords> | ||
<Keywords name="Numbers, prefix1"></Keywords> | ||
<Keywords name="Numbers, prefix2"></Keywords> | ||
<Keywords name="Numbers, extras1"></Keywords> | ||
<Keywords name="Numbers, extras2"></Keywords> | ||
<Keywords name="Numbers, suffix1">ms s m h d</Keywords> | ||
<Keywords name="Numbers, suffix2"></Keywords> | ||
<Keywords name="Numbers, range"></Keywords> | ||
<Keywords name="Operators1">$ ! ~ + - & * / %</Keywords> | ||
<Keywords name="Operators2">in && == = => += << >> < > <= >= ^ | || ?</Keywords> | ||
<Keywords name="Folders in code1, open">{</Keywords> | ||
<Keywords name="Folders in code1, middle"></Keywords> | ||
<Keywords name="Folders in code1, close">}</Keywords> | ||
<Keywords name="Folders in code2, open"></Keywords> | ||
<Keywords name="Folders in code2, middle"></Keywords> | ||
<Keywords name="Folders in code2, close"></Keywords> | ||
<Keywords name="Folders in comment, open"></Keywords> | ||
<Keywords name="Folders in comment, middle"></Keywords> | ||
<Keywords name="Folders in comment, close"></Keywords> | ||
<Keywords name="Keywords1">apply
template
object
Comment
Downtime
Dependency
Notification
Service
HostGroup
ScheduledDowntime
Host
CheckCommand
ServiceGroup
HostGroup
ApiUser
ApiListener
Dependency
Endpoint
EventCommand
NotificationCommand
ScheduledDowntime
TimePeriod
User
UserGroup
"to Host"
"to Service"
"assign where"
"ignore where"
for (
namespace
if
while
function</Keywords> | ||
<Keywords name="Keywords2"></Keywords> | ||
<Keywords name="Keywords3"></Keywords> | ||
<Keywords name="Keywords4">true
false
null</Keywords> | ||
<Keywords name="Keywords5"></Keywords> | ||
<Keywords name="Keywords6"></Keywords> | ||
<Keywords name="Keywords7"></Keywords> | ||
<Keywords name="Keywords8"></Keywords> | ||
<Keywords name="Delimiters">00" 01 02" 03$ 04 05$ 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords> | ||
</KeywordLists> | ||
<Styles> | ||
<WordsStyle name="DEFAULT" fgColor="004080" bgColor="FFFFFF" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="NUMBERS" fgColor="FF8000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS1" fgColor="8000FF" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS2" fgColor="004080" bgColor="FFFFFF" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="KEYWORDS3" fgColor="004080" bgColor="FFFFFF" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="OPERATORS" fgColor="FF0000" bgColor="FFFFFF" fontStyle="1" nesting="0" /> | ||
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="2" /> | ||
<WordsStyle name="DELIMITERS2" fgColor="FF0000" bgColor="FFFFFF" fontStyle="4" nesting="0" /> | ||
<WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" /> | ||
</Styles> | ||
</UserLang> | ||
</NotepadPlus> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -925,6 +925,15 @@ | |
"description": "IceBreak RPG", | ||
"author": "Niels Liisberg <mailto:[email protected]>" | ||
}, | ||
{ | ||
"id-name": "Icinga_DSL_by_robweber", | ||
"display-name": "Icinga DSL", | ||
"version": "2024-03-25", | ||
"repository": "", | ||
"description": "Icinga DSL for use with Icinga2 monitoring solution", | ||
"author": "robweber", | ||
"homepage": "https://github.com/robweber" | ||
}, | ||
{ | ||
"id-name": "Icon_byOlegBakharev", | ||
"display-name": "Icon", | ||
|