]> granicus.if.org Git - icinga2/commitdiff
Move filter constants to itl/constants.conf.
authorGunnar Beutner <gunnar.beutner@netways.de>
Thu, 27 Jun 2013 09:23:32 +0000 (11:23 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Thu, 27 Jun 2013 09:23:32 +0000 (11:23 +0200)
itl/Makefile.am
itl/constants.conf [new file with mode: 0644]
itl/itl.conf
lib/icinga/icinga-type.conf

index b02b34bd652cda9250dfbd441b2213640247e6ad..2df5b68ef7137d1d628a603a6eb7268d6714eb16 100644 (file)
@@ -3,6 +3,7 @@ icinga2itl_DATA = \
        cluster.conf \
        command.conf \
        command-common.conf \
+       constants.conf \
        itl.conf \
        host.conf \
        timeperiod.conf \
diff --git a/itl/constants.conf b/itl/constants.conf
new file mode 100644 (file)
index 0000000..5aba5be
--- /dev/null
@@ -0,0 +1,57 @@
+/******************************************************************************
+ * Icinga 2                                                                   *
+ * Copyright (C) 2012 Icinga Development Team (http://www.icinga.org/)        *
+ *                                                                            *
+ * This program is free software; you can redistribute it and/or              *
+ * modify it under the terms of the GNU General Public License                *
+ * as published by the Free Software Foundation; either version 2             *
+ * of the License, or (at your option) any later version.                     *
+ *                                                                            *
+ * This program is distributed in the hope that it will be useful,            *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              *
+ * GNU General Public License for more details.                               *
+ *                                                                            *
+ * You should have received a copy of the GNU General Public License          *
+ * along with this program; if not, write to the Free Software Foundation     *
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.             *
+ ******************************************************************************/
+
+set StateOK = (0)
+set StateWarning = (1)
+set StateCritical = (2)
+set StateUnknown = (3)
+set StateUncheckable = (4)
+
+/*
+ * Converting states to their filter values: 1<<state
+ */
+set StateFilterOK = (1<<StateOK)
+set StateFilterWarning = (1<<StateWarning)
+set StateFilterCritical = (1<<StateCritical)
+set StateFilterUnknown = (1<<StateUnknown)
+set StateFilterUncheckable = (1<<StateUncheckable)
+
+set NotificationDowntimeStart = (0)
+set NotificationDowntimeEnd = (1)
+set NotificationDowntimeRemoved = (2)
+set NotificationCustom = (3)
+set NotificationAcknowledgement = (4)
+set NotificationProblem = (5)
+set NotificationRecovery = (6)
+set NotificationFlappingStart = (7)
+set NotificationFlappingEnd = (8)
+
+/*
+ * Converting notification types to their filter values: 1<<type
+ */
+set NotificationFilterDowntimeStart = (1<<NotificationDowntimeStart)
+set NotificationFilterDowntimeEnd = (1<<NotificationDowntimeEnd)
+set NotificationFilterDowntimeRemoved = (1<<NotificationDowntimeRemoved)
+set NotificationFilterCustom = (1<<NotificationCustom)
+set NotificationFilterAcknowledgement = (1<<NotificationAcknowledgement)
+set NotificationFilterProblem = (1<<NotificationProblem)
+set NotificationFilterRecovery = (1<<NotificationRecovery)
+set NotificationFilterFlappingStart = (1<<NotificationFlappingStart)
+set NotificationFilterFlappingEnd = (1<<NotificationFlappingEnd)
+
index ba23abcbd9645c21ba03656aa81353a8bc44c307..4082369fa0434f2867aa33a1c601e8b15a7e43fa 100644 (file)
@@ -22,6 +22,7 @@
  * configuration templates.
  */
 
+include "constants.conf"
 include "host.conf"
 include "command.conf"
 include "command-common.conf"
index f28ff6952f8bf1168d2bbdd2ca9c4772752e0f30..d37da4b39a95f8592c58571cbf79c5e749045a29 100644 (file)
@@ -252,44 +252,6 @@ type ServiceGroup {
        %attribute string "action_url"
 }
 
-set StateOK = (0)
-set StateWarning = (1)
-set StateCritical = (2)
-set StateUnknown = (3)
-set StateUncheckable = (4)
-
-/*
- * Converting states to their filter values: 1<<state
- */
-set StateFilterOK = (1<<StateOK)
-set StateFilterWarning = (1<<StateWarning)
-set StateFilterCritical = (1<<StateCritical)
-set StateFilterUnknown = (1<<StateUnknown)
-set StateFilterUncheckable = (1<<StateUncheckable)
-
-set NotificationDowntimeStart = (0)
-set NotificationDowntimeEnd = (1)
-set NotificationDowntimeRemoved = (2)
-set NotificationCustom = (3)
-set NotificationAcknowledgement = (4)
-set NotificationProblem = (5)
-set NotificationRecovery = (6)
-set NotificationFlappingStart = (7)
-set NotificationFlappingEnd = (8)
-
-/*
- * Converting notification types to their filter values: 1<<type
- */
-set NotificationFilterDowntimeStart = (1<<NotificationDowntimeStart)
-set NotificationFilterDowntimeEnd = (1<<NotificationDowntimeEnd)
-set NotificationFilterDowntimeRemoved = (1<<NotificationDowntimeRemoved)
-set NotificationFilterCustom = (1<<NotificationCustom)
-set NotificationFilterAcknowledgement = (1<<NotificationAcknowledgement)
-set NotificationFilterProblem = (1<<NotificationProblem)
-set NotificationFilterRecovery = (1<<NotificationRecovery)
-set NotificationFilterFlappingStart = (1<<NotificationFlappingStart)
-set NotificationFilterFlappingEnd = (1<<NotificationFlappingEnd)
-
 type Notification {
        %require "host_name",
        %attribute string "host_name",