]> granicus.if.org Git - icinga2/commitdiff
Added example config files and updated the build script so they get installed.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 14 Sep 2012 09:32:49 +0000 (11:32 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 14 Sep 2012 09:35:30 +0000 (11:35 +0200)
12 files changed:
configure.ac
icinga-app/Makefile.am
icinga-app/config/example-ca.crt [moved from icinga-app/ca.crt with 100% similarity]
icinga-app/config/example-ca.key [moved from icinga-app/ca.key with 100% similarity]
icinga-app/config/icinga-c1.pem [moved from icinga-app/icinga-c1.pem with 100% similarity]
icinga-app/config/icinga-c2.pem [moved from icinga-app/icinga-c2.pem with 98% similarity]
icinga-app/config/icinga-c3.pem [moved from icinga-app/icinga-c3.pem with 100% similarity]
icinga-app/config/icinga2.conf.dist [new file with mode: 0644]
icinga-app/icinga1.conf [deleted file]
icinga-app/icinga2.conf [deleted file]
icinga-app/icinga3.conf [deleted file]
icinga2.spec

index 2cf92a89d911116e99125d597179786b87d7d0b1..dd99c5000ec3b721c18ff8757f083d43e87feaa8 100644 (file)
@@ -76,6 +76,7 @@ components/demo/Makefile
 components/replication/Makefile
 docs/Doxyfile
 icinga-app/Makefile
+icinga-app/config/Makefile
 lib/Makefile
 lib/base/Makefile
 lib/config/Makefile
index 1ee49a0692ab4b9efa98f357d521b74e4235aee0..e5fc0887dabd50fbf561fba82df00f3f380e9ae9 100644 (file)
@@ -1,5 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
+SUBDIRS = \
+       config
 
 bin_PROGRAMS = \
        icinga
similarity index 98%
rename from icinga-app/icinga-c2.pem
rename to icinga-app/config/icinga-c2.pem
index 420d800e80eef85ae59733ef52cc598c5f926d71..c7a50fe5ae9e6d6fc9be8cd9bb1517da0f59b461 100644 (file)
@@ -30,4 +30,4 @@ ozBccmQqv5wToWUBm3MB+nph7+fWswJAMKcQQ6UZCvganHeCzJbUXqUQPo7ECoHH
 IrSFEMmSRY1mB3z8NoMKG0kZArPgxc/DmUGfBfi12gWOvSgvh6PjVwJBALKECoe5
 nmxhHTFbs4+UCFTzp6BGtSBdr6to0ID7ykZWT6kBX/BHUnoJUEpDtNLXzbek/KeI
 ymg0LgRkHoWNpLY=
------END PRIVATE KEY-----
\ No newline at end of file
+-----END PRIVATE KEY-----
diff --git a/icinga-app/config/icinga2.conf.dist b/icinga-app/config/icinga2.conf.dist
new file mode 100644 (file)
index 0000000..17cc4a1
--- /dev/null
@@ -0,0 +1,47 @@
+local object IcingaApplication "icinga" {
+
+}
+
+local object Component "checker" {
+
+}
+
+local object Component "delegation" {
+
+}
+
+local object Component "compat" {
+
+}
+
+abstract object Service "nagios-service" {
+  methods {
+    check = "native::NagiosCheck"
+  },
+
+  macros = {
+    plugindir = "/usr/lib/nagios/plugins"
+  }
+}
+
+abstract object Service "ping" inherits "nagios-service" {
+  check_command = "$plugindir$/check_ping -H $address$ -w $wrta$,$wpl$% -c $crta$,$cpl$%",
+
+  macros += {
+    wrta = 50,
+    wpl = 5,
+    crta = 100,
+    cpl = 10
+  }
+}
+
+object Host "localhost" {
+  services = { "ping" },
+
+  macros = {
+    address = "127.0.0.1"
+  },
+
+  check_interval = 10
+}
+
diff --git a/icinga-app/icinga1.conf b/icinga-app/icinga1.conf
deleted file mode 100644 (file)
index e7def91..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-local object IcingaApplication "icinga" {
-       ca = "ca.crt",
-       cert = "icinga-c1.pem",
-
-       node = "10.0.10.14",
-       service = 7778
-}
-
-local object Component "demo" {
-}
-
-local object Component "discovery" {
-       broker = 1
-}
-
diff --git a/icinga-app/icinga2.conf b/icinga-app/icinga2.conf
deleted file mode 100644 (file)
index 5c6e8a5..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-local object IcingaApplication "icinga" {
-       ca = "ca.crt",
-       cert = "icinga-c2.pem",
-}
-
-local object Component "demo" {
-}
-
-local object Component "discovery" {
-       broker = 1
-}
-
-local object Endpoint "icinga-c3" {
-       node = "192.168.5.46",
-       service = 7778,
-}
-
diff --git a/icinga-app/icinga3.conf b/icinga-app/icinga3.conf
deleted file mode 100644 (file)
index 7e880b1..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-local object application "icinga" {
-       ca = "ca.crt",
-       cert = "icinga-c3.pem",
-
-       node = "10.0.10.14",
-       service = 9999
-}
-
-local object component "configrpc" {
-}
-
-local object component "checker" {
-}
-
-local object component "discovery" {
-       broker = 0
-}
-
-local object endpoint "icinga-c2" {
-       node = "192.168.2.235",
-       service = 7777,
-}
-
index 16b7fc97578eb1969965082c06144e64954a0470..1ba401330eca3cb5cf3eef41cb4528c6d0f15f0d 100644 (file)
@@ -36,3 +36,4 @@ make install DESTDIR=%{buildroot}
 %{_bindir}/icinga
 %{_datadir}/doc/icinga2
 %{_libdir}/icinga2
+%{_sysconfdir}/icinga2