{"id":15509521,"url":"https://github.com/rwaffen/icinga2-html-notifications","last_synced_at":"2025-03-28T19:17:43.110Z","repository":{"id":96651653,"uuid":"83675378","full_name":"rwaffen/icinga2-html-notifications","owner":"rwaffen","description":"HTML Notifications for Icinga2","archived":false,"fork":false,"pushed_at":"2017-03-02T12:45:43.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T18:54:45.514Z","etag":null,"topics":["icinga2","mail","ruby","script"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwaffen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-02T12:28:51.000Z","updated_at":"2021-07-02T22:36:09.000Z","dependencies_parsed_at":"2023-03-06T17:00:46.905Z","dependency_job_id":null,"html_url":"https://github.com/rwaffen/icinga2-html-notifications","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"65195c1a60ee67a208d5cdf2725f2ac1254ee7b1"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaffen%2Ficinga2-html-notifications","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaffen%2Ficinga2-html-notifications/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaffen%2Ficinga2-html-notifications/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwaffen%2Ficinga2-html-notifications/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwaffen","download_url":"https://codeload.github.com/rwaffen/icinga2-html-notifications/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246085645,"owners_count":20721213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["icinga2","mail","ruby","script"],"created_at":"2024-10-02T09:43:05.104Z","updated_at":"2025-03-28T19:17:43.068Z","avatar_url":"https://github.com/rwaffen.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# icinga2-html-notifications\nHTML Notifications for Icinga2\n\nAdd ``mail-host.rb`` and ``mail-service.rb`` to ``/etc/icinga2/scripts``.\nUpdate the Icinga2 definition of the Mail Command in ``/etc/icinga2/conf.d/commands.conf``.\n\nMail Script for Hosts\n```\n/* Command objects */\n\nobject NotificationCommand \"mail-host-notification\" {\n  import \"plugin-notification-command\"\n\n  command = [ SysconfDir + \"/icinga2/scripts/mail-host.rb\" ]\n\n  env = {\n    NOTIFICATIONTYPE = \"$notification.type$\"\n    HOSTALIAS = \"$host.display_name$\"\n    HOSTADDRESS = \"$address$\"\n    HOSTNAME = \"$host.name$\"\n    HOSTSTATE = \"$host.state$\"\n    LONGDATETIME = \"$icinga.long_date_time$\"\n    HOSTOUTPUT = \"$host.output$\"\n    NOTIFICATIONAUTHORNAME = \"$notification.author$\"\n    NOTIFICATIONCOMMENT = \"$notification.comment$\"\n    HOSTDISPLAYNAME = \"$host.display_name$\"\n    USEREMAIL = \"$user.email$\"\n    ICINGA2_HOST = \"icinga2.example.com\"\n    ZONE = \"$host.zone$\"\n  }\n}\n```\n\nMail Script for Services\n```\nobject NotificationCommand \"mail-service-notification\" {\n  import \"plugin-notification-command\"\n\n  command = [ SysconfDir + \"/icinga2/scripts/mail-service.rb\" ]\n\n  env = {\n    NOTIFICATIONTYPE = \"$notification.type$\"\n    SERVICEDESC = \"$service.name$\"\n    HOSTALIAS = \"$host.display_name$\"\n    HOSTADDRESS = \"$address$\"\n    HOSTNAME = \"$host.name$\"\n    SERVICESTATE = \"$service.state$\"\n    LONGDATETIME = \"$icinga.long_date_time$\"\n    SERVICEOUTPUT = \"$service.output$\"\n    NOTIFICATIONAUTHORNAME = \"$notification.author$\"\n    NOTIFICATIONCOMMENT = \"$notification.comment$\"\n    HOSTDISPLAYNAME = \"$host.display_name$\"\n    SERVICEDISPLAYNAME = \"$service.display_name$\"\n    USEREMAIL = \"$user.email$\"\n    ICINGA2_HOST = \"icinga2.example.com\"\n    ZONE = \"$host.zone$\"\n  }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaffen%2Ficinga2-html-notifications","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frwaffen%2Ficinga2-html-notifications","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frwaffen%2Ficinga2-html-notifications/lists"}